X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils.h;h=b431b2ef9976858c60a234917602498eb3def910;hb=be63b4ba22a3b1961599fb8cfe4a513693023e13;hp=e753c430819a500007f0b1aafa09e5ce9a023b2c;hpb=0093ebc20aeee6d184aff047d30d93b63186330b;p=ffmpeg diff --git a/cmdutils.h b/cmdutils.h index e753c430819..b431b2ef997 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -44,6 +44,17 @@ extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; extern AVFormatContext *avformat_opts; extern struct SwsContext *sws_opts; +/** + * Initialize the cmdutils option system, in particular + * allocate the *_opts contexts. + */ +void init_opts(void); +/** + * Uninitialize the cmdutils option system, in particular + * free the *_opts contexts and their contents. + */ +void uninit_opts(void); + /** * Trivial log callback. * Only suitable for show_help and similar since it lacks prefix handling. @@ -250,4 +261,24 @@ void init_pts_correction(PtsCorrectionContext *ctx); */ int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts); +#if CONFIG_AVFILTER +#include "libavfilter/avfilter.h" + +typedef struct { + enum PixelFormat pix_fmt; +} FFSinkContext; + +extern AVFilter ffsink; + +/** + * Extract a frame from sink. + * + * @return a negative error in case of failure, 1 if one frame has + * been extracted successfully. + */ +int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, + AVFilterBufferRef **picref, AVRational *pts_tb); + +#endif /* CONFIG_AVFILTER */ + #endif /* FFMPEG_CMDUTILS_H */