Add configuration option to set writer's maximum frames in memory.
[dcpomatic.git] / src / lib / j2k_image_proxy.h
index 3133aac20c055642f9667657b920812d9fc52eeb..c20d89340318b2040bf3fc60a6c26b8d95e70845 100644 (file)
@@ -32,8 +32,22 @@ class J2KImageProxy : public ImageProxy
 {
 public:
        J2KImageProxy (boost::filesystem::path path, dcp::Size, AVPixelFormat pixel_format);
-       J2KImageProxy (boost::shared_ptr<const dcp::MonoPictureFrame> frame, dcp::Size, AVPixelFormat pixel_format);
-       J2KImageProxy (boost::shared_ptr<const dcp::StereoPictureFrame> frame, dcp::Size, dcp::Eye, AVPixelFormat pixel_format);
+
+       J2KImageProxy (
+               boost::shared_ptr<const dcp::MonoPictureFrame> frame,
+               dcp::Size,
+               AVPixelFormat pixel_format,
+               boost::optional<int> forced_reduction
+               );
+
+       J2KImageProxy (
+               boost::shared_ptr<const dcp::StereoPictureFrame> frame,
+               dcp::Size,
+               dcp::Eye,
+               AVPixelFormat pixel_format,
+               boost::optional<int> forced_reduction
+               );
+
        J2KImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
 
        boost::shared_ptr<Image> image (
@@ -71,4 +85,5 @@ private:
        mutable boost::optional<dcp::Size> _target_size;
        AVPixelFormat _pixel_format;
        mutable boost::mutex _mutex;
+       boost::optional<int> _forced_reduction;
 };