aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_demux.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ffmpeg_demux: show fixed timestamps in ts_fixupStefano Sabatini2023-02-281-7/+13
| | | | Help debugging.
* fftools/ffmpeg: move ts_scale to DemuxStreamAnton Khirnov2023-02-201-4/+6
| | | | It is not needed outside of ffmpeg_demux.
* fftools/ffmpeg_demux: add an AVClass to DemuxStream/InputStreamAnton Khirnov2023-02-201-29/+50
| | | | | Use it for logging. This makes log messages related to this input stream more consistent.
* fftools/ffmpeg_demux: move InputStream.guess_layout_max to stackAnton Khirnov2023-02-201-6/+7
| | | | | It is only needed while processing the stream in add_input_streams(), no reason to store it in the context.
* fftools/ffmpeg_demux: add InputStream private dataAnton Khirnov2023-02-201-18/+45
| | | | Move {min,max}_pts to it, which is not used outside of ffmpeg_demux.
* fftools/ffmpeg_demux: add an AVClass to Demuxer/InputFileAnton Khirnov2023-02-201-39/+67
| | | | | Use it for logging. This makes log messages related to this input file more consistent.
* fftools/ffmpeg: add an AVClass to MuxStream/OutputStreamAnton Khirnov2023-01-291-5/+5
| | | | | Use it for logging. This makes log messages related to this output stream more consistent.
* fftools/ffmpeg_demux: prefer fd over pipe for seek supportZhao Zhili2023-01-111-1/+1
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fftools/ffmpeg_demux: disable stdin interaction for fd protocolZhao Zhili2023-01-111-0/+1
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fftools: use av_dict_iterateMarvin Scholz2022-12-011-3/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg: remove the input_streams globalAnton Khirnov2022-11-231-23/+48
| | | | | | | | | Replace it with an array of streams in each InputFile. This is a more accurate reflection of the actual relationship between InputStream and InputFile. Analogous to what was previously done to output streams in 7ef7a22251b852faab9404c85399ba8ac5dfbdc3.
* fftools/ffmpeg_demux: set default hwaccel_output_format for mediacodecZhao Zhili2022-11-211-0/+4
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fftools/ffmpeg_mux_init: drop an always-false checkAnton Khirnov2022-11-171-2/+0
| | | | It cannot be true since 1959351aecf. Effectively reverts 6a3833e1411.
* fftools/ffmpeg: make demuxing with one file always blockingAnton Khirnov2022-11-161-2/+3
|
* fftools/ffmpeg_[de]mux: constify all uses of OptionsContextAnton Khirnov2022-11-161-4/+4
|
* ffmpeg: fix implementation of updated input start timeGyan Doshi2022-11-031-2/+2
| | | | | | | | | | The current adjustment of input start times just adjusts the tsoffset. And it does so, by resetting the tsoffset to nullify the new start time. This leads to breakage of -copyts, ignoring of input_ts_offset, breaking of -isync as well as breaking wrap correction. Fixed by taking cognizance of these parameters, and by correcting start times just before sync offsets are applied.
* fftools/ffmpeg_demux: stop modifying OptionsContextAnton Khirnov2022-10-251-17/+22
| | | | It should be input-only to this code.
* fftools/ffmpeg_demux: log when the demuxer thread terminatesAnton Khirnov2022-10-251-0/+8
| | | | Similar to what is done for muxing, may be useful for debugging.
* fftools/ffmpeg: move nb_streams_warn from InputFile to DemuxerAnton Khirnov2022-10-251-6/+9
| | | | | It is private to the demuxer and do not need to be visible outside of it.
* fftools/ffmpeg_demux: do not log to the demuxer contextAnton Khirnov2022-10-251-1/+1
| | | | Only the demuxer itself is supposed to do that.
* fftools/ffmpeg: move duration/time_base from InputFile to DemuxerAnton Khirnov2022-10-251-12/+18
| | | | | They are private to the demuxer and do not need to be visible outside of it.
* fftools/ffmpeg: move threading fields from InputFile to DemuxerAnton Khirnov2022-10-251-22/+27
| | | | | They are private to the demuxer and do not need to be visible outside of it.
* fftools/ffmpeg: drop free_input_threads()Anton Khirnov2022-10-251-11/+6
| | | | | Stop demuxer threads in ifile_close() instead. Simplifies the demuxer API.
* fftools/ffmpeg: move closing the input file into a separate functionAnton Khirnov2022-10-251-0/+12
| | | | | For now this is just closing the format context and freeing InputFile, but will contain more in the future.
* fftools/ffmpeg: drop init_input_threads()Anton Khirnov2022-10-251-15/+9
| | | | | Start threads implicitly when ifile_get_packet() is called. Simplifies the demuxer API.
* fftools/ffmpeg_demux: add demuxer private dataAnton Khirnov2022-10-251-10/+27
| | | | Move InputFile.loop into it.
* fftools/ffmpeg_opt: move opening input files to ffmpeg_demux.cAnton Khirnov2022-10-251-0/+650
| | | | | | | | | This is similar to what was done before for output files and will allow introducing demuxer-private state in future commits Unlike for muxing, the code is moved to existing ffmpeg_demux.c rather than to a new file. The reason is just file size - the demuxing code is much smaller than muxing.
* fftools/ffmpeg: set thread namesAnton Khirnov2022-10-241-0/+9
|
* fftools/ffmpeg: stop accessing av_stream_get_parser() from the main threadAnton Khirnov2022-08-291-2/+14
| | | | | | | | | | | | | | | It races with the demuxing thread. Instead, send the information along with the demuxed packets. Ideally, the code should stop using the stream-internal parsing completely, but that requires considerably more effort. Fixes races, e.g. in: - fate-h264-brokensps-2580 - fate-h264-extradata-reload - fate-iv8-demux - fate-m4v-cfr - fate-m4v
* fftools/ffmpeg: move packet timestamp processing to demuxer threadAnton Khirnov2022-08-131-0/+57
| | | | | | | | | Discontinuity detection/correction is left in the main thread, as it is entangled with InputStream.next_dts and related variables, which may be set by decoding code. Fixes races e.g. in fate-ffmpeg-streamloop after aae9de0cb2887e6e0bbfda6ffdf85ab77d3390f0.
* fftools/ffmpeg: move handling corrupt packets to the input threadAnton Khirnov2022-08-081-0/+11
|
* fftools/ffmpeg_demux: do not store demux packet in the contextAnton Khirnov2022-08-081-1/+10
| | | | Its use is local to input_thread().
* fftools/ffmpeg_demux: factorize signalling end of demuxingAnton Khirnov2022-08-081-3/+5
|
* fftools/ffmpeg: move -stream_loop handling to the demuxer threadAnton Khirnov2022-08-081-64/+102
| | | | | | | | | | | | | -stream_loop is currently handled by destroying the demuxer thread, seeking, then recreating it anew. This is very messy and conflicts with the future goal of moving each major ffmpeg component into its own thread. Handle -stream_loop directly in the demuxer thread. Looping requires the demuxer to know the duration of the file, which takes into account the duration of the last decoded audio frame (if any). Use a thread message queue to communicate this information from the main thread to the demuxer thread.
* fftools/ffmpeg: move seek_to_start() to ffmpeg_demux.cAnton Khirnov2022-08-081-0/+79
| | | | Reduces the diff in the following commit.
* fftools/ffmpeg: move get_input_packet() to ffmpeg_demux.cAnton Khirnov2022-08-081-0/+26
| | | | Also rename it to use the ifile_* namespace.
* fftools/ffmpeg: report new streams from the input threadAnton Khirnov2022-08-081-0/+23
| | | | | | This avoids a potential race with the demuxer adding new streams. It is also more efficient, since we no longer do inter-thread transfers of packets that will be just discarded.
* fftools/ffmpeg: handle dumping input packets in input_thread()Anton Khirnov2022-08-081-0/+6
| | | | This is a more appropriate place for this.
* fftools/ffmpeg: move the input thread into its own fileAnton Khirnov2022-08-081-0/+136
It will contain more demuxing-specific code in the future.