diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-06 14:10:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-06 14:10:19 +0100 |
| commit | 8f6f5c5c8f09d8aa880c3f2f29530744576212a1 (patch) | |
| tree | 9f726c3ec1e9e047b9672705d57b0a798584ef7e /src | |
| parent | 50a7273c4d3cedd582856eeb22c07117b8b8572d (diff) | |
Add a test corpus for XML.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 8 | ||||
| -rw-r--r-- | src/dcp.h | 4 |
2 files changed, 7 insertions, 5 deletions
@@ -214,7 +214,7 @@ DCP::write_assetmap (string cpl_uuid, int cpl_length, string pkl_uuid, int pkl_l } -DCP::DCP (string directory) +DCP::DCP (string directory, bool read_mxfs) : _directory (directory) { Files files; @@ -282,7 +282,7 @@ DCP::DCP (string directory) shared_ptr<SoundAsset> sound; shared_ptr<SubtitleAsset> subtitle; - if ((*i)->asset_list->main_picture) { + if (read_mxfs && (*i)->asset_list->main_picture) { string n = pkl->asset_from_id (p->id)->original_file_name; if (n.empty ()) { @@ -298,7 +298,7 @@ DCP::DCP (string directory) ) ); - } else if ((*i)->asset_list->main_stereoscopic_picture) { + } else if (read_mxfs && (*i)->asset_list->main_stereoscopic_picture) { string n = pkl->asset_from_id (p->id)->original_file_name; if (n.empty ()) { @@ -316,7 +316,7 @@ DCP::DCP (string directory) } - if ((*i)->asset_list->main_sound) { + if (read_mxfs && (*i)->asset_list->main_sound) { string n = pkl->asset_from_id ((*i)->asset_list->main_sound->id)->original_file_name; if (n.empty ()) { @@ -69,8 +69,10 @@ public: * of the DCP. * * @param directory Existing DCP's directory. + * @param read_mxfs true to read MXF files; setting to false can be useful for testing, but + * normally it should be set to true. */ - DCP (std::string directory); + DCP (std::string directory, bool read_mxfs = true); void add_reel (boost::shared_ptr<const Reel> reel); |
