X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=71bcffb2c50754460736700310ad0af8f002cb3b;hb=e9cca90a162e3e4b1db4a5e5188831beaa69d44e;hp=77d53a9e58440f56c09e2b815d50a8c05cb37074;hpb=0ff4fa6058b305476e7bc60c590acb6135c49b1c;p=dcpomatic.git diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 77d53a9e5..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); - std::pair, int> 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; int prepare (boost::optional = boost::optional()) const; - AVPixelFormat pixel_format () const { - return _pixel_format; - } dcp::Data j2k () const { return _data; @@ -83,10 +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; };