diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-09 16:41:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-09 16:41:53 +0100 |
| commit | 424f9d0c70ff0832da0509776da939b2f855cdc1 (patch) | |
| tree | 619620d613bf1b9d8ade700a01df49469812e72b /src/lib/image_proxy.h | |
| parent | 58c574239f98b03f253934d061d976bdb3e30899 (diff) | |
Use a new ImageProxy to hold J2K data from DCP content.
Diffstat (limited to 'src/lib/image_proxy.h')
| -rw-r--r-- | src/lib/image_proxy.h | 23 |
1 files changed, 23 insertions, 0 deletions
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> _image; }; +class J2KImageProxy : public ImageProxy +{ +public: + J2KImageProxy (boost::shared_ptr<const dcp::MonoPictureFrame> frame, dcp::Size, boost::shared_ptr<Log> log); + J2KImageProxy (boost::shared_ptr<const dcp::StereoPictureFrame> frame, dcp::Size, dcp::Eye, boost::shared_ptr<Log> log); + J2KImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket, boost::shared_ptr<Log> log); + + boost::shared_ptr<Image> image () const; + void add_metadata (xmlpp::Node *) const; + void send_binary (boost::shared_ptr<Socket>) const; + +private: + boost::shared_ptr<const dcp::MonoPictureFrame> _mono; + boost::shared_ptr<const dcp::StereoPictureFrame> _stereo; + dcp::Size _size; + dcp::Eye _eye; +}; + boost::shared_ptr<ImageProxy> image_proxy_factory (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket, boost::shared_ptr<Log> log); |
