]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.h
Allow dynamic frame sizes for FFmpeg inputs.
[nageru] / nageru / ffmpeg_capture.h
index 122bf86726ba4cb6d73a70a0ca81166d6e7d7431..b974583a10ef22d3f339859513d74c4797bcb673 100644 (file)
@@ -60,14 +60,15 @@ struct AVFormatContext;
 struct AVFrame;
 struct AVRational;
 struct AVPacket;
+class QSurface;
 
 class FFmpegCapture : public bmusb::CaptureInterface
 {
 public:
-       FFmpegCapture(const std::string &filename, unsigned width, unsigned height);
+       FFmpegCapture(const std::string &filename, unsigned width, unsigned height, QSurface *surface);
 #ifdef HAVE_SRT
        // Takes ownership of the SRT client socket.
-       FFmpegCapture(int srt_sock, const std::string &stream_id);
+       FFmpegCapture(int srt_sock, const std::string &stream_id, QSurface *surface);
 #endif
        ~FFmpegCapture();
 
@@ -351,6 +352,7 @@ private:
        // -1 is strictly speaking outside the range of the enum, but hopefully, it will be alright.
        AVColorSpace last_colorspace = static_cast<AVColorSpace>(-1);
        AVChromaLocation last_chroma_location = static_cast<AVChromaLocation>(-1);
+       QSurface *const surface;
 };
 
 #endif  // !defined(_FFMPEG_CAPTURE_H)