]> git.sesse.net Git - ffmpeg/blobdiff - cmdutils.h
aacdec: return consumed bits in decode_audio_specific_config
[ffmpeg] / cmdutils.h
index e753c430819a500007f0b1aafa09e5ce9a023b2c..b431b2ef9976858c60a234917602498eb3def910 100644 (file)
@@ -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 */