| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
This code works on encoder information and has no interaction with
filtering, so it does not belong in ffmpeg_filter.
|
|
|
|
|
|
|
|
|
|
| |
When -pix_fmt designates a BE/LE pixel format, it gets translated into
the native one by av_get_pix_fmt(). This may not always be the best
choice, as the encoder might only support one endianness. In such a
case, explicitly choose the endianness supported by the encoder.
While this is currently redundant with choose_pixel_fmt() in
ffmpeg_filter.c, the latter code will be deprecated in following commits.
|
|
|
|
|
|
|
| |
map_func is supposed to be an array of const pointer to function
returning int, not an array of pointer to function returning const int.
Reported-By: Martin Storsjö
|
|
|
|
|
|
|
|
|
| |
Read the timebase from FrameData rather than the input stream. This
should fix #10393 and generally be more reliable.
Replace the use of '-1' to indicate demuxing timebase with the string
'demux'. Also allow to request filter timebase with
'-enc_time_base filter'.
|
|
|
|
|
|
|
|
| |
This line was added in c30a4489b44 along with
AVStream.sample_aspect_ratio. However, configuring SAR for video
encoding is now done after this code (specifically in enc_open(), which
is called when the first video frame to be encoded is obtained), so this
line cannot have any meaningful effect.
|
|
|
|
| |
Mainly concerns new_stream_*() and their callees.
|
|
|
|
| |
of aborting
|
|
|
|
|
|
|
|
|
| |
Replace duplicated(!) and broken* custom string parsing with
av_dict_parse_string(). Return error codes instead of aborting.
* e.g. it treats NULL returned from av_get_token() as "separator not
found", when in fact av_get_token() only returns NULL on memory
allocation failure
|
|
|
|
| |
instead of aborting
|
|
|
|
| |
instead of aborting
|
| |
|
| |
|
|
|
|
|
| |
ost_add() has a very large variable declaration prologue, performing
"active" actions that can fail in there is confusing.
|
| |
|
|
|
|
|
|
| |
* return error codes instead of aborting
* avoid leaking the AVIOContext on failure
* check the return code of avio_read()
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This way avoids encoders reaching into filters or decoders for this
information.
|
|
|
|
| |
It is no longer used outside of muxing code.
|
|
|
|
|
|
| |
There is no reason to postpone it until opening the encoder. Also, abort
when the input stream is unknown, rather than disregard an explicit
request from the user.
|
|
|
|
| |
It has no effect otherwise.
|
|
|
|
|
| |
The values currently written into it are not used after
streamcopy_init(), so it is better to confine them to that function.
|
|
|
|
|
| |
Stop assuming the encoder knows the muxing timebase, which does not
always have to hold (e.g. due to bitstream filters).
|
|
|
|
| |
That is a more appropriate place for it.
|
|
|
|
|
| |
While the new function is trivial for now, it will become more useful in
future commits.
|
|
|
|
| |
Not the entire AVFilterInOut. This is simpler.
|
|
|
|
|
|
| |
Currently NULL would be passed for simple filtergraphs, which would
make the filter code extract the graph description from the output
stream when needed. This is unnecessarily convoluted.
|
| |
|
|
|
|
|
| |
This way ost_add() knows about the complex filtergraph it is fed from,
which will become useful in future commits.
|
| |
|
|
|
|
| |
This allows to avoid access to the underlying AVStream in many places.
|
|
|
|
|
|
| |
Checking whether the user requested an unsupported conversion between
text and bitmap subtitles can be done immediately when creating the
output stream.
|
|
|
|
| |
Will be useful in future commits.
|
|
|
|
|
| |
Start by moving OutputStream.filtered_frame to it, which really belongs
to the filtergraph rather than the output stream.
|
|
|
|
|
|
| |
The previous name is misleading, because the function does not actually
initialize any filters - it creates a new output stream and binds a
filtergraph output to it.
|
| |
|
|
|
|
| |
OutputFilter.format is initialized in ofilter_alloc().
|
| |
|
|
|
|
|
|
|
|
|
| |
Their only function is checking that encoding was not specified for
data/unknown-type streams, but the check is broken because enc_ctx will
not be created in ost_add() unless a valid encoder can be found.
Add an actually working check for all types for which encoding is not
supported in choose_encoder().
|
| |
|
|
|
|
|
| |
They are not needed outside of ost_get_filters(), so make them stack
variables there.
|
|
|
|
|
|
|
| |
Do it in ost_get_filters() together with other similar checks. Will be
useful in following commits.
Also, improve the log message.
|
| |
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
| |
It is no longer used outside of ffmpeg_mux*
|
|
|
|
|
|
|
|
|
|
|
| |
It stores codec parameters of the stream submitted to the muxer, which
may be different from the codec parameters in AVStream due to bitstream
filtering.
This avoids the confusing back and forth synchronisation between the
encoder, bitstream filters, and the muxer, now information flows only in
one direction. It also reduces the need for non-muxing code to access
AVStream.
|
|
|
|
|
|
|
|
|
| |
Reduces access to a deeply nested muxer property
OutputStream.st->codecpar->codec_type for this fundamental and immutable
stream property.
Besides making the code shorter, this will allow making the AVStream
(OutputStream.st) private to the muxer in the future.
|
|
|
|
|
| |
There is no reason to postpone it until transcode_init() anymore, it can
be done right at the end of of_open().
|