#include <asdcp/AS_DCP.h>
#include <libxml++/nodes/element.h>
#include <boost/filesystem.hpp>
-#include <iostream>
#include <stdexcept>
using std::string;
-using std::stringstream;
-using std::ostream;
using std::vector;
using std::list;
using boost::shared_ptr;
_id = read_writer_info (info);
}
-SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels)
- : _edit_rate (edit_rate)
+SoundAsset::SoundAsset (Fraction edit_rate, int sampling_rate, int channels, Standard standard)
+ : MXF (standard)
+ , _edit_rate (edit_rate)
, _intrinsic_duration (0)
, _channels (channels)
, _sampling_rate (sampling_rate)
SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
ASDCP::PCM::MXFReader reader_A;
- Kumu::Result_t r = reader_A.OpenRead (file().string().c_str());
+ DCP_ASSERT (file ());
+ Kumu::Result_t r = reader_A.OpenRead (file()->string().c_str());
if (ASDCP_FAILURE (r)) {
- boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
+ boost::throw_exception (MXFFileError ("could not open MXF file for reading", file()->string(), r));
}
ASDCP::PCM::MXFReader reader_B;
- r = reader_B.OpenRead (other->file().string().c_str());
+ r = reader_B.OpenRead (other->file()->string().c_str());
if (ASDCP_FAILURE (r)) {
- boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
+ boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file()->string(), r));
}
ASDCP::PCM::AudioDescriptor desc_A;
}
shared_ptr<SoundAssetWriter>
-SoundAsset::start_write (boost::filesystem::path file, Standard standard)
+SoundAsset::start_write (boost::filesystem::path file)
{
/* XXX: can't we use a shared_ptr here? */
- return shared_ptr<SoundAssetWriter> (new SoundAssetWriter (this, file, standard));
+ return shared_ptr<SoundAssetWriter> (new SoundAssetWriter (this, file));
}
shared_ptr<SoundAssetReader>
SoundAsset::start_read () const
{
- return shared_ptr<SoundAssetReader> (new SoundAssetReader (this));
+ return shared_ptr<SoundAssetReader> (new SoundAssetReader (this, key(), standard()));
}
string
-SoundAsset::pkl_type (Standard standard) const
+SoundAsset::static_pkl_type (Standard standard)
{
switch (standard) {
case INTEROP: