[FFmpeg-devel] [PATCH 1/6] lavfi/buffersink: add accessors for the stream properties.
Nicolas George
george at nsup.org
Fri Dec 23 16:31:45 EET 2016
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;
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161223/15ecf1ce/attachment.sig>
More information about the ffmpeg-devel
mailing list