summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-20 20:20:36 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-20 20:20:36 +0100
commit65013fcc46474df4c11f69b674e79af465688531 (patch)
treef2844b35faf9a793e0e198bf790a6163e65fa1b0 /src/sound_asset.cc
parent30e2f6f873002d16aeae707879ea15c1c63a4323 (diff)
More encryption fixes.
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 6f74e54a..026c44ef 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -316,6 +316,7 @@ struct SoundAssetWriter::ASDCPState
ASDCP::PCM::FrameBuffer frame_buffer;
ASDCP::WriterInfo writer_info;
ASDCP::PCM::AudioDescriptor audio_desc;
+ ASDCP::AESEncContext* encryption_context;
};
SoundAssetWriter::SoundAssetWriter (SoundAsset* a, bool interop, MXFMetadata const & m)
@@ -326,6 +327,8 @@ SoundAssetWriter::SoundAssetWriter (SoundAsset* a, bool interop, MXFMetadata con
, _frame_buffer_offset (0)
, _metadata (m)
{
+ _state->encryption_context = a->encryption_context ();
+
/* Derived from ASDCP::Wav::SimpleWaveHeader::FillADesc */
_state->audio_desc.EditRate = ASDCP::Rational (_asset->edit_rate(), 1);
_state->audio_desc.AudioSamplingRate = ASDCP::Rational (_asset->sampling_rate(), 1);
@@ -378,7 +381,7 @@ SoundAssetWriter::write (float const * const * data, int frames)
void
SoundAssetWriter::write_current_frame ()
{
- if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, 0, 0))) {
+ if (ASDCP_FAILURE (_state->mxf_writer.WriteFrame (_state->frame_buffer, _state->encryption_context, 0))) {
boost::throw_exception (MiscError ("could not write audio MXF frame"));
}