[FFmpeg-devel] [PATCH 04/13] src_buffer: introduce av_buffersrc_add_ref().
Stefano Sabatini
stefasab at gmail.com
Sun Apr 29 17:21:35 CEST 2012
On date Saturday 2012-04-28 16:31:46 +0200, Nicolas George encoded:
> This function merges the features of
> av_vsrc_buffer_add_video_buffer_ref() and
> av_buffersrc_buffer().
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavfilter/buffersrc.h | 26 ++++++++++++++++++++++++++
> libavfilter/src_buffer.c | 44 ++++++++++++++++++++------------------------
> 2 files changed, 46 insertions(+), 24 deletions(-)
>
> diff --git a/libavfilter/buffersrc.h b/libavfilter/buffersrc.h
> index 918a54f..32ef29b 100644
> --- a/libavfilter/buffersrc.h
> +++ b/libavfilter/buffersrc.h
> @@ -27,6 +27,32 @@
>
> #include "avfilter.h"
>
> +enum {
> +
> + /**
> + * Do not check for format changes.
> + */
> + AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1,
> +
> + /**
> + * Do not copy buffer data.
> + */
> + AV_BUFFERSRC_FLAG_NO_COPY = 2,
> +
> +};
> +
> +/**
> + * Add video buffer data in picref to buffer_src.
> + *
> + * @param buffer_src pointer to a buffer source context
> + * @param picref a buffer reference, or NULL to mark EOF
> + * @param flags a combination of AV_BUFFERSRC_FLAG_*
> + * @return >= 0 in case of success, a negative AVERROR code
> + * in case of failure
> + */
> +int av_buffersrc_add_ref(AVFilterContext *buffer_src,
> + AVFilterBufferRef *picref, int flags);
OK, but I suppose "bufref" or "ref" is more suited since it will
support also audio buffers.
Note: this is not very consistent with av_buffersink_get_buffer_ref(),
we can change this to a longer variant or rename
av_buffersink_get_buffer_ref() to av_buffersink_get_ref(), I'm fine
with both options.
[...]
Should be fine otherwise if tested, thanks.
--
FFmpeg = Fundamental and Fostering Multimedia Political Evil Game
More information about the ffmpeg-devel
mailing list