From dfc8606c2f4d9ea6e162572d8b67b9c86c7b38bc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 6 Aug 2015 18:54:17 +0100 Subject: [PATCH] Add --no-sign and --no-use-isdcf-name to dcpomatic_create. --- ChangeLog | 2 ++ src/tools/dcpomatic_create.cc | 31 ++++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48650392b..d28f03f86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * Make dcpomatic_create assign a default name if none is specified. Fix dcpomatic_create help. + * Add --no-sign and --no-use-isdcf-name to dcpomatic_create. + 2015-08-05 Carl Hetherington * Version 2.1.35 released. diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index fc2282edc..6c479e698 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -17,12 +17,6 @@ */ -#include -#include -#include -#include -#include -#include #include "lib/version.h" #include "lib/film.h" #include "lib/util.h" @@ -33,6 +27,12 @@ #include "lib/dcp_content_type.h" #include "lib/ratio.h" #include "lib/image_content.h" +#include +#include +#include +#include +#include +#include using std::string; using std::cout; @@ -54,6 +54,8 @@ syntax (string n) << " --content-ratio 119, 133, 137, 138, 166, 178, 185 or 239\n" << " -s, --still-length number of seconds that still content should last\n" << " --standard SMPTE or interop (default SMPTE)\n" + << " --no-use-isdcf-name do not use an ISDCF name; use the specified name unmodified\n" + << " --no-sign do not sign the DCP\n" << " -o, --output output directory\n"; } @@ -88,6 +90,8 @@ main (int argc, char* argv[]) int still_length = 10; dcp::Standard standard = dcp::SMPTE; boost::filesystem::path output; + bool sign = true; + bool use_isdcf_name = true; int option_index = 0; while (true) { @@ -100,11 +104,13 @@ main (int argc, char* argv[]) { "content-ratio", required_argument, 0, 'B'}, { "still-length", required_argument, 0, 's'}, { "standard", required_argument, 0, 'C'}, + { "no-use-isdcf-name", no_argument, 0, 'D'}, + { "no-sign", no_argument, 0, 'E'}, { "output", required_argument, 0, 'o'}, { 0, 0, 0, 0} }; - int c = getopt_long (argc, argv, "vhn:c:A:B:C:s:o:", long_options, &option_index); + int c = getopt_long (argc, argv, "vhn:c:A:B:C:s:o:DE", long_options, &option_index); if (c == -1) { break; } @@ -152,12 +158,21 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } break; + case 'D': + use_isdcf_name = false; + break; + case 'E': + sign = false; + break; case 's': still_length = atoi (optarg); break; case 'o': output = optarg; break; + case '?': + syntax (argv[0]); + exit (EXIT_FAILURE); } } @@ -193,6 +208,8 @@ main (int argc, char* argv[]) film->set_container (container_ratio); film->set_dcp_content_type (dcp_content_type); film->set_interop (standard == dcp::INTEROP); + film->set_use_isdcf_name (use_isdcf_name); + film->set_signed (sign); for (int i = optind; i < argc; ++i) { shared_ptr c = content_factory (film, argv[i]); -- 2.30.2