Add DCP size and length to player.
[dcpomatic.git] / src / lib / player_video.h
index a5ca9b865705648bc298db707166d3614968873a..040145559a7e802bd66c67a41cde0da5fbc486bd 100644 (file)
@@ -18,6 +18,9 @@
 
 */
 
+#ifndef DCPOMATIC_PLAYER_VIDEO_H
+#define DCPOMATIC_PLAYER_VIDEO_H
+
 #include "types.h"
 #include "position.h"
 #include "dcpomatic_time.h"
@@ -41,7 +44,6 @@ class PlayerVideo
 public:
        PlayerVideo (
                boost::shared_ptr<const ImageProxy>,
-               DCPTime,
                Crop,
                boost::optional<double>,
                dcp::Size,
@@ -55,6 +57,7 @@ public:
 
        void set_subtitle (PositionImage);
 
+       void prepare ();
        boost::shared_ptr<Image> image (dcp::NoteHandler note, boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
 
        static AVPixelFormat always_rgb (AVPixelFormat);
@@ -66,10 +69,6 @@ public:
        bool has_j2k () const;
        dcp::Data j2k () const;
 
-       DCPTime time () const {
-               return _time;
-       }
-
        Eyes eyes () const {
                return _eyes;
        }
@@ -92,11 +91,8 @@ public:
 
        bool same (boost::shared_ptr<const PlayerVideo> other) const;
 
-       boost::shared_ptr<PlayerVideo> clone (DCPTime time) const;
-
 private:
        boost::shared_ptr<const ImageProxy> _in;
-       DCPTime _time;
        Crop _crop;
        boost::optional<double> _fade;
        dcp::Size _inter_size;
@@ -106,3 +102,5 @@ private:
        boost::optional<ColourConversion> _colour_conversion;
        boost::optional<PositionImage> _subtitle;
 };
+
+#endif