Set up seek position correctly when a seek skips over a reel in
[dcpomatic.git] / src / lib / ffmpeg_encoder.h
index 5ab59c12dcdcfe640ae5bc5902bc7be58a43d348..5e6dcecf75d1ee556314d9ff8cddea1f49d12752 100644 (file)
@@ -28,6 +28,9 @@ extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 }
+#include <boost/thread/condition.hpp>
+
+class Butler;
 
 class FFmpegEncoder : public Encoder
 {
@@ -70,7 +73,7 @@ private:
        AVDictionary* _video_options;
        std::string _video_codec_name;
        std::string _audio_codec_name;
-       AudioMapping _audio_mapping;
+       int _output_audio_channels;
 
        mutable boost::mutex _mutex;
        DCPTime _last_time;
@@ -81,6 +84,12 @@ private:
 
        boost::shared_ptr<AudioBuffers> _pending_audio;
 
+       mutable boost::mutex _queue_mutex;
+       boost::condition _queue_full;
+       std::list<std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> > _queue;
+
+       boost::shared_ptr<Butler> _butler;
+
        static int _video_stream_index;
        static int _audio_stream_index;
 };