diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-31 00:07:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-31 00:07:08 +0100 |
| commit | d8c9cbec9d87f28da338350880b7618b94f4da81 (patch) | |
| tree | c1e853ab494ac3731982c075046215f670153232 /src/dcp.cc | |
| parent | 9a9d4e014c16be88d72914a9480343445bc785a5 (diff) | |
Bits.
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -35,6 +35,7 @@ #include "exceptions.h" #include "cpl.h" #include "pkl.h" +#include "asset_map.h" using namespace std; using namespace boost; @@ -273,7 +274,43 @@ DCP::DCP (string directory) } } + /* Read the XML */ CPL cpl (cpl_file); PKL pkl (pkl_file); + AssetMap asset_map (asset_map_file); + + /* Cross-check */ + /* XXX */ + + /* Now cherry-pick the required bits into our own data structure */ + + _name = cpl.annotation_text; + _content_kind = cpl.content_kind; + + shared_ptr<CPLAssetList> cpl_assets = cpl.reels.front()->asset_list; + + /* XXX */ + _fps = cpl_assets->main_picture->frame_rate.numerator; + _length = cpl_assets->main_picture->duration; + + _assets.push_back (shared_ptr<PictureAsset> ( + new PictureAsset ( + cpl_assets->main_picture->annotation_text, + _fps, + _length, + cpl_assets->main_picture->screen_aspect_ratio.numerator, + cpl_assets->main_picture->screen_aspect_ratio.denominator + ) + )); + + if (cpl_assets->main_sound) { + _assets.push_back (shared_ptr<SoundAsset> ( + new SoundAsset ( + cpl_assets->main_picture->annotation_text, + _fps, + _length + ) + )); + } } |
