summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-09-06 14:10:19 +0100
committerCarl Hetherington <cth@carlh.net>2012-09-06 14:10:19 +0100
commit8f6f5c5c8f09d8aa880c3f2f29530744576212a1 (patch)
tree9f726c3ec1e9e047b9672705d57b0a798584ef7e /src
parent50a7273c4d3cedd582856eeb22c07117b8b8572d (diff)
Add a test corpus for XML.
Diffstat (limited to 'src')
-rw-r--r--src/dcp.cc8
-rw-r--r--src/dcp.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index d3c5367b..95849e48 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -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 ()) {
diff --git a/src/dcp.h b/src/dcp.h
index 2f7a31aa..9e9b1130 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -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);