summaryrefslogtreecommitdiff
path: root/src/sound_frame.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-14 23:59:16 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-14 23:59:16 +0100
commit9486066c29b91a8d9ac25be1c596cad62387208f (patch)
tree181a41967df7a2ccd41ab8ed14d6c99171850bdc /src/sound_frame.cc
parent563dbf02e9c7ab0066bcebbcde6c662df845695a (diff)
Support reading of encrypted subtitles.
Diffstat (limited to 'src/sound_frame.cc')
-rw-r--r--src/sound_frame.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sound_frame.cc b/src/sound_frame.cc
index 83b053b2..132d25bd 100644
--- a/src/sound_frame.cc
+++ b/src/sound_frame.cc
@@ -37,18 +37,19 @@
#include "sound_frame.h"
#include "exceptions.h"
+#include "decryption_context.h"
#include <asdcp/AS_DCP.h>
#include <asdcp/KM_fileio.h>
-using namespace std;
using namespace dcp;
+using boost::shared_ptr;
-SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader, int n, ASDCP::AESDecContext* c)
+SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader, int n, shared_ptr<DecryptionContext> c)
{
/* XXX: unfortunate guesswork on this buffer size */
_buffer = new ASDCP::PCM::FrameBuffer (1 * Kumu::Megabyte);
- if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c))) {
+ if (ASDCP_FAILURE (reader->ReadFrame (n, *_buffer, c->decryption()))) {
boost::throw_exception (DCPReadError ("could not read audio frame"));
}
}