Remove swaroop variant.
[dcpomatic.git] / src / lib / player_video.h
index a8f12a0829c886aded28cb30242edb212e2e334c..56cfbd1005912a00b879f7263205a1017f980c7b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -32,6 +32,7 @@ extern "C" {
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
 #include <boost/thread/mutex.hpp>
+#include <boost/noncopyable.hpp>
 
 class Image;
 class ImageProxy;
@@ -42,7 +43,7 @@ class Socket;
  *  bits still their raw form.  We may want to combine the bits on a remote machine,
  *  or maybe not even bother to combine them at all.
  */
-class PlayerVideo
+class PlayerVideo : public boost::noncopyable
 {
 public:
        PlayerVideo (
@@ -66,8 +67,8 @@ public:
 
        void set_text (PositionImage);
 
-       void prepare (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast);
-       boost::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+       void prepare (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast);
+       boost::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
 
        static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
        static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
@@ -78,7 +79,7 @@ public:
        bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size);
 
        bool has_j2k () const;
-       dcp::Data j2k () const;
+       boost::shared_ptr<const dcp::Data> j2k () const;
 
        Eyes eyes () const {
                return _eyes;
@@ -113,7 +114,7 @@ public:
        }
 
 private:
-       void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+       void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
 
        boost::shared_ptr<const ImageProxy> _in;
        Crop _crop;
@@ -125,9 +126,7 @@ private:
        boost::optional<ColourConversion> _colour_conversion;
        VideoRange _video_range;
        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.
-        */
+       /** Content that we came from.  This is so that reset_metadata() can work. */
        boost::weak_ptr<Content> _content;
        /** Video frame that we came from.  Again, this is for reset_metadata() */
        boost::optional<Frame> _video_frame;