Missing audio asset decryption.
authorCarl Hetherington <cth@carlh.net>
Wed, 7 Aug 2013 00:14:30 +0000 (01:14 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 7 Aug 2013 00:14:30 +0000 (01:14 +0100)
src/sound_asset.cc
src/sound_frame.cc
src/sound_frame.h

index 0901e915af6fb837e99d48f04a5d483d529b1c46..0d829b75fa022def1177d772dd23be953481a6b5 100644 (file)
@@ -300,7 +300,7 @@ shared_ptr<const SoundFrame>
 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>
index c2a10564d108f465a0db01a56c42bce83e0f6063..77f4c7a8efa63b975917a252df4037c9b17dd35f 100644 (file)
@@ -25,7 +25,7 @@
 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()))) {
@@ -35,7 +35,7 @@ SoundFrame::SoundFrame (string mxf_path, int n)
        /* 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"));
        }
 }
index ad4f9604d2f074094c8de20b290bc554853e9507..9cb8aa0d77f17c0406d7ee69307f829f120c1810 100644 (file)
@@ -34,7 +34,7 @@ namespace libdcp {
 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;