Commit Graph

1989 Commits

Author SHA1 Message Date
hanqiyuan 9d7b568aae ffmpeg: codesize optimize for CONFIG_AUDIO_ONLY.
Enabled by --enable-audio-only, default disabled.
The size optimized 114656 bytes @ gcc -Os,-flto by --enable-audio-only.

Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2026-04-20 20:58:41 +08:00
openvela-robot 79d0634421 ffmpeg7: fixed amix format when graph load
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:53 +08:00
openvela-robot 225a503d52 FFMPEG: fix AVPacket mem leak
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:57:50 +08:00
openvela-robot 6fb822a912 ffmpeg7: add avformat_write_trailer for adevsink
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:47 +08:00
openvela-robot 32ee48238c adevsink:only do grahp reconfig in start flow
Resolve audio ending process interrupted by adevsink non start command

Signed-off-by: shipei <shipei@xiaomi.com>
2026-04-20 20:57:39 +08:00
zhushiqshi 6ca21364e3 FFMPEG: fix compiler error from HAVE_AV_CONFIG_H
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:32 +08:00
ligd 70ba5e3b5b ffmpeg: fix program restart failed and dup name when enable ffmpeg & ffprobe
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 20:57:32 +08:00
zhushiqshi 9ca2c61ae2 FFMPEG: fix function file_open,file_read,file_write,file_close,file_seek conflict with nuttx
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:31 +08:00
openvela-robot 3608e86b4f FFMPEG: fix sys/syscrl.h can not find
Signed-off-by: zhushiqshi <zhushiqshi@xiaomi.com>
2026-04-20 20:57:30 +08:00
openvela-robot a6c20059ed FFMPEG: add resume when eos is on
when eos is on, we should resume the stream if it is paused.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 20:57:27 +08:00
openvela-robot 6cf52fc3f3 swscale/output: fill all the xv36le alpha bits
The format is 10 bit per component, not 8.

Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:57:24 +08:00
openvela-robot 356c47e109 FFMPEG: force start and stop after configure for driver
Signed-off-by: hanqiyuan <hanqiyuan@xiaomi.com>
2026-04-20 20:57:20 +08:00
Anton Khirnov fc5b0f80c9 fftools/ffmpeg_sched: be smarter about flushing the pre-muxing queues
These per-stream FIFOs hold the packets before every stream is
initialized and the header can be written. Once that happens, current
code will flush each stream's queue one after the other. However, in
case we buffered a lot of data for multiple streams, this may cause the
muxer to overflow max_interleave_delta, resulting in worse interleaving
than necessary.

Change the code to interleave packets from all the queues by DTS.
2026-04-20 20:57:16 +08:00
Anton Khirnov 442e486122 fftools/opt_common: stop accessing a private field
Stops printing the 'C' flag in -filters output, but it carries no
actionable information anyway.
2026-04-20 20:57:16 +08:00
Anton Khirnov 4de4319c5d fftools/ffmpeg_filter: use proper logging contexts 2026-04-20 20:57:16 +08:00
openvela-robot dccba787a1 fftools/ffmpeg_demux: use proper logging contexts everywhere 2026-04-20 20:57:15 +08:00
openvela-robot 1e2e93b397 FFMPEG: only back completed msg when running state.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2026-04-20 20:57:12 +08:00
Anton Khirnov cf06b41d2d fftools/ffmpeg_filter: treat apad filter as a source
Ideally lavfi should have a dedicated API for detecting this.

Fixes #11168 and #11061
2026-04-20 20:57:05 +08:00
openvela-robot 34d0892357 configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin
While we only add the flag if the linker seems to support it,
it turns out that ld.bfd had a bug where the flag is accidentally
accepted, and the flag produces an output file named
"_warn_duplicate_libraries".

The ld.bfd bug was fixed in binutils 2.36, in
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=3991c7acb29aa8d7d52150695eb3efa03a08dd50.

