X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=510c0ff2599a2143abbcdf8595d2f31e4f66660b;hb=394c8347d54057c8a52dd63704ae2c9791bb30aa;hp=3680de1114c857dcf80e5b64321499293f183107;hpb=a5ea5c0d2637dd41e3d356cb62cac75b8cadf8ce;p=dcpomatic.git diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 3680de111..510c0ff25 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -50,8 +50,7 @@ public: J2KImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); - boost::shared_ptr image ( - boost::optional note = boost::optional (), + std::pair, int> image ( boost::optional size = boost::optional () ) const; @@ -59,10 +58,7 @@ public: void send_binary (boost::shared_ptr) const; /** @return true if our image is definitely the same as another, false if it is probably not */ bool same (boost::shared_ptr) const; - void prepare (boost::optional = boost::optional()) const; - AVPixelFormat pixel_format () const { - return _pixel_format; - } + int prepare (boost::optional = boost::optional()) const; dcp::Data j2k () const { return _data; @@ -83,8 +79,9 @@ private: dcp::Data _data; dcp::Size _size; boost::optional _eye; - mutable boost::shared_ptr _decompressed; + mutable boost::shared_ptr _image; mutable boost::optional _target_size; + mutable boost::optional _reduce; AVPixelFormat _pixel_format; mutable boost::mutex _mutex; boost::optional _forced_reduction;