Age | Commit message (Collapse) | Author |
|
|
|
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).
|
|
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>
|
|
|
|
|
|
The named constant needs to be searched for in the same object on which
the option is set, i.e. target_obj.
|
|
|
|
%f denotes a double argument and 'l' does nothing in this case
according to the C spec.
|
|
CC: libav-stable@libav.org
|
|
This allows parsing of special-case negative numbers like decibels.
|
|
|
|
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
Double does not have enough precision to represent all int64 numbers
exactly.
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
|
|
|
|
|
|
Just for naming consistency, no functional changes.
|
|
|
|
Split actual writing to read_number() in the same way as write_number().
Allows set_string_number() to write to a caller-provided destination.
|
|
New functions can get values from child objects, properly report error
codes and have consistent naming and signatures.
|
|
Deprecate av_set_*
New functions support setting values on children, return error codes
instead of options and have consistent naming and signatures.
|
|
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.
|
|
write_number() does the actual writing of the supplied
number to destination. Move finding the option and choosing destination
address out of it.
|
|
|
|
|
|
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.
|
|
They will only ever be <=0 if the option is broken, in which case this
check is hiding a bug.
|
|
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.
|
|
Also change it to be more readable.
|
|
|
|
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.
|
|
Signed-off-by: Mans Rullgard <mans@mansr.com>
|
|
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>
|
|
libavutil/opt.c:604:1: warning: missing braces around initializer [-Wmissing-braces]
|
|
|
|
This way the caller can pass all the options in one nice package.
|
|
Signed-off-by: Martin Storsjö <martin@martin.st>
|
|
|
|
|
|
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>
|