Signed-off-by: Martin Storsjö <martin@martin.st>
2026-04-20 20:57:04 +08:00
openvela-robot c8c957ba35 adevsrc: modify the type of codec_id option param to string.
codec_id=65544 => codec_name=pcm_s32le.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2026-04-20 20:57:01 +08:00
openvela-robot 2006b05fae avcodec/hevc/ps: return a proper error code when we don't support parsing an sps
Signed-off-by: James Almer <jamrial@gmail.com>
2026-04-20 20:56:54 +08:00
openvela-robot 79836cf6b9 FFMPEG: ff_nuttx_capbility_query_ranges not relay on AVFormatContext
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2026-04-20 20:56:51 +08:00
Anton Khirnov 8889abb4ea fftools/ffmpeg: supply hw device context to probe-filtergraphs
I.e. those that are only used to figure out input/output counts, since
some filters might expect a valid hw device in init and refuse to
initalize otherwise.

This requires complex filtergraphs to be created in a separate step
after parsing global options, after all hw devices are guaranteed to
exist.
2026-04-20 20:56:48 +08:00
Anton Khirnov 9bb766ae66 fftools/ffmpeg_filter: do not leak graph_desc on fg_create() failure
fg_create() is passed a malloced string and assumed to always take
ownership of it.
2026-04-20 20:56:48 +08:00
Anton Khirnov fa09e914da fftools/ffmpeg_opt: add a struct to be passed as opaque to global-option handlers
Will be useful in following commits.
2026-04-20 20:56:48 +08:00
Anton Khirnov 92cc49fbe2 fftools/cmdutils: do not treat single '-' as an option in locate_option()
Fixes early parsing of trailing -v/-loglevel while using '-' to output
to stdout.
2026-04-20 20:56:47 +08:00
Anton Khirnov 8fff5519b3 fftools/cmdutils: group related calls together
For readability only, should have no functional effect.
2026-04-20 20:56:47 +08:00
Anton Khirnov b6bcb1d599 fftools/ffmpeg_filter: stop setting a no-op option 2026-04-20 20:56:41 +08:00
Marvin Scholz 4920c0d6ec fftools: log unconnected filter output label 2026-04-20 20:56:33 +08:00
Marvin Scholz 18981228f8 fftools: do not access out of bounds filtergraph
The log message was logged for `filtergraphs[j]` which would cause a
heap buffer overflow in certain circumstances.

Correctly it should be logged for the current filtergraph, so just
use `fg` here.
2026-04-20 20:56:33 +08:00
Anton Khirnov 7c6d050ba1 fftools/ffmpeg_mux_init: consolidate connecting source to mux stream 2026-04-20 20:56:27 +08:00
Anton Khirnov 545e2d4f3b fftools/ffmpeg_mux_init: move the ost_get_filters() call to ost_bind_filter()
That is a more appropriate place for it.
2026-04-20 20:56:27 +08:00
Anton Khirnov 7fd284a4d5 fftools/ffmpeg_mux_init: move the check for filtering+streamcopy
To streamcopy_init().

This will allow to simplify the control flow in ost_add() by moving the
ost_get_filters() call (which previously had to handle both encoding and
streamcopy streams) to ost_bind_filter() (which is only called for
audio/video encoding).

Also, return EINVAL rather than ENOSYS, as trying to combine filtering
with streamcopy is a parameter error.
2026-04-20 20:56:27 +08:00
Anton Khirnov 7768710838 fftools/ffmpeg_mux_init: do not export forced_keyframes_const_names[]
It is only used in this file.
2026-04-20 20:56:27 +08:00
Anton Khirnov 21f51fe847 fftools/ffmpeg: drop unused OSTFinished 2026-04-20 20:56:27 +08:00
Anton Khirnov 7998d1e203 fftools/ffmpeg_mux: move OutputStream.enc_ctx to Encoder
The encoding AVCodecContext is a part of the encoder, and so should live
there.
2026-04-20 20:56:27 +08:00
Anton Khirnov ea8a9bbd19 fftools/ffmpeg_enc: split Encoder into a private and public part
Similar to what was previously done for other components, e.g. decoders
(see 3b84140a1bb5a5b3044915888a40a7b619921633).

