X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=bb8c216e3d76bf5b2770705a7fa75f1ce930eb9e;hp=d7b5c83fc443d36e2c79b98b641067fea695c924;hb=aeb835a18c8df347e0ed68fb24631b320abeb611;hpb=5dc2dbdb6639f8d617a40209ad603d2a38f9df2a diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index d7b5c83fc..bb8c216e3 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,30 +17,45 @@ */ -#include #include "image_proxy.h" +#include "data.h" +#include -class EncodedData; +namespace dcp { + class MonoPictureFrame; + class StereoPictureFrame; +} + +class Data; class J2KImageProxy : public ImageProxy { public: - J2KImageProxy (boost::shared_ptr frame, dcp::Size, boost::shared_ptr log); - J2KImageProxy (boost::shared_ptr frame, dcp::Size, dcp::Eye, boost::shared_ptr log); - J2KImageProxy (boost::shared_ptr xml, boost::shared_ptr socket, boost::shared_ptr log); + J2KImageProxy (boost::filesystem::path path, dcp::Size); + J2KImageProxy (boost::shared_ptr frame, dcp::Size); + J2KImageProxy (boost::shared_ptr frame, dcp::Size, dcp::Eye); + J2KImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); - boost::shared_ptr image () const; + boost::shared_ptr image (boost::optional note = boost::optional ()) const; void add_metadata (xmlpp::Node *) const; void send_binary (boost::shared_ptr) const; + /** @return true if our image is definitely the same as another, false if it is probably not */ + virtual bool same (boost::shared_ptr) const; + + Data j2k () const { + return _data; + } - boost::shared_ptr j2k () const; dcp::Size size () const { return _size; } - + private: - boost::shared_ptr _mono; - boost::shared_ptr _stereo; + friend struct client_server_test_j2k; + + J2KImageProxy (Data data, dcp::Size size); + + Data _data; dcp::Size _size; - dcp::Eye _eye; + boost::optional _eye; };