summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mxf.cc13
-rw-r--r--src/mxf.h2
-rw-r--r--src/picture_mxf.cc16
-rw-r--r--src/picture_mxf.h4
-rw-r--r--src/sound_mxf.cc14
-rw-r--r--src/sound_mxf.h4
6 files changed, 31 insertions, 22 deletions
diff --git a/src/mxf.cc b/src/mxf.cc
index 756f099a..93ff89a5 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -153,16 +153,3 @@ MXF::read_writer_info (ASDCP::WriterInfo const & info)
Kumu::bin2UUIDhex (info.AssetUUID, ASDCP::UUIDlen, buffer, sizeof (buffer));
_id = buffer;
}
-
-string
-MXF::pkl_type (Standard standard) const
-{
- switch (standard) {
- case INTEROP:
- return String::compose ("application/x-smpte-mxf;asdcpKind=%1", asdcp_kind ());
- case SMPTE:
- return "application/mxf";
- default:
- DCP_ASSERT (false);
- }
-}
diff --git a/src/mxf.h b/src/mxf.h
index 65b399b6..068b6036 100644
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -107,8 +107,6 @@ public:
protected:
friend class MXFWriter;
- virtual std::string asdcp_kind () const = 0;
- std::string pkl_type (Standard standard) const;
void read_writer_info (ASDCP::WriterInfo const &);
ASDCP::AESEncContext* _encryption_context;
diff --git a/src/picture_mxf.cc b/src/picture_mxf.cc
index f3a1cd0b..a0de9c64 100644
--- a/src/picture_mxf.cc
+++ b/src/picture_mxf.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
#include "exceptions.h"
#include "xyz_image.h"
#include "picture_mxf_writer.h"
+#include "dcp_assert.h"
#include "compose.hpp"
#include "AS_DCP.h"
#include "KM_fileio.h"
@@ -186,3 +187,16 @@ PictureMXF::frame_buffer_equals (
return true;
}
+
+string
+PictureMXF::pkl_type (Standard standard) const
+{
+ switch (standard) {
+ case INTEROP:
+ return "application/x-smpte-mxf;asdcpKind=Picture";
+ case SMPTE:
+ return "application/mxf";
+ default:
+ DCP_ASSERT (false);
+ }
+}
diff --git a/src/picture_mxf.h b/src/picture_mxf.h
index f2c3192e..fa7936ac 100644
--- a/src/picture_mxf.h
+++ b/src/picture_mxf.h
@@ -117,9 +117,7 @@ protected:
Fraction _screen_aspect_ratio;
private:
- std::string asdcp_kind () const {
- return "Picture";
- }
+ std::string pkl_type (Standard standard) const;
};
diff --git a/src/sound_mxf.cc b/src/sound_mxf.cc
index 6e952bd0..5008da46 100644
--- a/src/sound_mxf.cc
+++ b/src/sound_mxf.cc
@@ -29,6 +29,7 @@
#include "compose.hpp"
#include "KM_fileio.h"
#include "AS_DCP.h"
+#include "dcp_assert.h"
#include <libxml++/nodes/element.h>
#include <boost/filesystem.hpp>
#include <iostream>
@@ -172,3 +173,16 @@ SoundMXF::start_write (boost::filesystem::path file, Standard standard)
/* XXX: can't we use a shared_ptr here? */
return shared_ptr<SoundMXFWriter> (new SoundMXFWriter (this, file, standard));
}
+
+string
+SoundMXF::pkl_type (Standard standard) const
+{
+ switch (standard) {
+ case INTEROP:
+ return "application/x-smpte-mxf;asdcpKind=Sound";
+ case SMPTE:
+ return "application/mxf";
+ default:
+ DCP_ASSERT (false);
+ }
+}
diff --git a/src/sound_mxf.h b/src/sound_mxf.h
index a8746311..42ca2c67 100644
--- a/src/sound_mxf.h
+++ b/src/sound_mxf.h
@@ -74,9 +74,7 @@ public:
private:
friend class SoundMXFWriter;
- std::string asdcp_kind () const {
- return "Sound";
- }
+ std::string pkl_type (Standard standard) const;
Fraction _edit_rate;
/** The total length of this content in video frames. The amount of