SoundAsset::get_frame (int n) const
{
/* XXX: should add on entry point here? */
- return shared_ptr<const SoundFrame> (new SoundFrame (path().string(), n));
+ return shared_ptr<const SoundFrame> (new SoundFrame (path().string(), n, _decryption_context));
}
shared_ptr<SoundAssetWriter>
using namespace std;
using namespace libdcp;
-SoundFrame::SoundFrame (string mxf_path, int n)
+SoundFrame::SoundFrame (string mxf_path, int n, ASDCP::AESDecContext* c)
{
ASDCP::PCM::MXFReader reader;
if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) {
/* XXX: unfortunate guesswork on this buffer size */
_buffer = new ASDCP::PCM::FrameBuffer (1 * Kumu::Megabyte);
- if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer))) {
+ if (ASDCP_FAILURE (reader.ReadFrame (n, *_buffer, c))) {
boost::throw_exception (DCPReadError ("could not read audio frame"));
}
}
class SoundFrame
{
public:
- SoundFrame (std::string mxf_path, int n);
+ SoundFrame (std::string mxf_path, int n, ASDCP::AESDecContext *);
~SoundFrame ();
uint8_t const * data () const;