/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
-/** @file src/asset.cc
- * @brief Parent class for assets of DCPs made up of MXF files.
+
+/** @file src/mxf.cc
+ * @brief MXF class
*/
+
#include "raw_convert.h"
#include "mxf.h"
#include "util.h"
#include <boost/filesystem.hpp>
#include <iostream>
+
using std::string;
using std::cout;
using std::list;
using std::pair;
-using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::dynamic_pointer_cast;
using namespace dcp;
+
MXF::MXF ()
: _context_id (make_uuid ())
{
*/
}
+
MXF::MXF (Standard standard)
: _context_id (make_uuid ())
, _standard (standard)
}
+
void
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();
+ writer_info->ProductName = _metadata.product_name;
DCP_ASSERT (_standard);
- if (_standard == INTEROP) {
+ if (_standard == Standard::INTEROP) {
writer_info->LabelSetType = ASDCP::LS_MXF_INTEROP;
} else {
writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
}
}
-/** Set the (private) key that will be used to encrypt or decrypt this MXF's content.
- * This is the top-secret key that is distributed (itself encrypted) to cinemas
- * via Key Delivery Messages (KDMs).
- * @param key Key to use.
- */
+
void
MXF::set_key (Key key)
{
}
}
+
string
MXF::read_writer_info (ASDCP::WriterInfo const & info)
{
switch (info.LabelSetType) {
case ASDCP::LS_MXF_INTEROP:
- _standard = INTEROP;
+ _standard = Standard::INTEROP;
break;
case ASDCP::LS_MXF_SMPTE:
- _standard = SMPTE;
+ _standard = Standard::SMPTE;
break;
default:
throw ReadError ("Unrecognised label set type in MXF");