Updated cs_CZ translation from Tomáš Begeni.
[dcpomatic.git] / src / lib / player_video.h
index 569789c8cc1cdb6e6918a783ab9364e955c44cdc..f2781c1a0c51c3e099dd0009604e04a89ce2c3df 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_PLAYER_VIDEO_H
 #define DCPOMATIC_PLAYER_VIDEO_H
 
-#include "types.h"
-#include "position.h"
-#include "dcpomatic_time.h"
+
 #include "colour_conversion.h"
+#include "dcpomatic_time.h"
+#include "image.h"
+#include "position.h"
 #include "position_image.h"
+#include "types.h"
 extern "C" {
 #include <libavutil/pixfmt.h>
 }
 #include <boost/thread/mutex.hpp>
-#include <boost/noncopyable.hpp>
+
 
 class Image;
 class ImageProxy;
 class Film;
 class Socket;
 
+
 /** Everything needed to describe a video frame coming out of the player, but with the
  *  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 : public boost::noncopyable
+class PlayerVideo
 {
 public:
        PlayerVideo (
@@ -61,14 +65,21 @@ public:
 
        PlayerVideo (std::shared_ptr<cxml::Node>, std::shared_ptr<Socket>);
 
+       PlayerVideo (PlayerVideo const&) = delete;
+       PlayerVideo& operator= (PlayerVideo const&) = delete;
+
        std::shared_ptr<PlayerVideo> shallow_copy () const;
 
        void set_text (PositionImage);
+       boost::optional<PositionImage> text () const {
+               return _text;
+       }
 
-       void prepare (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast);
-       std::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
+       void prepare (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast, bool proxy_only);
+       std::shared_ptr<Image> image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool fast) const;
+       std::shared_ptr<const Image> raw_image () const;
 
-       static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
+       static AVPixelFormat force (AVPixelFormat);
        static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
 
        void add_metadata (xmlpp::Node* node) const;
@@ -99,6 +110,10 @@ public:
                return _inter_size;
        }
 
+       dcp::Size out_size () const {
+               return _out_size;
+       }
+
        bool same (std::shared_ptr<const PlayerVideo> other) const;
 
        size_t memory_used () const;
@@ -112,7 +127,7 @@ public:
        }
 
 private:
-       void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
+       void make_image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool fast) const;
 
        std::shared_ptr<const ImageProxy> _in;
        Crop _crop;
@@ -143,4 +158,5 @@ private:
        mutable bool _error;
 };
 
+
 #endif