X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fj2k_image_proxy.h;h=72815a0f6c57d8d3b1575c124816304e58b1d47d;hb=2ab331e925eda5f2cc0d8bc3862e46bea60989b6;hp=67609dfce082d362dc25ed8d0099e3741644b80e;hpb=75300fa4696d4119b4246ec85a95b8d007b73559;p=dcpomatic.git diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 67609dfce..72815a0f6 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -1,26 +1,31 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2015 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ #include "image_proxy.h" #include +#include -class EncodedData; +namespace dcp { + class MonoPictureFrame; + class StereoPictureFrame; +} class J2KImageProxy : public ImageProxy { @@ -33,15 +38,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; boost::optional _eye; + mutable boost::shared_ptr _j2k; };