[FFmpeg-devel] [PATCH 1/6] lavfi/buffersink: add accessors for the stream properties.
Michael Niedermayer
michael at niedermayer.cc
Fri Dec 23 18:05:01 EET 2016
On Fri, Dec 23, 2016 at 04:59:45PM +0100, Michael Niedermayer wrote:
> 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
also AVCodecParameters would be an option to use as a struct if a
struct is used, the lack of AVClass/AVOption in it may cause problems
though when lib versions differ and field have been added between
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/f05b0255/attachment.sig>
More information about the ffmpeg-devel
mailing list