summaryrefslogtreecommitdiff
path: root/src/stereo_picture_frame.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-01 23:37:31 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-02 00:12:56 +0100
commitc81a5f9d576f426d8df5a7d0117990911b843a30 (patch)
treed1b9ae0718911e72e59ab9f5080f9bb813b7a35b /src/stereo_picture_frame.h
parent9842de679ebca9783b9e8b4705e4fe2a1ebb81fa (diff)
Make StereoPictureFrame expose the Data API in a similar way to MonoPictureFrame.
Diffstat (limited to 'src/stereo_picture_frame.h')
-rw-r--r--src/stereo_picture_frame.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h
index 6dd6269b..c38124c0 100644
--- a/src/stereo_picture_frame.h
+++ b/src/stereo_picture_frame.h
@@ -52,7 +52,10 @@ namespace ASDCP {
namespace dcp {
+
class OpenJPEGImage;
+class StereoPictureFrame;
+
/** A single frame of a 3D (stereoscopic) picture asset */
class StereoPictureFrame : public boost::noncopyable
@@ -62,13 +65,25 @@ public:
boost::shared_ptr<OpenJPEGImage> xyz_image (Eye eye, int reduce = 0) const;
- uint8_t const * left_j2k_data () const;
- uint8_t* left_j2k_data ();
- int left_j2k_size () const;
+ class Part : public Data
+ {
+ public:
+ uint8_t const * data () const;
+ uint8_t * data ();
+ int size () const;
+
+ private:
+ friend class StereoPictureFrame;
+
+ Part (boost::shared_ptr<ASDCP::JP2K::SFrameBuffer> buffer, Eye eye);
+ ASDCP::JP2K::FrameBuffer& mono () const;
+
+ boost::shared_ptr<ASDCP::JP2K::SFrameBuffer> _buffer;
+ Eye _eye;
+ };
- uint8_t const * right_j2k_data () const;
- uint8_t* right_j2k_data ();
- int right_j2k_size () const;
+ boost::shared_ptr<Part> left () const;
+ boost::shared_ptr<Part> right () const;
private:
/* XXX: this is a bit of a shame, but I tried friend StereoPictureAssetReader and it's