summaryrefslogtreecommitdiff
path: root/src/tools/dcpomatic.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-03-07 10:18:31 +0000
committerCarl Hetherington <cth@carlh.net>2017-03-07 10:18:31 +0000
commite340b96b4a33725e70e3703b0c60ba8da95bca3b (patch)
treebddbe1231a7417f872d19c9bf77e500db45bb0d0 /src/tools/dcpomatic.cc
parent443a7d74ff2a49ad45a4fb44f92abd619bc0a0b0 (diff)
parente4d7f575fab50b6d255821d6d6a8171c8e1f13f6 (diff)
Merge.
Diffstat (limited to 'src/tools/dcpomatic.cc')
-rw-r--r--src/tools/dcpomatic.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index d091512a0..92de9a1f0 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -61,6 +61,7 @@
#include "lib/cinema_kdms.h"
#include "lib/dcpomatic_socket.h"
#include "lib/hints.h"
+#include "lib/dcp_content.h"
#include <dcp/exceptions.h>
#include <dcp/raw_convert.h>
#include <wx/generic/aboutdlgg.h>
@@ -1029,7 +1030,8 @@ private:
static const wxCmdLineEntryDesc command_line_description[] = {
{ wxCMD_LINE_SWITCH, "n", "new", "create new film", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
- { wxCMD_LINE_OPTION, "c", "content", "add content file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_OPTION, "c", "content", "add content file / directory", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
+ { wxCMD_LINE_OPTION, "d", "dcp", "add content DCP", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{ wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
};
@@ -1127,6 +1129,9 @@ private:
_frame->film()->examine_and_add_content (i);
}
}
+ if (!_dcp_to_add.empty ()) {
+ _frame->film()->examine_and_add_content (shared_ptr<DCPContent> (new DCPContent (_frame->film(), _dcp_to_add)));
+ }
}
signal_manager = new wxSignalManager (this);
@@ -1169,6 +1174,11 @@ private:
_content_to_add = wx_to_std (content);
}
+ wxString dcp;
+ if (parser.Found (wxT ("dcp"), &dcp)) {
+ _dcp_to_add = wx_to_std (dcp);
+ }
+
return true;
}
@@ -1235,6 +1245,7 @@ private:
string _film_to_load;
string _film_to_create;
string _content_to_add;
+ string _dcp_to_add;
};
IMPLEMENT_APP (App)