X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=1d34e7f84e1a218ebc40b052e78a1b6b1cb1feb6;hb=89ad6c484689ca399d0960803df75374b7a63490;hp=7790f617b0f95789d1e6275074e0617d28d76d27;hpb=e894cfe3d891135d1b92b62603a464e42bd6ed5c;p=dcpomatic.git diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 7790f617b..1d34e7f84 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 @@ -18,9 +18,15 @@ */ #include "image_proxy.h" +#include "data.h" #include -class EncodedData; +namespace dcp { + class MonoPictureFrame; + class StereoPictureFrame; +} + +class Data; class J2KImageProxy : public ImageProxy { @@ -30,18 +36,30 @@ public: 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 */ + bool same (boost::shared_ptr) const; + AVPixelFormat pixel_format () 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; + + /* For tests */ + J2KImageProxy (Data data, dcp::Size size); + void ensure_j2k () const; + + Data _data; dcp::Size _size; - dcp::Eye _eye; + boost::optional _eye; + mutable boost::shared_ptr _j2k; };