#include "exceptions.h"
#include "dcp_assert.h"
#include "compose.hpp"
-#include "encryption_context.h"
+#include "crypto_context.h"
#include <asdcp/AS_DCP.h>
#include <iostream>
ASDCP::PCM::AudioDescriptor desc;
};
-SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path file, Standard standard)
- : AssetWriter (asset, file, standard)
+SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path file)
+ : AssetWriter (asset, file)
, _state (new SoundAssetWriter::ASDCPState)
, _asset (asset)
, _frame_buffer_offset (0)
_state->desc.BlockAlign = 3 * _asset->channels();
_state->desc.AvgBps = _asset->sampling_rate() * _state->desc.BlockAlign;
_state->desc.LinkedTrackID = 0;
- if (standard == INTEROP) {
+ if (asset->standard() == INTEROP) {
_state->desc.ChannelFormat = ASDCP::PCM::CF_NONE;
} else {
/* Just use WTF ("wild track format") for SMPTE for now; searches suggest that this
_state->frame_buffer.Size (ASDCP::PCM::CalcFrameBufferSize (_state->desc));
memset (_state->frame_buffer.Data(), 0, _state->frame_buffer.Capacity());
- _asset->fill_writer_info (&_state->writer_info, _asset->id(), standard);
+ _asset->fill_writer_info (&_state->writer_info, _asset->id());
}
void
void
SoundAssetWriter::write_current_frame ()
{
- ASDCP::Result_t const r = _state->mxf_writer.WriteFrame (_state->frame_buffer, _encryption_context->encryption(), _encryption_context->hmac());
+ ASDCP::Result_t const r = _state->mxf_writer.WriteFrame (_state->frame_buffer, _crypto_context->context(), _crypto_context->hmac());
if (ASDCP_FAILURE (r)) {
boost::throw_exception (MiscError (String::compose ("could not write audio MXF frame (%1)", int (r))));
}