[FFmpeg-devel] [PATCH] vsrc_buffer: remove dependency on AVFrame

Michael Niedermayer michaelni at gmx.at
Fri May 13 21:12:59 CEST 2011


On Fri, May 13, 2011 at 06:42:14PM +0200, Stefano Sabatini wrote:
> Change the interface of av_vsrc_buffer_add_frame(), make it accept in input
> an AVFilterBufferRef rather than an AVFrame.
> 
> This way the interface can be used without requiring the
> inclusion/installation of libavcodec headers.

theres no need for headers to be installed, struct AVFrame or even
void * can be used.


[...]
> -                    // add it to be filtered
> -                    av_vsrc_buffer_add_frame2(ost->input_video_filter, &picture, ""); //TODO user setable params
> +
> +                    picref = avfilter_get_video_buffer_ref_from_arrays(
> +                        picture.data, picture.linesize, AV_PERM_WRITE,
> +                        picture.width, picture.height, picture.format);
> +                    avfilter_copy_frame_props(picref, &picture);
> +                    av_vsrc_buffer_add_frame2(ost->input_video_filter, picref, ""); //TODO user setable params
>                  }
>              }
>          }

This is much more complex for user applications and not extendable
we just added these fields days ago. more will be added and this will
always need updating.

Iam not against this patch if you want it but i think the people
using libavfilter & libavcodec would prefer a simple interface
that allows passing an AVFrame.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110513/4190b611/attachment.asc>


More information about the ffmpeg-devel mailing list