diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-03-06 01:01:29 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-03-13 22:29:01 +0000 |
| commit | 0e29e68e94daade47167ac5bc6b51362ef02b5c3 (patch) | |
| tree | accedb6af7c7763086af8abf108655791fce439d /src/mxf.cc | |
| parent | 92d04684c81baa6c56ff3299f1cffd1ac787c71f (diff) | |
Store interop/SMPTE in MXF.
Diffstat (limited to 'src/mxf.cc')
| -rw-r--r-- | src/mxf.cc | 25 |
1 files changed, 23 insertions, 2 deletions
@@ -60,17 +60,27 @@ using namespace dcp; MXF::MXF () : _context_id (make_uuid ()) { + /* Subclasses can create MXFs with unspecified _standard but are expected to fill + _standard in once the MXF is read. + */ +} + +MXF::MXF (Standard standard) + : _context_id (make_uuid ()) + , _standard (standard) +{ } void -MXF::fill_writer_info (ASDCP::WriterInfo* writer_info, string id, Standard standard) const +MXF::fill_writer_info (ASDCP::WriterInfo* writer_info, string id) const { writer_info->ProductVersion = _metadata.product_version; writer_info->CompanyName = _metadata.company_name; writer_info->ProductName = _metadata.product_name.c_str(); - if (standard == INTEROP) { + DCP_ASSERT (_standard); + if (_standard == INTEROP) { writer_info->LabelSetType = ASDCP::LS_MXF_INTEROP; } else { writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE; @@ -117,6 +127,17 @@ MXF::read_writer_info (ASDCP::WriterInfo const & info) _key_id = buffer; } + switch (info.LabelSetType) { + case ASDCP::LS_MXF_INTEROP: + _standard = INTEROP; + break; + case ASDCP::LS_MXF_SMPTE: + _standard = SMPTE; + break; + default: + DCP_ASSERT (false); + } + _metadata.read (info); Kumu::bin2UUIDhex (info.AssetUUID, ASDCP::UUIDlen, buffer, sizeof (buffer)); |
