]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.h
When exporting interpolated files, make sure they are seekable.
[nageru] / nageru / ffmpeg_capture.h
index 31e94ab41fefc103b150b5319877554450dfa720..468c213d17f677a9235242a5d9f7b1bcecdeaba3 100644 (file)
@@ -31,7 +31,7 @@
 #include <movit/ycbcr.h>
 
 extern "C" {
-#include <libavresample/avresample.h>
+#include <libswresample/swresample.h>
 #include <libavutil/pixfmt.h>
 #include <libavutil/rational.h>
 #include <libavutil/samplefmt.h>
@@ -255,6 +255,7 @@ private:
        int sws_last_width = -1, sws_last_height = -1, sws_last_src_format = -1;
        AVPixelFormat sws_dst_format = AVPixelFormat(-1);  // In practice, always initialized.
        AVRational video_timebase, audio_timebase;
+       bool is_mjpeg = false;
 
        QuittableSleeper producer_thread_should_quit;
        std::thread producer_thread;
@@ -270,7 +271,7 @@ private:
        std::vector<QueuedCommand> command_queue;  // Protected by <queue_mu>.
 
        // Audio resampler.
-       AVAudioResampleContext *resampler = nullptr;
+       SwrContext *resampler = nullptr;
        AVSampleFormat last_src_format, last_dst_format;
        int64_t last_channel_layout;
        int last_sample_rate;