diff options
Diffstat (limited to 'src/cpl.cc')
| -rw-r--r-- | src/cpl.cc | 68 |
1 files changed, 34 insertions, 34 deletions
@@ -21,9 +21,9 @@ #include "cpl.h" #include "parse/cpl.h" #include "util.h" -#include "mono_picture_asset.h" -#include "stereo_picture_asset.h" -#include "sound_asset.h" +#include "mono_picture_mxf.h" +#include "stereo_picture_mxf.h" +#include "sound_mxf.h" #include "subtitle_asset.h" #include "parse/asset_map.h" #include "reel.h" @@ -41,7 +41,7 @@ using std::make_pair; using boost::shared_ptr; using boost::lexical_cast; using boost::optional; -using namespace libdcp; +using namespace dcp; CPL::CPL (boost::filesystem::path directory, string name, ContentKind content_kind, int length, int frames_per_second) : _directory (directory) @@ -50,7 +50,7 @@ CPL::CPL (boost::filesystem::path directory, string name, ContentKind content_ki , _length (length) , _fps (frames_per_second) { - _id = make_uuid (); + } /** Construct a CPL object from a XML file. @@ -94,8 +94,8 @@ CPL::CPL (boost::filesystem::path directory, string file, list<PathAssetMap> ass _fps = p->edit_rate.numerator; _length += p->duration; - shared_ptr<PictureAsset> picture; - shared_ptr<SoundAsset> sound; + shared_ptr<PictureMXF> picture; + shared_ptr<SoundMXF> sound; shared_ptr<SubtitleAsset> subtitle; /* Some rather twisted logic to decide if we are 3D or not; @@ -109,15 +109,15 @@ CPL::CPL (boost::filesystem::path directory, string file, list<PathAssetMap> ass try { pair<string, shared_ptr<const parse::AssetMapAsset> > asset = asset_from_id (asset_maps, p->id); - picture.reset (new MonoPictureAsset (asset.first, asset.second->chunks.front()->path)); +// picture.reset (new MonoPictureMXF (asset.first, asset.second->chunks.front()->path)); - picture->read (); - picture->set_edit_rate (_fps); - picture->set_entry_point (p->entry_point); - picture->set_duration (p->duration); +// picture->read (); +// picture->set_edit_rate (_fps); +// picture->set_entry_point (p->entry_point); +// picture->set_duration (p->duration); if (p->key_id.length() > 9) { /* Trim urn:uuid: */ - picture->set_key_id (p->key_id.substr (9)); +// picture->set_key_id (p->key_id.substr (9)); } } catch (MXFFileError) { if (require_mxfs) { @@ -129,15 +129,15 @@ CPL::CPL (boost::filesystem::path directory, string file, list<PathAssetMap> ass try { pair<string, shared_ptr<const parse::AssetMapAsset> > asset = asset_from_id (asset_maps, p->id); - picture.reset (new StereoPictureAsset (asset.first, asset.second->chunks.front()->path)); +// picture.reset (new StereoPictureMXF (asset.first, asset.second->chunks.front()->path)); - picture->read (); - picture->set_edit_rate (_fps); - picture->set_entry_point (p->entry_point); - picture->set_duration (p->duration); +// picture->read (); +// picture->set_edit_rate (_fps); +// picture->set_entry_point (p->entry_point); +// picture->set_duration (p->duration); if (p->key_id.length() > 9) { /* Trim urn:uuid: */ - picture->set_key_id (p->key_id.substr (9)); +// picture->set_key_id (p->key_id.substr (9)); } } catch (MXFFileError) { @@ -153,16 +153,16 @@ CPL::CPL (boost::filesystem::path directory, string file, list<PathAssetMap> ass try { pair<string, shared_ptr<const parse::AssetMapAsset> > asset = asset_from_id (asset_maps, (*i)->asset_list->main_sound->id); - sound.reset (new SoundAsset (asset.first, asset.second->chunks.front()->path)); - shared_ptr<parse::MainSound> s = (*i)->asset_list->main_sound; +// sound.reset (new SoundMXF (asset.first, asset.second->chunks.front()->path)); +// shared_ptr<parse::MainSound> s = (*i)->asset_list->main_sound; - sound->read (); - sound->set_entry_point (s->entry_point); - sound->set_duration (s->duration); - if (s->key_id.length() > 9) { +// sound->read (); +// sound->set_entry_point (s->entry_point); +// sound->set_duration (s->duration); +// if (s->key_id.length() > 9) { /* Trim urn:uuid: */ - sound->set_key_id (s->key_id.substr (9)); - } +// sound->set_key_id (s->key_id.substr (9)); +// } } catch (MXFFileError) { if (require_mxfs) { throw; @@ -172,15 +172,15 @@ CPL::CPL (boost::filesystem::path directory, string file, list<PathAssetMap> ass if ((*i)->asset_list->main_subtitle) { - pair<string, shared_ptr<const parse::AssetMapAsset> > asset = asset_from_id (asset_maps, (*i)->asset_list->main_subtitle->id); +// pair<string, shared_ptr<const parse::AssetMapAsset> > asset = asset_from_id (asset_maps, (*i)->asset_list->main_subtitle->id); - subtitle.reset (new SubtitleAsset (asset.first, asset.second->chunks.front()->path)); +// subtitle.reset (new SubtitleAsset (asset.first, asset.second->chunks.front()->path)); - subtitle->set_entry_point ((*i)->asset_list->main_subtitle->entry_point); - subtitle->set_duration ((*i)->asset_list->main_subtitle->duration); +// subtitle->set_entry_point ((*i)->asset_list->main_subtitle->entry_point); +// subtitle->set_duration ((*i)->asset_list->main_subtitle->duration); } - _reels.push_back (shared_ptr<Reel> (new Reel (picture, sound, subtitle))); +// _reels.push_back (shared_ptr<Reel> (new Reel (picture, sound, subtitle))); } } @@ -252,10 +252,10 @@ CPL::write_to_pkl (xmlpp::Node* node) const asset->add_child("Type")->add_child_text ("text/xml"); } -list<shared_ptr<const Asset> > +list<shared_ptr<const Content> > CPL::assets () const { - list<shared_ptr<const Asset> > a; + list<shared_ptr<const Content> > a; for (list<shared_ptr<Reel> >::const_iterator i = _reels.begin(); i != _reels.end(); ++i) { if ((*i)->main_picture ()) { a.push_back ((*i)->main_picture ()); |
