[FFmpeg-devel] [PATCH] vsrc_buffer.h: remove API dependency on libavcodec/AVFrame

Michael Niedermayer michaelni at gmx.at
Sun Apr 3 18:07:31 CEST 2011


On Sun, Apr 03, 2011 at 05:56:01PM +0200, Stefano Sabatini wrote:
> Allow the source to be used in a pure libavfilter application.
> 
> A source integrated with libavcodec (a la ffplay.c:input_filter)
> should be implemented independently.
> 
> Signed-off-by: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> ---
>  ffmpeg.c                  |    5 ++++-
>  libavfilter/vsrc_buffer.c |   23 ++++++++++++++---------
>  libavfilter/vsrc_buffer.h |    5 +++--
>  3 files changed, 21 insertions(+), 12 deletions(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 2a7431c..b582b1e 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -1624,7 +1624,10 @@ static int output_packet(AVInputStream *ist, int ist_index,
>                      if (ist->st->sample_aspect_ratio.num) sar = ist->st->sample_aspect_ratio;
>                      else                                  sar = ist->st->codec->sample_aspect_ratio;
>                      // add it to be filtered
> -                    av_vsrc_buffer_add_frame(ost->input_video_filter, &picture,
> +                    av_vsrc_buffer_add_frame(ost->input_video_filter,
> +                                             picture.data, picture.linesize,
> +                                             picture.interlaced_frame,
> +                                             picture.top_field_first,
>                                               ist->pts,
>                                               sar);

With AVFrame fields can be added, with a function like this they
cannot.
And i think we will want to access quite a few other fields from
AVFrame. For example in filters to vissualize motion vectors, mb types
and many other things


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

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- 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/20110403/33ffbf7a/attachment.asc>


More information about the ffmpeg-devel mailing list