summaryrefslogtreecommitdiff
path: root/src/mxf.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-26 21:35:02 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-26 21:35:02 +0000
commit59886567974bd3e79d30a4a9425d86d50bf425f3 (patch)
tree68e583a64144f5cbffede882e1187ecf737b2e43 /src/mxf.cc
parent0703842433013ac1d5f79c09d7a8361dc2e565c8 (diff)
It builds again.
Diffstat (limited to 'src/mxf.cc')
-rw-r--r--src/mxf.cc41
1 files changed, 15 insertions, 26 deletions
diff --git a/src/mxf.cc b/src/mxf.cc
index fa3aed8b..42d92536 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -21,10 +21,6 @@
* @brief Parent class for assets of DCPs made up of MXF files.
*/
-#include <iostream>
-#include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
-#include <libxml++/nodes/element.h>
#include "AS_DCP.h"
#include "KM_prng.h"
#include "KM_util.h"
@@ -33,6 +29,10 @@
#include "metadata.h"
#include "exceptions.h"
#include "kdm.h"
+#include <libxml++/nodes/element.h>
+#include <boost/filesystem.hpp>
+#include <boost/lexical_cast.hpp>
+#include <iostream>
using std::string;
using std::list;
@@ -42,12 +42,20 @@ using boost::lexical_cast;
using boost::dynamic_pointer_cast;
using namespace dcp;
+MXF::MXF (Fraction edit_rate)
+ : Content (edit_rate)
+ , _progress (0)
+ , _encryption_context (0)
+ , _decryption_context (0)
+{
+
+}
+
MXF::MXF (boost::filesystem::path file)
: Content (file)
, _progress (0)
, _encryption_context (0)
, _decryption_context (0)
- , _interop (false)
{
}
@@ -59,13 +67,13 @@ MXF::~MXF ()
}
void
-MXF::fill_writer_info (ASDCP::WriterInfo* writer_info)
+MXF::fill_writer_info (ASDCP::WriterInfo* writer_info, Standard standard)
{
writer_info->ProductVersion = _metadata.product_version;
writer_info->CompanyName = _metadata.company_name;
writer_info->ProductName = _metadata.product_name.c_str();
- if (_interop) {
+ if (standard == INTEROP) {
writer_info->LabelSetType = ASDCP::LS_MXF_INTEROP;
} else {
writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
@@ -108,25 +116,6 @@ MXF::equals (shared_ptr<const Content> other, EqualityOptions opt, boost::functi
}
void
-MXF::write_to_cpl (xmlpp::Element* node) const
-{
- pair<string, string> const attr = cpl_node_attribute ();
- xmlpp::Element* a = node->add_child (cpl_node_name ());
- if (!attr.first.empty ()) {
- a->set_attribute (attr.first, attr.second);
- }
- a->add_child ("Id")->add_child_text ("urn:uuid:" + _id);
- a->add_child ("AnnotationText")->add_child_text (_file.string ());
- a->add_child ("EditRate")->add_child_text (lexical_cast<string> (_edit_rate) + " 1");
- a->add_child ("IntrinsicDuration")->add_child_text (lexical_cast<string> (_intrinsic_duration));
- a->add_child ("EntryPoint")->add_child_text (lexical_cast<string> (_entry_point));
- a->add_child ("Duration")->add_child_text (lexical_cast<string> (_duration));
- if (!_key_id.empty ()) {
- a->add_child("KeyId")->add_child_text ("urn:uuid:" + _key_id);
- }
-}
-
-void
MXF::set_key (Key key)
{
_key = key;