All option parsing functions now match the function pointer signature through
which they are called (int f(const char *, const char *), thereby working
reliably on all platforms.
Prefix all option processing functions with opt_
The -i INPUT option can be implemented more cleanly by using a
function option, which can easily be done now that the
parse_arg_function passed to parse_options has a standard signature.
Make ff* tools only accept opt_* functions taking two arguments.
The distinction between functions with one and two arguments is quite
pointless. Simplify parse_options() code.
Make ff* tools only accept opt_* functions taking two arguments.
The distinction between functions with one and two arguments is quite
pointless. Simplify parse_options() code.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Fix warnings:
cmdutils.c: In function ‘opt_default’:
cmdutils.c:304: warning: initialization discards qualifiers from pointer target type
cmdutils.c: In function ‘set_context_opts’:
cmdutils.c:431: warning: passing argument 2 of ‘alloc_priv_context’ discards qualifiers from pointer target type
cmdutils.c:414: note: expected ‘struct AVClass *’ but argument is of type ‘const struct AVClass *’
The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().
Also fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Improve consistency with libavcodec.
This breaks libavfilter API/ABI.
The non-sequential 2.1.0 -> 2.4.0 bump is due to the mess previously
done with the lavfi minor number.
The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.
This is similar to what was done with pkt_pts. This simplifies the
operation of extracting the pos information from the AVPacket, and
allows further simplifications.
All file names should be in UTF-8 within libavformat.
This is handled by mapping the open() function to an internal one
in os_support.h for windows.
fopen() could be overridden in the same way, but if that would be
used from ffmpeg.c, it would add a dependency on an ff prefixed
internal lavf function.
Signed-off-by: Martin Storsjö <martin@martin.st>