Fix incorrect reel lengths when start-trimmed movie content follows
[dcpomatic.git] / src / lib / player_video.h
index 50848cde7d65a1c0121550bb654ef25116726780..fe7ae384e13114bb171c703b6d47804f305c1d03 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,14 +69,14 @@ public:
        bool has_j2k () const;
        dcp::Data j2k () const;
 
-       DCPTime time () const {
-               return _time;
-       }
-
        Eyes eyes () const {
                return _eyes;
        }
 
+       void set_eyes (Eyes e) {
+               _eyes = e;
+       }
+
        boost::optional<ColourConversion> colour_conversion () const {
                return _colour_conversion;
        }
@@ -88,9 +91,10 @@ public:
 
        bool same (boost::shared_ptr<const PlayerVideo> other) const;
 
+       size_t memory_used () const;
+
 private:
        boost::shared_ptr<const ImageProxy> _in;
-       DCPTime _time;
        Crop _crop;
        boost::optional<double> _fade;
        dcp::Size _inter_size;
@@ -100,3 +104,5 @@ private:
        boost::optional<ColourConversion> _colour_conversion;
        boost::optional<PositionImage> _subtitle;
 };
+
+#endif