1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/doc
Clément Bœsch 6fb2fd895e lavc: add lavfi metadata support.
This commit introduces a new AVPacket side data type:
AV_PKT_DATA_STRINGS_METADATA. Its main goal is to provide a way to
transmit the metadata from the AVFilterBufferRef up to the AVFrame. This
is at the moment "only" useful for lavfi input from libavdevice:
lavd/lavfi only outputs packets, and the metadata from the buffer ref
kept in its context needs to be transmitted from the packet to the frame
by the decoders. The buffer ref can be destroyed at any time (along with
the metadata), and a duplication of the AVPacket needs to duplicate the
metadata as well, so the choice of using the side data to store them was
selected.

Making sure lavd/lavfi raises the metadata is useful to allow tools like
ffprobe to access the filters metadata (it is at the moment the only
way); ffprobe will now automatically show the AVFrame metadata in any
customizable output format for users. API users will also be able to
access the AVFrame->metadata pointer the same way ffprobe does
(av_frame_get_metadata).

All the changes are done in this single commit to avoid some memory
leaks: for instances, the changes in lavfi/avcodec.c are meant to
duplicate the metadata from the buffer ref into the AVFrame. Unless we
have an internal way of freeing the AVFrame->metadata automatically, it
will leak in most of the user apps. To fix this problem, we introduce
AVCodecContext->metadata and link avctx->metadata to the current
frame->metadata and free it at each decode frame call (and in the codec
closing callback for the last one). But doing this also means to update
the way the tiff decoder already handles the AVFrame->metadata (it's the
only one decoder with frame metadata at the moment), by making sure it
is not trying to free a pointer already freed by the lavc internals.

The lavfi/avcodec.c buffer ref code is based on an old Thomas Kühnel
work, the rest of the code belongs to the commit author.

Signed-off-by: Thomas Kühnel <kuehnelth@googlemail.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2012-10-21 17:29:10 +02:00
..
doxy doc: support the new website layout 2012-10-08 11:22:42 +02:00
examples examples/decoding_encoding: prefer 'frame' over 'picture' for an AVFrame 2012-10-20 19:42:55 +02:00
APIchanges lavc: add lavfi metadata support. 2012-10-21 17:29:10 +02:00
avtools-common-opts.texi
avutil.txt
bitstream_filters.texi
build_system.txt
decoders.texi
demuxers.texi
developer.texi
encoders.texi
errno.txt
eval.texi
faq.texi Merge commit '0a75d1da23b8659ec49391469bb592da12760077' 2012-10-12 14:15:33 +02:00
fate_config.sh.template doc/fate: Move fate config example into doc subdirectory 2012-09-29 19:27:01 +02:00
fate.texi doc/fate: Move fate config example into doc subdirectory 2012-09-29 19:27:01 +02:00
ffmpeg.texi docu: fix flite example 2012-10-15 11:24:08 -06:00
ffmpeg.txt
ffplay.texi
ffprobe.texi ffprobe: add -select_streams option 2012-10-05 23:58:18 +02:00
ffprobe.xsd ffprobe: extend disposition printing support 2012-09-30 12:22:19 +02:00
ffserver.conf
ffserver.texi
filter_design.txt doc: fix typos in filter documentation 2012-09-18 09:06:44 +02:00
filters.texi lavfi/ass: extend syntax for ass filter 2012-10-15 22:40:08 +02:00
general.texi lavc: add xface image decoder and encoder 2012-10-15 08:32:18 +02:00
git-howto.texi
git-howto.txt
indevs.texi lavd/dshow: support video codec and pixel format selection 2012-09-07 09:59:12 +02:00
issue_tracker.txt
Makefile Merge remote-tracking branch 'qatar/master' 2012-10-08 21:46:34 +02:00
metadata.texi
mips.txt Optimization of AC3 floating point decoder for MIPS 2012-09-05 20:09:56 +02:00
multithreading.txt
muxers.texi lavf/segment: add segment_list_flags option 2012-09-11 01:24:54 +02:00
nut.texi Merge commit 'b5198a2637b7b45b0049a1d4b386a06f016f2520' 2012-10-14 14:46:13 +02:00
optimization.txt
outdevs.texi
platform.texi doc/platform: Add info on shared builds with MSVC 2012-10-20 13:00:12 -04:00
print_options.c
protocols.texi Document tcp proto 'timeout' parameter behavior 2012-09-15 16:26:00 +02:00
rate_distortion.txt
RELEASE_NOTES doc/RELEASE_NOTES: update for the 9 release. 2012-10-06 13:55:18 +02:00
snow.txt
soc.txt
swresample.txt doc/swresample.txt: fix typos 2012-10-02 09:43:27 +02:00
swscale.txt
syntax.texi
t2h.init Merge remote-tracking branch 'qatar/master' 2012-10-09 13:06:04 +02:00
tablegen.txt
texi2pod.pl
viterbi.txt