Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / src / lib / player_video.h
index 96878e0bd4a51198b55ebe49218510cb42e47ed0..55a3566f0ae8e4e3e9449858a2f94c300581b380 100644 (file)
@@ -60,10 +60,10 @@ public:
 
        boost::shared_ptr<PlayerVideo> shallow_copy () const;
 
-       void set_caption (PositionImage);
+       void set_text (PositionImage);
 
        void prepare ();
-       boost::shared_ptr<Image> image (dcp::NoteHandler note, boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+       boost::shared_ptr<Image> image (boost::optional<dcp::NoteHandler> note, boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
 
        static AVPixelFormat always_rgb (AVPixelFormat);
        static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
@@ -100,6 +100,10 @@ public:
 
        size_t memory_used () const;
 
+       boost::weak_ptr<Content> content () const {
+               return _content;
+       }
+
 private:
        boost::shared_ptr<const ImageProxy> _in;
        Crop _crop;
@@ -109,8 +113,10 @@ private:
        Eyes _eyes;
        Part _part;
        boost::optional<ColourConversion> _colour_conversion;
-       boost::optional<PositionImage> _caption;
-       /** Content that we came from.  This is so that reset_metadata() can work */
+       boost::optional<PositionImage> _text;
+       /** Content that we came from.  This is so that reset_metadata() can work, and also
+        *  for variant:swaroop's non-skippable ads.
+        */
        boost::weak_ptr<Content> _content;
        /** Video frame that we came from.  Again, this is for reset_metadata() */
        boost::optional<Frame> _video_frame;