shared_ptr<SoundAssetWriter>
-SoundAsset::start_write (boost::filesystem::path file, bool atmos_sync)
+SoundAsset::start_write(boost::filesystem::path file, bool atmos_sync, bool include_mca_subdescriptors)
{
if (atmos_sync && _channels < 14) {
throw MiscError ("Insufficient channels to write ATMOS sync (there must be at least 14)");
}
- return shared_ptr<SoundAssetWriter> (new SoundAssetWriter(this, file, atmos_sync));
+ return shared_ptr<SoundAssetWriter>(new SoundAssetWriter(this, file, atmos_sync, include_mca_subdescriptors));
}
explicit SoundAsset (boost::filesystem::path file);
SoundAsset (Fraction edit_rate, int sampling_rate, int channels, LanguageTag language, Standard standard);
- std::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, bool atmos_sync = false);
+ std::shared_ptr<SoundAssetWriter> start_write(boost::filesystem::path file, bool atmos_sync = false, bool include_mca_subdescriptors = true);
std::shared_ptr<SoundAssetReader> start_read () const;
bool equals (
};
-SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path file, bool sync)
+SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path file, bool sync, bool include_mca_subdescriptors)
: AssetWriter (asset, file)
, _state (new SoundAssetWriter::ASDCPState)
, _asset (asset)
, _sync (sync)
+ , _include_mca_subdescriptors(include_mca_subdescriptors)
{
DCP_ASSERT (!_sync || _asset->channels() >= 14);
DCP_ASSERT (!_sync || _asset->standard() == Standard::SMPTE);
boost::throw_exception (FileError("could not open audio MXF for writing", _file.string(), r));
}
- if (_asset->standard() == Standard::SMPTE) {
+ if (_asset->standard() == Standard::SMPTE && _include_mca_subdescriptors) {
ASDCP::MXF::WaveAudioDescriptor* essence_descriptor = nullptr;
_state->mxf_writer.OP1aHeader().GetMDObjectByType(
friend class SoundAsset;
friend struct ::sync_test1;
- SoundAssetWriter (SoundAsset *, boost::filesystem::path, bool sync);
+ SoundAssetWriter(SoundAsset *, boost::filesystem::path, bool sync, bool include_mca_subdescriptors);
void start ();
void write_current_frame ();
/** index of the sync packet (0-3) which starts the next edit unit */
int _sync_packet = 0;
FSK _fsk;
+ bool _include_mca_subdescriptors = true;
};
}