summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
Commit message (Collapse)AuthorAge
* build: Split test programs off into separate filesDiego Biurrun2016-04-07
| | | | | This avoids spurious library rebuilds when only the test program code is changed and simplifies the build system.
* testprogs: K&R formatting cosmeticsDiego Biurrun2016-03-24
|
* opt: Add av_opt_copy()Michael Niedermayer2016-03-24
| | | | | | | This includes documentation and other modifications by Lukasz Marek and Martin Storsjö. Signed-off-by: Martin Storsjö <martin@martin.st>
* opt: Add const to av_opt_nextLukasz Marek2016-03-24
| | | | | | | Also add const to pointers in static functions within opt.c where possible/necessary. Signed-off-by: Martin Storsjö <martin@martin.st>
* opt-test: Merge struct declaration and initializationDiego Biurrun2016-03-23
|
* opt-test: Move some variable declarations to avoid block bracesDiego Biurrun2016-03-23
|
* opt: check memory allocationVittorio Giovara2015-01-05
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1257771
* check memory errors from av_strdup()Vittorio Giovara2014-12-18
|
* cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* AVOption: add support for dictionary types.Andrew Stone2014-08-13
| | | | | | | In order to support metadata being set as an option, it's necessary to be able to set dictionaries as values. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* AVOptions: add flags for read/read-only optionsAnton Khirnov2014-02-19
|
* AVOptions: do not range check flag options.Anton Khirnov2013-10-27
| | | | | | | 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-31
| | | | | | | | | | 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-04
|
* AVOptions: make av_set_options_string() forward options to child objectsAnton Khirnov2013-03-28
|
* AVOptions: fix using named constants with child contexts.Anton Khirnov2013-03-16
| | | | | 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-16
|
* Drop unnecessary 'l' length modifier when printfing double values.Diego Biurrun2012-12-31
| | | | | %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-22
| | | | CC: libav-stable@libav.org
* lavu/opt: do not filter out the initial sign character except for flagsJustin Ruggles2012-12-05
| | | | This allows parsing of special-case negative numbers like decibels.
* Remove pointless #undefs of previously forbidden functions.Anton Khirnov2012-12-04
|
* lavu: remove disabled avoptions cruftAnton Khirnov2012-10-23
|
* avopt: Explicitly store rational option defaults in .dblMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union memberMartin Storsjö2012-09-04
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* AVOptions: store defaults for INT64 options in int64 union member.Anton Khirnov2012-08-24
| | | | | Double does not have enough precision to represent all int64 numbers exactly.
* Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* opt/eval: Include mathematics.h for NAN/INFINITYMartin Storsjö2012-07-01
| | | | | | | 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-28
|
* opt: Add av_opt_set_bin()Samuel Pitoiset2012-05-26
| | | | | | | 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-11
|
* avoptions: Fix av_opt_flag_is_setMartin Storsjö2011-10-17
| | | | | | | | | | | 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-17
|
* AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov2011-10-12
|
* Remove all uses of deprecated AVOptions API.Anton Khirnov2011-10-12
|
* AVOptions: add av_opt_next, deprecate av_next_option.Anton Khirnov2011-10-12
| | | | Just for naming consistency, no functional changes.
* AVOptions: add functions for evaluating option strings.Anton Khirnov2011-10-12
|
* AVOptions: split get_number().Anton Khirnov2011-10-12
| | | | | 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-12
| | | | | 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-12
| | | | | | | 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-12
| | | | | | | | | 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-10
| | | | | | 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-10
|
* AVOptions: cosmetics, move and rename static av_set_number().Anton Khirnov2011-10-10
|
* AVOptions: split av_set_string3 into opt type-specific functionsAnton Khirnov2011-10-10
| | | | | | 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-07
| | | | | 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-07
| | | | | | 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-07
| | | | Also change it to be more readable.
* AVOptions: drop av_ prefix from static av_get_number().Anton Khirnov2011-09-01
|