summaryrefslogtreecommitdiffstats
path: root/libavutil/opt.c
Commit message (Collapse)AuthorAgeFilesLines
* AVOptions: add flags for read/read-only optionsAnton Khirnov2014-02-191-3/+11
|
* AVOptions: do not range check flag options.Anton Khirnov2013-10-271-1/+2
| | | | | | | It does not make sense in the vast majority of use cases, no currently defined AV_OPT_TYPE_FLAGS options in Libav set the range to anything nontrivial, and many of those get it wrong (the "correct" range is INT_MIN to INT_MAX so that the builtin constant "all" works).
* avopt: Check whether the object actually has got an AVClassMartin Storsjö2013-07-311-0/+3
| | | | | | | | | | AVIOContext has got an av_class member that only gets set if opening the context using avio_open2, but not if allocating a custom IO context. A caller that wants to read AVOptions from an AVIOContext (recursively using AV_OPT_SEARCH_CHILDREN) may not know if the AVIOContext actually has got a class set or not. Signed-off-by: Martin Storsjö <martin@martin.st>
* opt: check the return values of av_get_token for ENOMEM.Anton Khirnov2013-04-041-0/+7
|
* AVOptions: make av_set_options_string() forward options to child objectsAnton Khirnov2013-03-281-1/+1
|
* AVOptions: fix using named constants with child contexts.Anton Khirnov2013-03-161-4/+4
| | | | | The named constant needs to be searched for in the same object on which the option is set, i.e. target_obj.
* AVOption: remove an unused function parameter.Anton Khirnov2013-03-161-6/+4
|
* Drop unnecessary 'l' length modifier when printfing double values.Diego Biurrun2012-12-311-1/+1
| | | | | %f denotes a double argument and 'l' does nothing in this case according to the C spec.
* opt: avoid segfault in av_opt_next() if the class does not have an option listJustin Ruggles2012-12-221-2/+4
| | | | CC: libav-stable@libav.org
* lavu/opt: do not filter out the initial sign character except for flagsJustin Ruggles2012-12-051-3/+8
| | | | This allows parsing of special-case negative numbers like decibels.
* Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-041-2/+0
|
* lavu: remove disabled avoptions cruftAnton Khirnov2012-10-231-147/+0
|
* avopt: Explicitly store rational option defaults in .dblMartin Storsjö2012-09-041-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-041-9/+5
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union memberMartin Storsjö2012-09-041-3/+4
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-041-5/+6
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: store defaults for INT64 options in int64 union member.Anton Khirnov2012-08-241-5/+6
| | | | | Double does not have enough precision to represent all int64 numbers exactly.
* Don't include common.h from avutil.hMartin Storsjö2012-08-151-0/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* opt/eval: Include mathematics.h for NAN/INFINITYMartin Storsjö2012-07-011-0/+1
| | | | | | | These files use NAN/INFINITY but didn't include mathematics.h to get the fallback definitions if the system lacks the macros. Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: fix the value printed in out of range error message.Anton Khirnov2012-05-281-1/+2
|
* opt: Add av_opt_set_bin()Samuel Pitoiset2012-05-261-0/+29
| | | | | | | Introduce a new function to set binary data through AVOption, avoiding having to convert the binary data to a string inbetween. Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: don't return an invalid option when option list is emptyAnton Khirnov2011-11-111-3/+4
|
* avoptions: Fix av_opt_flag_is_setMartin Storsjö2011-10-171-1/+2
| | | | | | | | | | | With the changes in 3b3ea34655db02d9cd9ea1a4122e920a7fdec602, "Remove all uses of deprecated AVOptions API", av_opt_flag_is_set was broken, since it now uses av_opt_find, which doesn't return named constants unless a unit to look for the constant in is given. This broke enabling LATM encapsulated AAC output in RTP. Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: don't segfault on NULL parameter in av_set_options_string()Anton Khirnov2011-10-171-0/+3
|
* AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-121-79/+79
|
* Remove all uses of deprecated AVOptions API.Anton Khirnov2011-10-121-16/+18
|
* AVOptions: add av_opt_next, deprecate av_next_option.Anton Khirnov2011-10-121-0/+7
| | | | Just for naming consistency, no functional changes.
* AVOptions: add functions for evaluating option strings.Anton Khirnov2011-10-121-0/+15
|
* AVOptions: split get_number().Anton Khirnov2011-10-121-16/+26
| | | | | Split actual writing to read_number() in the same way as write_number(). Allows set_string_number() to write to a caller-provided destination.
* AVOptions: add av_opt_get*, deprecate av_get*.Anton Khirnov2011-10-121-8/+99
| | | | | New functions can get values from child objects, properly report error codes and have consistent naming and signatures.
* AVOptions: add av_opt_set*().Anton Khirnov2011-10-121-16/+48
| | | | | | | Deprecate av_set_* New functions support setting values on children, return error codes instead of options and have consistent naming and signatures.
* AVOptions: add new API for enumerating children.Anton Khirnov2011-10-121-5/+43
| | | | | | | | | This will allow the caller to enumerate child contexts in a generic way and since the API is recursive, it also allows for deeper nesting (e.g. AVFormatContext->AVIOContext->URLContext) This will also allow the new setting/reading API to transparently apply to children contexts.
* AVOptions: refactor set_number/write_numberAnton Khirnov2011-10-101-14/+11
| | | | | | write_number() does the actual writing of the supplied number to destination. Move finding the option and choosing destination address out of it.
* AVOptions: cosmetics, rename static av_set_number2() to write_number().Anton Khirnov2011-10-101-3/+3
|
* AVOptions: cosmetics, move and rename static av_set_number().Anton Khirnov2011-10-101-12/+12
|
* AVOptions: split av_set_string3 into opt type-specific functionsAnton Khirnov2011-10-101-78/+101
| | | | | | Also stop attempting to honor the alloc parameter, as things break horribly in that case. It will be removed in upcoming successor to av_set_string3.
* AVOptions: remove AVOption.offset <= 0 checksAnton Khirnov2011-09-071-4/+4
| | | | | They will only ever be <=0 if the option is broken, in which case this check is hiding a bug.
* AVOptions: deprecate av_opt_set_defaults2Anton Khirnov2011-09-071-6/+10
| | | | | | It's a hack which was created to allow for multiple options with different defaults to refer to same field (e.g. 'b' vs 'ab'). There is no need for it anymore.
* AVOptions: move doxy for av_opt_set_defaults() from opt.c to opt.hAnton Khirnov2011-09-071-6/+0
| | | | Also change it to be more readable.
* AVOptions: drop av_ prefix from static av_get_number().Anton Khirnov2011-09-011-4/+4
|
* AVOptions: in av_opt_find() don't return named constants unless unit is ↵Anton Khirnov2011-07-081-2/+3
| | | | | | | | | specified. That is, unless the caller explicitly asks for them. Prevents conflict between e.g. the 'loop' option in img2 demuxer and 'loop' flag in AVCodecContext.
* Do not include log.h in avutil.hMans Rullgard2011-07-031-0/+1
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove return statements following infinite loops without breakMans Rullgard2011-07-031-1/+0
| | | | | | | These statements cannot be reached and are thus not needed. This removes a number of compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
* opt-test: Add missing braces to silence compiler warnings.Diego Biurrun2011-06-301-8/+8
| | | | libavutil/opt.c:604:1: warning: missing braces around initializer [-Wmissing-braces]
* AVOptions: add av_opt_find() as a replacement for av_find_opt.Anton Khirnov2011-06-161-5/+25
|
* AVOptions: add av_opt_set_dict() mapping a dictionary struct to a context.Anton Khirnov2011-06-161-0/+22
| | | | This way the caller can pass all the options in one nice package.
* avoptions: Add an av_opt_flag_is_set function for inspecting flag fieldsMartin Storsjö2011-06-101-0/+10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: add av_opt_free convenience function.Anton Khirnov2011-06-051-0/+8
|
* AVOptions: set string default values.Anton Khirnov2011-05-261-1/+3
|
* avoptions: Return explicitly NAN or {0,0} if the option isn't foundMartin Storsjö2011-05-251-2/+2
| | | | | | | | | | This actually matches what av_get_double did earlier, the 0.0/0.0 division was intentional, for producing NAN. Still keeping the check for the return value from av_get_number, for clarity. Signed-off-by: Martin Storsjö <martin@martin.st>
OpenPOWER on IntegriCloud