summaryrefslogtreecommitdiff
path: root/src/stereo_picture_frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/stereo_picture_frame.cc')
-rw-r--r--src/stereo_picture_frame.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc
index 8573084f..c5b199ab 100644
--- a/src/stereo_picture_frame.cc
+++ b/src/stereo_picture_frame.cc
@@ -33,22 +33,16 @@ using boost::shared_ptr;
using namespace dcp;
/** Make a picture frame from a 3D (stereoscopic) asset.
- * @param mxf_path Path to the asset's MXF file.
+ * @param reader Reader for the MXF file.
* @param n Frame within the asset, not taking EntryPoint into account.
*/
-StereoPictureFrame::StereoPictureFrame (boost::filesystem::path path, int n)
+StereoPictureFrame::StereoPictureFrame (ASDCP::JP2K::MXFSReader* reader, int n, ASDCP::AESDecContext* c)
{
- ASDCP::JP2K::MXFSReader reader;
- Kumu::Result_t r = reader.OpenRead (path.string().c_str());
- if (ASDCP_FAILURE (r)) {
- boost::throw_exception (FileError ("could not open MXF file for reading", path, r));
- }
-
/* XXX: unfortunate guesswork on this buffer size */
_buffer = new ASDCP::JP2K::SFrameBuffer (4 * Kumu::Megabyte);
- if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) {
- boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1 of %2", n, path.string())));
+ if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) {
+ boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1 of %2", n)));
}
}