[FFmpeg-devel] [PATCH 1/6] lavfi/buffersink: add accessors for the stream properties.

Michael Niedermayer michael at niedermayer.cc
Fri Dec 23 17:59:45 EET 2016


On Fri, Dec 23, 2016 at 03:31:45PM +0100, Nicolas George wrote:
> L'octidi 28 frimaire, an CCXXV, Nicolas George a écrit :
> > +AVRational       av_buffersink_get_frame_rate          (const AVFilterContext *ctx);
> > +int              av_buffersink_get_w                   (const AVFilterContext *ctx);
> > +int              av_buffersink_get_h                   (const AVFilterContext *ctx);
> > +AVRational       av_buffersink_get_sample_aspect_ratio (const AVFilterContext *ctx);
> 
> So, I ask this of everybody who care: what API do you prefer?
> 
> This one, i.e.:
> 
>     encoder->width               = av_buffersink_get_w(sink);
>     encoder->height              = av_buffersink_get_h(sink);
>     encoder->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink);
> 
> Or one with a single access to all the properties:
> 
>     const AVBufferSinkProperties *fmt = av_buffersink_get_properties(sink);
>     encoder->width               = fmt->w;
>     encoder->height              = fmt->h;
>     encoder->sample_aspect_ratio = fmt->sample_aspect_ratio;

From these 2 the first but i think the user app needs more access
to be able to implement filters and this could make either API
obsoleete

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161223/9f8d6590/attachment.sig>


More information about the ffmpeg-devel mailing list