Start by moving {samples,frames}_encoded into the public struct.
2026-04-20 20:56:26 +08:00
Anton Khirnov 0762ad01dc fftools/ffmpeg_demux: drop ist_output_add()
It is now a trivial wrapper over ist_use(), so export that directly.
2026-04-20 20:56:26 +08:00
Anton Khirnov 8524206fd9 fftools/ffmpeg_demux: drop InputStream.[nb_]outputs
It is write-only after d119ae2fd82a494d9430ff4d4fc262961a68c598.
2026-04-20 20:56:26 +08:00
Anton Khirnov 10a0d1212e fftools/ffplay: switch to new buffersink options 2026-04-20 20:56:26 +08:00
openvela-robot 48ade96938 lavfi/buffersink: add array-type options to replace "int-list" ones
"int-list" options are a hack that provides rudimentary support for
array-type options by treating them as byte arrays (i.e.
AV_OPT_TYPE_BINARY). Since we now have proper array-type options, they
should replace "int-list" everywhere (which happens to be just
buffersink).
2026-04-20 20:56:25 +08:00
openvela-robot 53a6ff767c FFmpeg/bluelet: output bluelet send & recv timer duration.
Signed-off-by: zhaocheng1 <zhaocheng1@xiaomi.com>
2026-04-20 20:56:22 +08:00
openvela-robot 0f949a99a6 MAINTAINERS: update myself for dvdvideo, rcwtdec, rcwtenc
I plan to look after and test them for the forseeable future.
I am not a committer but do care for these muxers/demuxers.

Signed-off-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-04-20 20:56:19 +08:00
openvela-robot 3450efdfb3 asrc_dev: add codec option param.
Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2026-04-20 20:56:16 +08:00
Anton Khirnov 45360f97cd fftools/ffplay: stop using avfilter_graph_create_filter() incorrectly
This function creates AND initializes a filter, so setting any filter
options after it is wrong. It happens to work when the filter's init
function does not touch the options in question, but is forbidden by the
API and is not guaranteed to remain functional.

Instead, use avfilter_graph_alloc_filter(), followed by setting the
options, and avfilter_init_dict().
2026-04-20 20:56:13 +08:00
Anton Khirnov a41dd48fc2 fftools/ffmpeg_filter: stop using avfilter_graph_create_filter() incorrectly
This function creates AND initializes a filter, so setting any filter
options after it is wrong. It happens to work when the filter's init
function does not touch the options in question, but is forbidden by the
API and is not guaranteed to remain functional.

Instead, use avfilter_graph_alloc_filter(), followed by setting the
options, and avfilter_init_dict().
2026-04-20 20:56:12 +08:00
Anton Khirnov d7bea7a3f1 fftools/ffmpeg_filter: remove remaining OutputStream usage in init_simple_filtergraph()
With this, nothing in ffmpeg_filter acesses OutputStream anymore, thus
there are no more direct ties between filtering and muxing.

Rename init_simple_filtergraph() to fg_create_simple() for consistency.
2026-04-20 20:56:09 +08:00
Anton Khirnov 5bf08afb1d fftools/ffmpeg_filter: drop the OutputStream parameter to ofilter_bind_ost()
It is no longer used for anything besides a sanity-checking assert.
Rename the function to ofilter_bind_enc(), as it no longer has any
assumptions about the target being an output stream.
2026-04-20 20:56:09 +08:00
Anton Khirnov b9f5a8bdfc fftools/ffmpeg_filter: stop accessing OutputStream.[max_]frame_rate
Pass them to ofilter_bind_ost() via OutputFilterOptions, as is done for
most other data it needs. OutputStream.[max_]frame_rate/force_fps are no
longer used outside of ffmpeg_mux*, and so can be made private.

This is a step toward decoupling encoders from muxers.
2026-04-20 20:56:09 +08:00
Anton Khirnov 02469dbc35 fftools/ffmpeg_filter: drop a redundant check
OutputFilterOptions.frame_rates are always NULL if the conditional is
true.
2026-04-20 20:56:09 +08:00