]> git.sesse.net Git - nageru/blobdiff - ffmpeg_raii.h
Add a feature on VideoInput to interrupt the playing video.
[nageru] / ffmpeg_raii.h
index c0c4a47dc170aa954862eacaa56eb9326cb739d2..33d233480528dd8414e92b3fd32b04c1281d4ffa 100644 (file)
@@ -19,6 +19,7 @@ struct AVFormatContext;
 struct AVFrame;
 struct AVInputFormat;
 struct SwsContext;
+typedef struct AVIOInterruptCB AVIOInterruptCB;
 
 // AVFormatContext
 struct avformat_close_input_unique {
@@ -29,7 +30,13 @@ typedef std::unique_ptr<AVFormatContext, avformat_close_input_unique>
        AVFormatContextWithCloser;
 
 AVFormatContextWithCloser avformat_open_input_unique(
-       const char *pathname, AVInputFormat *fmt, AVDictionary **options);
+       const char *pathname, AVInputFormat *fmt,
+       AVDictionary **options);
+
+AVFormatContextWithCloser avformat_open_input_unique(
+       const char *pathname, AVInputFormat *fmt,
+       AVDictionary **options,
+       const AVIOInterruptCB &interrupt_cb);
 
 
 // AVCodecContext