Merge master.
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index 71ecf79065384aa1d7c14e23e9915af2971798e3..f6a53874ae723871d4d6dba390d57dccab047597 100644 (file)
@@ -60,7 +60,7 @@ public:
        FFmpegDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const FFmpegContent>, bool video, bool audio, bool subtitles, bool video_sync);
        ~FFmpegDecoder ();
 
-       float frames_per_second () const;
+       float video_frame_rate () const;
        libdcp::Size native_size () const;
        ContentVideoFrame video_length () const;
        int time_base_numerator () const;
@@ -77,12 +77,14 @@ public:
        }
 
        bool seek (double);
-       bool seek_to_last ();
        bool pass ();
 
 private:
 
-       bool do_seek (double p, bool);
+       /* No copy construction */
+       FFmpegDecoder (FFmpegDecoder const &);
+       FFmpegDecoder& operator= (FFmpegDecoder const &);
+
        PixelFormat pixel_format () const;
        AVSampleFormat audio_sample_format () const;
        int bytes_per_audio_sample () const;
@@ -134,4 +136,10 @@ private:
        bool _decode_audio;
        bool _decode_subtitles;
        bool _video_sync;
+
+       /* It would appear (though not completely verified) that one must have
+          a mutex around calls to avcodec_open* and avcodec_close... and here
+          it is.
+       */
+       static boost::mutex _mutex;
 };