Anton Khirnov
e48055fdce
fftools/ffmpeg: remove options deprecated before 6.0
9 months ago
Anton Khirnov
6b6815b1c8
fftools/ffmpeg: move subtitle helpers to ffmpeg_dec, their only user
9 months ago
Anton Khirnov
826cfd9997
fftools/ffmpeg_filter: pass framerate through InputFilterOptions
...
Rather than read it directly from InputStream.
This is a step towards avoiding the assumption that filtergraph inputs
are always fed by demuxers.
9 months ago
Anton Khirnov
fef3052df3
fftools/ffmpeg_filter: pass autorotate/reinit flags through InputFilterOptions
...
Rather than read them directly from InputStream.
This is a step towards avoiding the assumption that filtergraph inputs
are always fed by demuxers.
9 months ago
Anton Khirnov
6315f78e0c
fftools/ffmpeg_filter: pass sub2video canvas size through InputFilterOptions
...
Rather than read them directly from InputStream.
This is a step towards avoiding the assumption that filtergraph inputs
are always fed by demuxers.
9 months ago
Anton Khirnov
bd3c1c194b
fftools/ffmpeg_filter: accept a name from its upstream input
...
Do not construct the name manually from input file/stream indices.
This is a step towards avoiding the assumption that filtergraph inputs
are always fed by demuxers.
9 months ago
Anton Khirnov
8f592eb35f
fftools/ffmpeg_filter: compute input trim start/end in demuxer
...
The computation is based on demuxer properties, so that is the more
appropriate place for it. Filter code just receives the desired
start time/duration.
9 months ago
Andreas Rheinhardt
44620ade25
fftools/ffmpeg_mux_init: Fix attachment_filename use-after-free
...
The filename is freed with the OptionsContext and therefore
there will be a use-after-free when reporting the filename
in print_stream_maps(). So create a copy of the string.
This is a regression since 8aed3911fc
.
fate-lavf-mkv_attachment exhibits it (and reports a random nonsense
filename here), but this does not make the test fail (not even with
valgrind; only with ASAN, as it aborts on use-after-free).
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
9 months ago
Anton Khirnov
093be1fb06
fftools/ffmpeg: cosmetics, vertically align Input{File,Stream}
10 months ago
Anton Khirnov
f4b76a1d6a
fftools/ffmpeg: make InputStream.decoder_opts private to demuxer
...
It is no longer used outside of ffmpeg_demux.
10 months ago
Anton Khirnov
01c71b78eb
fftools/ffmpeg: make InputStream.decoding_needed private to demuxer
...
It is no longer used outside of ffmpeg_demux.
10 months ago
Anton Khirnov
0d00e2e2f7
fftools/ffmpeg_dec: eliminate all remaining InputStream uses
...
Previously, the demuxer would register decoder with the scheduler, using
InputStream as opaque, and pass the scheduling index to the decoder.
Now the registration is done by the decoder itself, using DecoderPriv as
opaque, and the scheduling index is returned to demuxer from dec_open().
decoder_thread() then no longer needs to be accessed from outside of
ffmpeg_dec and can be made static.
10 months ago
Anton Khirnov
fe3be6f78f
fftools/ffmpeg_dec: stop passing InputStream to dec_open()
10 months ago
Anton Khirnov
1b2c539a0f
fftools/ffmpeg_dec: pass AVCodecParameters through DecoderOpts
...
Do not retrieve it from InputStream directly.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
b3d1916ba0
fftools/ffmpeg_dec: pass AVCodec through DecoderOpts
...
Do not retrieve it from InputStream directly.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
097f9ddbe9
fftools/ffmpeg_dec: pass decoder name through DecoderOpts
...
Do not build it from InputStream values.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
9ba4bc87e6
fftools/ffmpeg_dec: pass top_field_first through DecoderOpts
...
Do not read it from InputStream directly.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
9702817662
fftools/ffmpeg_dec: pass input timebase through DecoderOpts
...
Do not read it from AVStream directly.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
052c83e356
fftools/ffmpeg_dec: pass forced/estimated framerate though DecoderOpts
...
Stop reading them from InputStream.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
e0a6cb07b2
fftools/ffmpeg_dec: move flags to DecoderOpts
...
Will be useful in the following commit.
10 months ago
Anton Khirnov
4bdffec814
fftools/ffmpeg_dec: pass hwaccel options to the decoder in a separate struct
...
Stop reading them from InputStream.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
a3a9c4ae66
fftools/ffmpeg: move hwaccel_retrieve_data() from ffmpeg_hw to ffmpeg_dec
...
This function is decoding-only and has no interaction with the rest of
ffmpeg_hw. It thus belongs more properly in ffmpeg_dec.
10 months ago
Anton Khirnov
ebb8a58c8f
fftools/ffmpeg_dec: replace InputFile.format_nots with a decoder flag
...
Reduces the need to access InputFile from decoding.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
474ca6c71e
fftools/ffmpeg_dec: stop accesing InputStream.fix_sub_duration
...
Pass this information to dec_open() instead.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
9be3f80527
fftools/ffmpeg_dec: move decoding counters from InputStream to Decoder
...
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
5b0e4f945e
fftools/ffmpeg_dec: pass decoder options as an argument to dec_open()
...
Rather than access the dictionary in InputStream.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
7ecd45587f
fftools/ffmpeg_dec: add an AVClass to Decoder
...
Log decoder messages to the decoder rather than InputStream.
This is a step towards decoupling Decoder and InputStream.
10 months ago
Anton Khirnov
f2a2094c47
fftools/ffmpeg: make decoding AVCodecContext private to the decoder
10 months ago
Anton Khirnov
b43d4a0692
fftools/ffmpeg_dec: export subtitle_header in Decoder
...
This way the encoder does not need to access the decoder AVCodecContext,
which will allow to make it private in future commits.
10 months ago
Anton Khirnov
3b84140a1b
fftools/ffmpeg_dec: split Decoder into a private and public part
...
Similar to what is currently done for other components, e.g. (de)muxers.
There is nothing in the public part currently, but that will change in
future commits.
10 months ago
Anton Khirnov
a8bc79c3fd
fftools/ffmpeg: deprecate -filter_script
...
It is equivalent to -/filter.
10 months ago
Anton Khirnov
c316c4c77b
fftools/ffmpeg: deprecate -filter_complex_script
...
It is equivalent to -/filter_complex.
10 months ago
Anton Khirnov
6d17991b7e
fftools/cmdutils: add option syntax for loading arbitrary arguments from a file
...
Aligned with analogous feature for filter options in ffmpeg CLI.
10 months ago
Anton Khirnov
7f982065a8
fftools/ffmpeg: mark -vsync for future removal
...
It has already been deprecated over a year ago.
11 months ago
Anton Khirnov
41716214c2
fftools/ffmpeg: improve WARN_MULTIPLE_OPT_USAGE()
...
Currently it requires every single OPT_SPEC option to be accompanied by
an array of alternate names for this option. The vast majority of
options have no alternate names, resulting in a large numbers of
unnecessary single-element arrays that merely contain the option name.
Extend the option parsing API to allow marking options as having
alternate names, or as being the canonical name for some existing
alternatives. Use this new information to avoid the need for
abovementioned unnecessary single-element arrays.
11 months ago
Anton Khirnov
148fac277a
fftools/ffmpeg: change the MATCH_PER_TYPE_OPT macro into a function
...
There is no reason for it to be a macro anymore, this makes the code
using it cleaner and simpler.
11 months ago
Anton Khirnov
0ba70a6792
fftools/cmdutils: add a struct for a list of SpecifierOpt
...
Significantly simplifies the code dealing with OPT_SPEC.
11 months ago
James Almer
ed670b9b98
ffmpeg: add support for muxing AVStreamGroups
...
Starting with IAMF support.
Signed-off-by: James Almer <jamrial@gmail.com>
11 months ago
Anton Khirnov
2ad0b8e0ea
fftools/ffmpeg: use a mutex for enc_stats_write()
...
It may be called concurrently from different threads to write into the
same file.
11 months ago
Anton Khirnov
02a4393647
fftools/ffmpeg: print keyframe information with -stats_*
11 months ago
Anton Khirnov
3dc319587f
fftools/ffmpeg: deprecate -fps_mode/vsync drop
...
It depends on the ability of muxers to generate timestamps, which is
itself deprecated.
11 months ago
Anton Khirnov
4549f20222
fftools/ffmpeg: drop OutputFile.sq_encode
...
It is unused since d119ae2fd8
11 months ago
Anton Khirnov
0d01e61807
fftools/ffmpeg_mux: move OutputStream.sq_idx_mux to private data
...
It should not be accessed outside of ffmpeg_mux*
11 months ago
Anton Khirnov
2c54097614
fftools/ffmpeg_demux: move InputFile.readrate to private data
...
It is not used outside of ffmpeg_demux.
11 months ago
Anton Khirnov
116bc5a9f3
fftools/ffmpeg: drop unused InputFile.eof_reached
11 months ago
Anton Khirnov
882bc8049d
fftools/ffmpeg: move InputStream.codec_desc to private data
...
It is not used outside of ffmpeg_demux.
11 months ago
Anton Khirnov
9afe3f5274
fftools/ffmpeg: move InputStream.discard to private data
...
It is not used outside of ffmpeg_demux.
11 months ago
Anton Khirnov
4224895a87
fftools/ffmpeg: replace OutputStream.file_index by a pointer
...
Reduces the need to use the output_files global array.
11 months ago
Anton Khirnov
0fcea80b2a
fftools/ffmpeg: replace InputStream.file_index by a pointer
...
Reduces the need to use the input_files global array.
11 months ago
Anton Khirnov
84201d8af6
fftools/ffmpeg_filter: move FilterGraph.graph to FilterGraphThread
...
The AVFilterGraph is fully owned by the filtering thread and should
never be accessed outside of it.
11 months ago