ffmpeg-rockchip/libavfilter
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
..
libmpcodecs Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
x86 Merge commit 'f6c38c5f4e' 2012-10-13 14:14:11 +02:00
af_aconvert.c lavfi: decrease logging level of message showing initial parameters 2012-07-15 15:07:03 +02:00
af_aformat.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_amerge.c lavfi/amerge: clarify the error message in case of input overlap 2012-09-11 18:58:19 +02:00
af_amix.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_anull.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_aresample.c af_aresample: fix leak on alloc failure 2012-10-11 16:48:25 +02:00
af_asetnsamples.c Merge commit 'e6153f173a' 2012-09-05 14:33:32 +02:00
af_ashowinfo.c lavfi/ashowinfo: check plane value before deferencing. 2012-09-30 21:00:52 +02:00
af_astreamsync.c af_channelmap: require AV_PERM_PRESERVE. 2012-08-17 18:26:39 +02:00
af_asyncts.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_atempo.c lavfi/af_atempo: use av_malloc for rDFT buffers. 2012-08-29 18:19:41 +02:00
af_channelmap.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_channelsplit.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_earwax.c Merge remote-tracking branch 'qatar/master' 2012-07-09 22:40:12 +02:00
af_join.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
af_pan.c af_pan: fix memleak of arg 2012-10-13 01:51:45 +02:00
af_resample.c lavfi: convert input/ouput list compound literals to named objects 2012-10-10 22:26:12 +01:00
af_silencedetect.c lavfi/silencedetect: increase duration precision. 2012-10-21 01:28:19 +02:00
af_volume.c lavfi: decrease logging level of message showing initial parameters 2012-07-15 15:07:03 +02:00
af_volumedetect.c af_volumedetect: fix use of uninitilaized variable in case of planar audio. 2012-10-11 03:12:40 +02:00
all_channel_layouts.inc
allfilters.c lavfi: EBU R.128 scanner. 2012-10-01 22:26:19 +02:00
asink_anullsink.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
asrc_abuffer.h
asrc_aevalsrc.c asrc_aevalsrc: Fix use of uninitialized pointer inside av_strtok() 2012-10-11 03:00:34 +02:00
asrc_anullsrc.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
asrc_flite.c Merge commit 'e6153f173a' 2012-09-05 14:33:32 +02:00
audio.c lavfi: check that buffer and link properties match. 2012-09-13 20:09:53 +02:00
audio.h Merge remote-tracking branch 'qatar/master' 2012-07-09 22:40:12 +02:00
avcodec.c lavc: add lavfi metadata support. 2012-10-21 17:29:10 +02:00
avcodec.h lavfi: add avfilter_get_buffer_ref_from_frame. 2012-07-23 17:14:59 +02:00
avf_concat.c lavfi/avf_concat: fix invalid exclusive test. 2012-10-17 21:28:58 +02:00
avf_showspectrum.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
avf_showwaves.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
avfilter.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
avfilter.h lavc: add lavfi metadata support. 2012-10-21 17:29:10 +02:00
avfiltergraph.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
avfiltergraph.h lavfi/avfiltergraph: apply misc fixes to fix avfilter_graph_request_oldest() @return doxy 2012-07-18 17:13:00 +02:00
bbox.c
bbox.h
buffer.c lavc: add lavfi metadata support. 2012-10-21 17:29:10 +02:00
bufferqueue.h lavfi: add a generic API for buffer queues. 2012-05-31 17:27:27 +02:00
buffersink.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
buffersink.h Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
buffersrc.c libavfilter/buffersrc: Do not fail hard on changes of input parameters. 2012-10-17 00:06:12 +02:00
buffersrc.h Merge commit '23aae62c2c' 2012-09-18 14:45:44 +02:00
drawutils.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
drawutils.h Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
f_ebur128.c lavfi/ebur128: fix typo in condition. 2012-10-11 18:41:07 +02:00
f_sendcmd.c lavfi: add asendcmd and sendcmd filters 2012-09-23 00:50:06 +02:00
f_setpts.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
f_settb.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
fifo.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
filtfmts.c lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
formats.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
formats.h Fix misspellings of FFmpeg 2012-07-19 18:44:46 +02:00
gradfun.h Merge remote-tracking branch 'qatar/master' 2012-10-06 13:45:08 +02:00
graphdump.c lavfi: remove unnecessary inclusion of libavcodec/avcodec.h in avfilter.h 2012-06-25 13:42:37 +02:00
graphparser.c Merge remote-tracking branch 'qatar/master' 2012-08-16 16:20:30 +02:00
internal.h Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
lavfutils.c libavfilter/lavfutils: remove useless NULL check on format context 2012-10-17 20:00:31 +02:00
lavfutils.h Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
libavfilter.v libavfilter: export ff_default_query_formats() 2012-05-25 18:54:01 +02:00
lswsutils.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
lswsutils.h Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
Makefile lavfi: EBU R.128 scanner. 2012-10-01 22:26:19 +02:00
sink_buffer.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
split.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
src_buffer.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
src_movie.c Merge commit '7751e4693d' 2012-09-25 15:15:16 +02:00
transform.c libavfilter/transform: fix mirroring. 2012-06-20 23:55:17 +02:00
transform.h
version.h lavc: add lavfi metadata support. 2012-10-21 17:29:10 +02:00
vf_alphaextract.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_alphamerge.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_aspect.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_ass.c lavfi/ass: extend syntax for ass filter 2012-10-15 22:40:08 +02:00
vf_bbox.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_blackdetect.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_blackframe.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_boxblur.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_colormatrix.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_copy.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_crop.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_cropdetect.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_decimate.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_delogo.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_deshake.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_drawbox.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_drawtext.c lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
vf_edgedetect.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_fade.c vf_fade: fix memleaks of args 2012-10-13 01:08:08 +02:00
vf_fieldorder.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_format.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_fps.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_framestep.c vf_framestep: fix uninitilaized variable bug 2012-08-30 05:09:15 +02:00
vf_frei0r.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_gradfun.c Merge commit 'f6c38c5f4e' 2012-10-13 14:14:11 +02:00
vf_hflip.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_hqdn3d.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_hue.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_idet.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_libopencv.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_lut.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_mp.c vf_mp: fix null ptr deref in case of ENOMEM 2012-10-19 19:59:38 +02:00
vf_null.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vf_overlay.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_pad.c lavfi: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
vf_pixdesctest.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_removelogo.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_scale.c Merge remote-tracking branch 'qatar/master' 2012-10-14 15:11:34 +02:00
vf_select.c lavfi/select/scene: use pointer increments instead of y*linesize. 2012-10-14 02:09:05 +02:00
vf_setfield.c Merge remote-tracking branch 'qatar/master' 2012-07-22 23:56:21 +02:00
vf_showinfo.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_slicify.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_smartblur.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_super2xsai.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_swapuv.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_thumbnail.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vf_tile.c vf_tile: fix output buffer ownership. 2012-08-01 12:23:48 +02:00
vf_tinterlace.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vf_transpose.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_unsharp.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_vflip.c Merge commit '59ee9f78b0' 2012-10-12 17:04:58 +02:00
vf_yadif.c Merge commit 'f6c38c5f4e' 2012-10-13 14:14:11 +02:00
video.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
video.h Merge commit 'fe1c1198e6' 2012-07-29 23:04:49 +02:00
vsink_nullsink.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
vsrc_cellauto.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vsrc_life.c Merge commit '716d413c13' 2012-10-08 21:06:57 +02:00
vsrc_mandelbrot.c mandelbrot: fix inner=period coloring routine 2012-10-16 04:00:55 +02:00
vsrc_mptestsrc.c Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get 2012-10-20 18:00:13 +02:00
vsrc_testsrc.c Merge commit '4436f25a16' 2012-10-11 15:46:48 +02:00
yadif.h Merge remote-tracking branch 'qatar/master' 2012-10-06 13:45:08 +02:00