Pass around JPEG2000 data as a shared_ptr and hence avoid a copy
[dcpomatic.git] / src / lib / writer.h
index 71e04df96053c7cf9e7b756421b9e658e925a797..459bc5a882e18e10bb541f4b33e91c7c65eda72c 100644 (file)
@@ -70,7 +70,7 @@ public:
        } type;
 
        /** encoded data for FULL */
-       boost::optional<dcp::Data> encoded;
+       boost::shared_ptr<const dcp::Data> encoded;
        /** size of data for FAKE */
        int size;
        /** reel index */
@@ -105,7 +105,7 @@ public:
 
        bool can_fake_write (Frame) const;
 
-       void write (dcp::Data, Frame, Eyes);
+       void write (boost::shared_ptr<const dcp::Data>, Frame, Eyes);
        void fake_write (Frame, Eyes);
        bool can_repeat (Frame) const;
        void repeat (Frame, Eyes);