]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.h
Give each clip in the playlist a stable ID.
[nageru] / nageru / ffmpeg_capture.h
index 8a513df971fa20f2cba71e25ac603242b9be3be3..468c213d17f677a9235242a5d9f7b1bcecdeaba3 100644 (file)
 #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>
 }
 
 #include "bmusb/bmusb.h"
-#include "ffmpeg_raii.h"
+#include "shared/ffmpeg_raii.h"
 #include "ref_counted_frame.h"
 #include "quittable_sleeper.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;