| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Track the wallclock time at which each input packet is demuxed and
propagate it through decoding and encoding.
When the live mux option is used, drop all packets demuxed before the
muxer is opened. This is intended to avoid latency when opening the
muxer takes a long time.
|
| |
|
|
|
|
| |
Its use is local to input_thread().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-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.
|
|
|
|
| |
Reduces the diff in the following commit.
|
|
|
|
| |
Also rename it to use the ifile_* namespace.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is a more appropriate place for this.
|
|
|
|
|
|
|
|
|
| |
This undocumented feature runtime-enables dumping input packets. I can
think of no reasonable real-world use case that cannot also be
accomplished in a different way. Keeping this functionality would
interfere with the following commit moving it to the input thread (then
setting the variable would require locking or atomics, which would be
unnecessarily complicated for a feature that probably nobody uses).
|
|
|
|
| |
It will contain more demuxing-specific code in the future.
|
| |
|
|
|
|
| |
This will be required by the following architecture changes.
|
|
|
|
|
|
| |
Use it to simplify some code and fix two off-by-one errors.
Similar to what was previously done for OutputFile.
|
| |
|
|
|
|
| |
It has not had any effect whatsoever for over 10 years.
|
|
|
|
| |
It is not actually used for anything.
|
|
|
|
| |
It is unnecessary, as it is always exactly equivalent to !!ost->enc_ctx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are currently three possible modes for an output stream:
1) The stream is produced by encoding output from some filtergraph. This
is true when ost->enc_ctx != NULL, or equivalently when
ost->encoding_needed != 0.
2) The stream is produced by copying some input stream's packets. This
is true when ost->enc_ctx == NULL && ost->source_index >= 0.
3) The stream is produced by attaching some file directly. This is true
when ost->enc_ctx == NULL && ost->source_index < 0.
OutputStream.stream_copy is currently used to identify case 2), and
sometimes to confusingly (or even incorrectly) identify case 1). Remove
it, replacing its usage with checking enc_ctx/source_index values.
|
|
|
|
| |
A decoder is already selected above, in choose_decoder().
|
|
|
|
|
|
| |
The same information is available from AVStream.codecpar. This will
allow to stop allocating a decoder unless decoding is actually
performed.
|
|
|
|
|
| |
Only the decoder itself should do that. Use NULL as is done by all other
logging code in ffmpeg.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usually a HW decoder is expected when user specifies a HW acceleration
method via -hwaccel option, however the current implementation doesn't
take HW acceleration method into account, it is possible to select a SW
decoder.
For example:
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (libdav1d) -> wrapped_avframe (native))
libdav1d is selected in this case even if vaapi, nvdec or vdpau is
specified.
After applying this patch, the native av1 decoder (with vaapi, nvdec or
vdpau support) is selected for decoding(libdav1d is still used for
probing format).
$ ffmpeg -hwaccel vaapi -i av1.mp4 -f null -
$ ffmpeg -hwaccel nvdec -i av1.mp4 -f null -
$ ffmpeg -hwaccel vdpau -i av1.mp4 -f null -
[...]
Stream #0:0 -> #0:0 (av1 (native) -> wrapped_avframe (native))
Tested-by: Mario Roy <marioeroy@gmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
|
|
|
|
|
|
|
|
|
|
|
| |
After applying this patch, the desired HW acceleration method is known
before selecting decoder, so we may take HW acceleration method into
account when selecting decoder for input stream in the next commit
There should be no functional changes in this patch
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
|
|
|
|
|
|
|
| |
Broken in 9c2b800203a5a8f3d83f3b8f28e8c50d28186b39.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix indentation after the previous commit. Also use an early return to
save one extra indentation level.
|
| |
|
|
|
|
|
| |
Fix indentation after the previous commit. Also use an early return to
save one extra indentation level.
|
| |
|
|
|
|
|
| |
Fix indentation after the previous commit. Also use an early return to
save one extra indentation level.
|
| |
|
|
|
|
|
| |
That should only be done from inside the decoder. Log to NULL instead,
as is the current convention in ffmpeg.
|
| |
|
|
|
|
|
| |
Since the option it relates to is deprecated, it is highly unlikely to
become useful.
|
|
|
|
|
| |
It is now entirely redundant with audio filters, and is in fact
implemented by setting up a 'pan' filter instance.
|
|
|
|
| |
That is the only place where it is used. Also make it static.
|
| |
|
|
|
|
|
| |
The codec type will be set by avcodec_alloc_context3(), there is no
reason to set it manually.
|
| |
|
|
|
|
| |
It is entirely redundant with -flags +psnr.
|
|
|
|
|
|
| |
The streamcopy initialization code briefly needs an AVCodecContext to
apply AVOptions to. Allocate a temporary codec context, do not use the
encoding one.
|
|
|
|
|
| |
It serves no purpose, codec parameters can be written directly to
AVStream.codecpar with the same effect.
|
|
|
|
| |
It has been deprecated in favor of the volume filter since 2012.
|