Replace aligned bool with enum Alignment.
[dcpomatic.git] / src / lib / butler.h
index 8c7f554cb800f4ef94a4a40278463748616cc8f8..cd3891754be508c51603b8b343e3069a3a95481a 100644 (file)
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "audio_mapping.h"
 #include "audio_ring_buffers.h"
 #include "change_signaller.h"
 #include <boost/thread.hpp>
 #include <boost/thread/condition.hpp>
 
+
 class Player;
 class PlayerVideo;
 
-class Butler : public ExceptionStore, public boost::noncopyable
+
+class Butler : public ExceptionStore
 {
 public:
        Butler (
@@ -40,14 +43,18 @@ public:
                std::shared_ptr<Player> player,
                AudioMapping map,
                int audio_channels,
-               boost::function<AVPixelFormat (AVPixelFormat)> pixel_format,
+               std::function<AVPixelFormat (AVPixelFormat)> pixel_format,
                VideoRange video_range,
-               bool aligned,
-               bool fast
+               Image::Alignment alignment,
+               bool fast,
+               bool prepare_only_proxy
                );
 
        ~Butler ();
 
+       Butler (Butler const&) = delete;
+       Butler& operator= (Butler const&) = delete;
+
        void seek (dcpomatic::DCPTime position, bool accurate);
 
        class Error {
@@ -116,11 +123,19 @@ private:
 
        bool _disable_audio;
 
-       boost::function<AVPixelFormat (AVPixelFormat)> _pixel_format;
+       std::function<AVPixelFormat (AVPixelFormat)> _pixel_format;
        VideoRange _video_range;
-       bool _aligned;
+       Image::Alignment _alignment;
        bool _fast;
 
+       /** true to ask PlayerVideo::prepare to only prepare the ImageProxy and not also
+        *  the final image.  We want to do this when the viewer is intending to call
+        *  PlayerVideo::raw_image() and do the things in PlayerVideo::make_imgae() itself:
+        *  this is the case for the GLVideoView which can do scale, pixfmt conversion etc.
+        *  in the shader.
+        */
+       bool _prepare_only_proxy = false;
+
        /** If we are waiting to be refilled following a seek, this is the time we were
            seeking to.
        */