X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=efb744c0a1b53f68d4cbcc29fce340ac88535008;hb=6fde557864505b470c438e4161ee494f29b90d63;hp=c2f04e1768e8bbaee0482b8b248667068f2aecce;hpb=228fbab81a5f093e9265d565c1110582c363def3;p=dcpomatic.git diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index c2f04e176..efb744c0a 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 @@ -19,8 +19,12 @@ #include "image_proxy.h" #include +#include -class EncodedData; +namespace dcp { + class MonoPictureFrame; + class StereoPictureFrame; +} class J2KImageProxy : public ImageProxy { @@ -33,15 +37,27 @@ public: 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 */ + bool same (boost::shared_ptr) const; + AVPixelFormat pixel_format () const; + + dcp::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; + + /* For tests */ + J2KImageProxy (dcp::Data data, dcp::Size size); + void ensure_j2k () const; + + dcp::Data _data; dcp::Size _size; - dcp::Eye _eye; + boost::optional _eye; + mutable boost::shared_ptr _j2k; };