From ea62a0ed4014850cc480e31f70acb6194e35ac30 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 15 Jan 2019 16:40:37 +0000 Subject: [PATCH] Add --encrypted/-e to dcpomatic_create. --- ChangeLog | 4 ++++ src/tools/dcpomatic_create.cc | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e27e10c1..8a7c1a089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2019-01-15 Carl Hetherington + + * Add --encrypt/-e option to dcpomatic_create. + 2019-01-13 Carl Hetherington * Updated nl_NL translation from Rob van Nieuwkerk. diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index aea25618c..4519d8b99 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -59,6 +59,7 @@ syntax (string n) << " -h, --help show this help\n" << " -n, --name film name\n" << " -t, --template template name\n" + << " -e, --encrypt make an encrypted DCP\n" << " -c, --dcp-content-type FTR, SHR, TLR, TST, XSN, RTG, TSR, POL, PSA or ADV\n" << " -f, --dcp-frame-rate set DCP video frame rate (otherwise guessed from content)\n" << " --container-ratio 119, 133, 137, 138, 166, 178, 185 or 239\n" @@ -98,6 +99,7 @@ main (int argc, char* argv[]) string name; optional template_name; + bool encrypt = false; DCPContentType const * dcp_content_type = DCPContentType::from_isdcf_name ("TST"); optional dcp_frame_rate; Ratio const * container_ratio = 0; @@ -116,6 +118,7 @@ main (int argc, char* argv[]) { "help", no_argument, 0, 'h'}, { "name", required_argument, 0, 'n'}, { "template", required_argument, 0, 't'}, + { "encrypt", no_argument, 0, 'e'}, { "dcp-content-type", required_argument, 0, 'c'}, { "dcp-frame-rate", required_argument, 0, 'f'}, { "container-ratio", required_argument, 0, 'A'}, @@ -129,7 +132,7 @@ main (int argc, char* argv[]) { 0, 0, 0, 0} }; - int c = getopt_long (argc, argv, "vhn:t:c:f:A:B:C:s:o:DEF:", long_options, &option_index); + int c = getopt_long (argc, argv, "vhn:t:ec:f:A:B:C:s:o:DEF:", long_options, &option_index); if (c == -1) { break; } @@ -147,6 +150,9 @@ main (int argc, char* argv[]) case 't': template_name = optarg; break; + case 'e': + encrypt = true; + break; case 'c': dcp_content_type = DCPContentType::from_isdcf_name (optarg); if (dcp_content_type == 0) { @@ -245,6 +251,7 @@ main (int argc, char* argv[]) film->set_interop (standard == dcp::INTEROP); film->set_use_isdcf_name (use_isdcf_name); film->set_signed (sign); + film->set_encrypted (encrypt); for (int i = optind; i < argc; ++i) { boost::filesystem::path const can = boost::filesystem::canonical (argv[i]); -- 2.30.2