X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=71bcffb2c50754460736700310ad0af8f002cb3b;hp=3680de1114c857dcf80e5b64321499293f183107;hb=8f12e84009d7c2685bb2eeb32665876463d4e6e5;hpb=a5ea5c0d2637dd41e3d356cb62cac75b8cadf8ce diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 3680de111..71bcffb2c 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -50,19 +50,15 @@ public: J2KImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); - boost::shared_ptr image ( - boost::optional note = boost::optional (), + Result image ( boost::optional size = boost::optional () ) const; void add_metadata (xmlpp::Node *) const; - void send_binary (boost::shared_ptr) const; + void write_to_socket (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,9 +79,12 @@ 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; + /** true if an error occurred while decoding the JPEG2000 data, false if not */ + mutable bool _error; };