#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>
using namespace dcp;
SoundMXF::SoundMXF (boost::filesystem::path file)
- : MXF (file)
+ : Asset (file)
+ , _intrinsic_duration (0)
, _channels (0)
, _sampling_rate (0)
{
boost::throw_exception (DCPReadError ("could not read audio MXF information"));
}
- read_writer_info (info);
-
+ _id = read_writer_info (info);
}
SoundMXF::SoundMXF (Fraction edit_rate, int sampling_rate, int channels)
- : MXF (edit_rate)
+ : _edit_rate (edit_rate)
+ , _intrinsic_duration (0)
, _channels (channels)
, _sampling_rate (sampling_rate)
{
}
bool
-SoundMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+SoundMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
- if (!MXF::equals (other, opt, note)) {
- return false;
- }
-
ASDCP::PCM::MXFReader reader_A;
Kumu::Result_t r = reader_A.OpenRead (file().string().c_str());
if (ASDCP_FAILURE (r)) {
/* 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);
+ }
+}