Comments.
[libdcp.git] / src / picture_frame.h
index bb347294b839a1e45ad23b0ef8081da918dc6d35..1c17e50b14a5752e9528ef29eacbedfbf65b14c6 100644 (file)
 #include <string>
 #include <stdint.h>
 #include <boost/shared_ptr.hpp>
+#include "types.h"
 
 namespace ASDCP {
        namespace JP2K {
                class FrameBuffer;
+               class SFrameBuffer;
        }
+       class AESDecContext;
 }
 
 namespace libdcp {
 
-class RGBAFrame;       
+class ARGBFrame;
 
-class PictureFrame
+/** A single frame of a 2D (monoscopic) picture asset */       
+class MonoPictureFrame
 {
 public:
-       PictureFrame (std::string mxf_path, int n);
-       ~PictureFrame ();
+       MonoPictureFrame (std::string mxf_path, int n, ASDCP::AESDecContext *);
+       ~MonoPictureFrame ();
 
-       uint8_t const * data () const;
-       int size () const;
-
-       boost::shared_ptr<RGBAFrame> rgba_frame () const;
+       boost::shared_ptr<ARGBFrame> argb_frame (int reduce = 0, float srgb_gamma = 2.4) const;
+       uint8_t const * j2k_data () const;
+       int j2k_size () const;
 
 private:
        ASDCP::JP2K::FrameBuffer* _buffer;
 };
 
+/** A single frame of a 3D (stereoscopic) picture asset */     
+class StereoPictureFrame
+{
+public:
+       StereoPictureFrame (std::string mxf_path, int n);
+       ~StereoPictureFrame ();
+
+       boost::shared_ptr<ARGBFrame> argb_frame (Eye eye, int reduce = 0, float srgb_gamma = 2.4) const;
+       uint8_t const * left_j2k_data () const;
+       int left_j2k_size () const;
+       uint8_t const * right_j2k_data () const;
+       int right_j2k_size () const;
+
+private:
+       ASDCP::JP2K::SFrameBuffer* _buffer;
+};
+
 }