Try to fix build of previous.
[libdcp.git] / src / stereo_picture_frame.cc
index f001c00bd99b8953641882c5314fd03174ae53e8..72f59b36bbce6dd116ed3d783b9794c2875cd8da 100644 (file)
 #include "util.h"
 #include "rgb_xyz.h"
 #include "colour_conversion.h"
-#include "AS_DCP.h"
-#include "KM_fileio.h"
 #include "compose.hpp"
 #include "j2k.h"
+#include "crypto_context.h"
+#include <asdcp/AS_DCP.h>
+#include <asdcp/KM_fileio.h>
 
 using std::string;
 using boost::shared_ptr;
@@ -49,12 +50,12 @@ using namespace dcp;
  *  @param reader Reader for the MXF file.
  *  @param n Frame within the asset, not taking EntryPoint into account.
  */
-StereoPictureFrame::StereoPictureFrame (ASDCP::JP2K::MXFSReader* reader, int n, ASDCP::AESDecContext* c)
+StereoPictureFrame::StereoPictureFrame (ASDCP::JP2K::MXFSReader* reader, int n, shared_ptr<DecryptionContext> c)
 {
        /* XXX: unfortunate guesswork on this buffer size */
        _buffer = new ASDCP::JP2K::SFrameBuffer (4 * Kumu::Megabyte);
 
-       if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) {
+       if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->context(), c->hmac()))) {
                boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1 of %2", n)));
        }
 }
@@ -78,9 +79,9 @@ shared_ptr<OpenJPEGImage>
 StereoPictureFrame::xyz_image (Eye eye, int reduce) const
 {
        switch (eye) {
-       case LEFT:
+       case EYE_LEFT:
                return decompress_j2k (const_cast<uint8_t*> (_buffer->Left.RoData()), _buffer->Left.Size(), reduce);
-       case RIGHT:
+       case EYE_RIGHT:
                return decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), reduce);
        }