diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-14 23:59:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-14 23:59:16 +0100 |
| commit | 9486066c29b91a8d9ac25be1c596cad62387208f (patch) | |
| tree | 181a41967df7a2ccd41ab8ed14d6c99171850bdc /src/mono_picture_frame.cc | |
| parent | 563dbf02e9c7ab0066bcebbcde6c662df845695a (diff) | |
Support reading of encrypted subtitles.
Diffstat (limited to 'src/mono_picture_frame.cc')
| -rw-r--r-- | src/mono_picture_frame.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc index fd095a1f..79527280 100644 --- a/src/mono_picture_frame.cc +++ b/src/mono_picture_frame.cc @@ -42,6 +42,7 @@ #include "colour_conversion.h" #include "compose.hpp" #include "j2k.h" +#include "decryption_context.h" #include <asdcp/KM_fileio.h> #include <asdcp/AS_DCP.h> @@ -73,12 +74,12 @@ MonoPictureFrame::MonoPictureFrame (boost::filesystem::path path) * @param n Frame within the asset, not taking EntryPoint into account. * @param c Context for decryption, or 0. */ -MonoPictureFrame::MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, ASDCP::AESDecContext* c) +MonoPictureFrame::MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, shared_ptr<DecryptionContext> c) { /* XXX: unfortunate guesswork on this buffer size */ _buffer = new ASDCP::JP2K::FrameBuffer (4 * Kumu::Megabyte); - if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) { + if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->decryption()))) { boost::throw_exception (DCPReadError (String::compose ("could not read video frame %1", n))); } } |
