From 424f9d0c70ff0832da0509776da939b2f855cdc1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 9 Jul 2014 16:41:53 +0100 Subject: Use a new ImageProxy to hold J2K data from DCP content. --- src/lib/image_proxy.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/lib/image_proxy.h') diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h index f6212e54f..9807d027d 100644 --- a/src/lib/image_proxy.h +++ b/src/lib/image_proxy.h @@ -34,6 +34,11 @@ namespace cxml { class Node; } +namespace dcp { + class MonoPictureFrame; + class StereoPictureFrame; +} + /** @class ImageProxy * @brief A class which holds an Image, and can produce it on request. * @@ -88,4 +93,22 @@ private: mutable boost::shared_ptr _image; }; +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); + + boost::shared_ptr image () const; + void add_metadata (xmlpp::Node *) const; + void send_binary (boost::shared_ptr) const; + +private: + boost::shared_ptr _mono; + boost::shared_ptr _stereo; + dcp::Size _size; + dcp::Eye _eye; +}; + boost::shared_ptr image_proxy_factory (boost::shared_ptr xml, boost::shared_ptr socket, boost::shared_ptr log); -- cgit v1.2.3