Merge master.
[dcpomatic.git] / src / lib / video_decoder.h
index d24219d956cba2df1b92b8a58e2d3f5bc8d24d78..c3228e88dac3fb2fcb633c32b752f8e7a8676f61 100644 (file)
 #ifndef DCPOMATIC_VIDEO_DECODER_H
 #define DCPOMATIC_VIDEO_DECODER_H
 
+#include <boost/signals2.hpp>
+#include <boost/shared_ptr.hpp>
 #include "decoder.h"
+#include "video_content.h"
 #include "util.h"
+#include "decoded.h"
 
 class VideoContent;
+class Image;
 
 class VideoDecoder : public virtual Decoder
 {
 public:
-       VideoDecoder (boost::shared_ptr<const Film>);
-
-       virtual void seek (VideoContent::Frame) = 0;
-       virtual void seek_back () = 0;
-
-       /** Emitted when a video frame is ready.
-        *  First parameter is the video image.
-        *  Second parameter is true if the image is the same as the last one that was emitted.
-        *  Third parameter is the frame within our source.
-        */
-       boost::signals2::signal<void (boost::shared_ptr<const Image>, bool, VideoContent::Frame)> Video;
-       
+       VideoDecoder (boost::shared_ptr<const VideoContent>);
+
+       boost::shared_ptr<const VideoContent> video_content () const {
+               return _video_content;
+       }
+
 protected:
 
-       void video (boost::shared_ptr<const Image>, bool, VideoContent::Frame);
-       VideoContent::Frame _video_position;
+       void video (boost::shared_ptr<const Image>, bool, ContentTime);
+       boost::shared_ptr<const VideoContent> _video_content;
 };
 
 #endif