aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux_init.c
Commit message (Collapse)AuthorAgeFilesLines
* fftools/ffmpeg_mux_init: stop modifying OptionsContext.*_disableAnton Khirnov2022-10-251-7/+12
| | | | | | | | | | | The current code will override the *_disable fields (set by -vn/-an options) when creating output streams for unlabeled complex filtergraph outputs, in order to disable automatic mapping for the corresponding media type. However, this will apply not only to automatic mappings, but to manual ones as well, which should not happen. Avoid this by adding local variables that are used only for automatic mappings.
* fftools/ffmpeg_mux_init: move code creating streams into a new functionAnton Khirnov2022-10-251-33/+39
| | | | | Makes it easy to see where all the streams are created. Will also be useful in the following commit.
* fftools/ffmpeg_mux_init: stop modifying some OptionsContext fieldsAnton Khirnov2022-10-251-9/+12
| | | | | | Specifically recording_time and stop_time - use local variables instead. OptionsContext should be input-only to this code. Will allow making it const in future commits.
* fftools/ffmpeg_mux_init: constify metadata specifier argumentsAnton Khirnov2022-10-251-2/+2
|
* fftools/ffmpeg_mux_init: avoid modifying OptionsContext.chapters_input_fileAnton Khirnov2022-10-251-7/+8
| | | | | Use a local variable instead. This will allow making OptionsContext const in future commits.
* fftools/ffmpeg: factor out copying metadata/chapters from of_open()Anton Khirnov2022-10-251-57/+66
| | | | | This code shares variables like OptionsContext.metadata_*_manual, so it makes sense to group it together.
* fftools/ffmpeg: rename read_file() to avoid conflict with libassAnton Khirnov2022-10-211-2/+2
| | | | | libass defines a non-static read_file() symbol, which causes conflicts with static linking.
* ffmpeg: Deprecate display rotation override with a metadata keyJan Ekström2022-10-191-0/+10
| | | | | | | | Now that we have proper options for defining display matrix overrides, this should no longer be required. fftools does not have its own versioning, so for now the define is just set to 1 and disables the functionality if set to zero.
* fftools/ffmpeg_opt: Move stuff only used by ffmpeg_mux_init to itAndreas Rheinhardt2022-10-181-0/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_mux: move muxing queue fields from OutputStream to MuxStreamAnton Khirnov2022-10-181-4/+4
| | | | | They are private to the muxer and do not need to be visible outside of it.
* fftools/ffmpeg_mux: move bsf_ctx from OutputStream to MuxStreamAnton Khirnov2022-10-181-1/+1
| | | | | It is private to the muxer and does not need to be visible outside of it.
* fftools/ffmpeg_mux: embed OutputStream in a MuxStreamAnton Khirnov2022-10-181-14/+9
| | | | | | | | This is now possible since OutputStream is a child of OutputFile and the code allocating it can access MuxStream. Avoids the overhead and extra complexity of allocating two objects instead of one. Similar to what was previously done for OutputFile/Muxer.
* fftools/ffmpeg: remove the output_streams globalAnton Khirnov2022-10-181-24/+30
| | | | | | | Replace it with an array of streams in each OutputFile. This is a more accurate reflection of the actual relationship between OutputStream and OutputFile. This is easier to handle and will allow further simplifications in future commits.
* fftools/ffmpeg_mux_init: pass Muxer to new_output_stream()Anton Khirnov2022-10-181-47/+50
| | | | And intermediate functions. Will be useful in the following commit.
* fftools/ffmpeg_mux: move sq_mux from OutputFile to MuxerAnton Khirnov2022-10-181-4/+4
| | | | | It is internal to ffmpeg_mux* and does not need to be visible to other code.
* fftools/ffmpeg_mux: inline of_muxer_init() into of_open()Anton Khirnov2022-10-181-9/+30
| | | | | A separate muxer init is no longer necessary, now that of_open() has access to Muxer.
* fftools/ffmpeg_mux: allocate sq_pkt in setup_sync_queues()Anton Khirnov2022-10-181-3/+10
| | | | This is now possible since setup_sync_queues() can interact with Muxer.
* fftools/ffmpeg_mux: embed OutputFile in a MuxerAnton Khirnov2022-10-181-2/+2
| | | | | | | | This is now possible since the code allocating OutputFile can see sizeof(Muxer). Avoids the overhead and extra complexity of allocating two objects instead of one. Similar to what is done e.g. for AVStream/FFStream in lavf.
* fftools/ffmpeg_opt: move opening output files into a new fileAnton Khirnov2022-10-181-0/+1887
ffmpeg_opt.c currently contains code for - parsing the options provided on the command line - opening and initializing input files based on these options - opening and initializing output files based on these options The code dealing with each of these is for the most part disjoint, so it makes sense to move them to separate files. Beyond reducing the quite considerable size of ffmpeg_opt.c, this will also allow exposing muxer internals (currently private to ffmpeg_mux.c) to the initialization code, thus removing the awkward separation currently in place.