summaryrefslogtreecommitdiff
path: root/libavfilter/buffer.c
Commit message (Collapse)AuthorAge
* lavc: add lavfi metadata support.Clément Bœsch2012-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lavfi: add qp_table_sizeMichael Niedermayer2012-09-07
| | | | | | This avoid recalculating it and in case w/h changed avoids crashes. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: 10l fix () placementMichael Niedermayer2012-09-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: factor copy_video_props() outMichael Niedermayer2012-09-07
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavfilter: pass QP table through the filter chainMichael Niedermayer2012-09-07
| | | | | | Any volunteers to port the pp and spp filters from libmpcodec? Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * lavfi: add avfilter_unref_bufferp()Robert Nagy2012-07-20
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | lavfi: make copy_buffer_ref common.Nicolas George2012-07-20
| |
* | lavfi: move definition of avfilter_copy_buf_props() from buffer.c to avcodec.cStefano Sabatini2012-06-13
| | | | | | | | | | | | avcodec.c is where it is defined the lavc/lavfi interface code, so seems a more adequate location (and doesn't force the inclusion of libavcodec/avcodec.h where it is not required).
* | lavfi: move avfilter_copy_frame_props() definition from buffer.c to avcodec.cStefano Sabatini2012-06-05
| | | | | | | | | | The new location is more suited, as it is where the lavfi/lavc glue is defined.
* | lavfi: use getter/setter functions for AVFrame.pkt_posMichael Niedermayer2012-05-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/buffer.c: fix copyrightMichael Niedermayer2012-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git blame: 75 Anton Khirnov 72 Michael Niedermayer 39 Stefano Sabatini 23 S.N. Hemanth Meenakshisundaram 9 Vitor Sessak 6 Robert Nagy 2 Diego Biurrun 1 Andrey Utkin Note: commit ab165047a6142ca0c8c333c36f4ebb96477622d7 Author: Anton Khirnov <anton@khirnov.net> Date: Fri Apr 27 17:27:40 2012 +0200 lavfi: add a function for copying properties from AVFilterBufferRef->AVFrame Based on a commit by Stefano Sabatini <stefano.sabatini-lala@poste.it> commit 4a1ac8c43fcf526b249c3409f1ba54755143a224 Author: Anton Khirnov <anton@khirnov.net> Date: Thu May 10 07:58:11 2012 +0200 lavfi: move buffer management function to a separate file. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (26 commits) fate: use diff -b in oneline comparison Add missing version bumps and APIchanges/Changelog entries. lavfi: move buffer management function to a separate file. lavfi: move formats-related functions from default.c to formats.c lavfi: move video-related functions to a separate file. fate: make smjpeg a demux test fate: separate sierra-vmd audio and video tests fate: separate smacker audio and video tests libmp3lame: set supported channel layouts. avconv: automatically insert asyncts when -async is used. avconv: add support for audio filters. lavfi: add asyncts filter. lavfi: add aformat filter lavfi: add an audio buffer sink. lavfi: add an audio buffer source. buffersrc: add av_buffersrc_write_frame(). buffersrc: fix invalid read in uninit if the fifo hasn't been allocated lavfi: rename vsrc_buffer.c to buffersrc.c avfiltergraph: reindent lavfi: add channel layout/sample rate negotiation. ... Conflicts: Changelog doc/APIchanges doc/filters.texi ffmpeg.c ffprobe.c libavcodec/libmp3lame.c libavfilter/Makefile libavfilter/af_aformat.c libavfilter/allfilters.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/buffersrc.c libavfilter/defaults.c libavfilter/formats.c libavfilter/src_buffer.c libavfilter/version.h libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c libavfilter/vsrc_buffer.h libavutil/avutil.h tests/fate/audio.mak tests/fate/demux.mak tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: move buffer management function to a separate file.Anton Khirnov2012-05-15