summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-14 23:17:24 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-14 23:28:26 +0000
commit71a358ce70bf9156e895f3dc6515e65628950422 (patch)
tree77d8bbe95320e099e733945cdd19ac4a638543ba /src
parent85d72a25071f7b5a5d93a2d91f245b0cc7ffbe3b (diff)
Adapt for changes to disable_forensic variable types in libdcp.
Diffstat (limited to 'src')
-rw-r--r--src/lib/film.cc14
-rw-r--r--src/lib/film.h8
-rw-r--r--src/tools/dcpomatic.cc4
-rw-r--r--src/tools/dcpomatic_kdm_cli.cc24
4 files changed, 28 insertions, 22 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 23c83d037..332353b71 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1205,6 +1205,9 @@ Film::frame_size () const
* @param from KDM from time expressed as a local time with an offset from UTC.
* @param until KDM to time expressed as a local time with an offset from UTC.
* @param formulation KDM formulation to use.
+ * @param disable_forensic_marking_picture true to disable forensic marking of picture.
+ * @param disable_forensic_marking_audio if not set, don't disable forensic marking of audio. If set to 0,
+ * disable all forensic marking; if set above 0, disable forensic marking above that channel.
*/
dcp::EncryptedKDM
Film::make_kdm (
@@ -1214,8 +1217,8 @@ Film::make_kdm (
dcp::LocalTime from,
dcp::LocalTime until,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio
+ bool disable_forensic_marking_picture,
+ optional<int> disable_forensic_marking_audio
) const
{
if (!_encrypted) {
@@ -1274,6 +1277,9 @@ Film::make_kdm (
* @param from KDM from time expressed as a local time in the time zone of the Screen's Cinema.
* @param until KDM to time expressed as a local time in the time zone of the Screen's Cinema.
* @param formulation KDM formulation to use.
+ * @param disable_forensic_marking_picture true to disable forensic marking of picture.
+ * @param disable_forensic_marking_audio if not set, don't disable forensic marking of audio. If set to 0,
+ * disable all forensic marking; if set above 0, disable forensic marking above that channel.
*/
list<ScreenKDM>
Film::make_kdms (
@@ -1282,8 +1288,8 @@ Film::make_kdms (
boost::posix_time::ptime from,
boost::posix_time::ptime until,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio
+ bool disable_forensic_marking_picture,
+ optional<int> disable_forensic_marking_audio
) const
{
list<ScreenKDM> kdms;
diff --git a/src/lib/film.h b/src/lib/film.h
index 67bcfbbdf..355a41da5 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -131,8 +131,8 @@ public:
dcp::LocalTime from,
dcp::LocalTime until,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio
+ bool disable_forensic_marking_picture,
+ boost::optional<int> disable_forensic_marking_audio
) const;
std::list<ScreenKDM> make_kdms (
@@ -141,8 +141,8 @@ public:
boost::posix_time::ptime from,
boost::posix_time::ptime until,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio
+ bool disable_forensic_marking_picture,
+ boost::optional<int> disable_forensic_marking_audio
) const;
int state_version () const {
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 4d6b38d5c..05534cc60 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -733,8 +733,8 @@ private:
dcp::LocalTime ("2012-01-01T01:00:00+00:00"),
dcp::LocalTime ("2112-01-01T01:00:00+00:00"),
dcp::MODIFIED_TRANSITIONAL_1,
- -1,
- -1
+ true,
+ 0
);
} catch (dcp::NotEncryptedError& e) {
error_dialog (this, _("CPL's content is not encrypted."));
diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc
index fbd6bb870..f632d808a 100644
--- a/src/tools/dcpomatic_kdm_cli.cc
+++ b/src/tools/dcpomatic_kdm_cli.cc
@@ -194,8 +194,8 @@ from_film (
boost::posix_time::ptime valid_from,
boost::posix_time::ptime valid_to,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio,
+ bool disable_forensic_marking_picture,
+ optional<int> disable_forensic_marking_audio,
bool zip
)
{
@@ -277,8 +277,8 @@ kdm_from_dkdm (
dcp::LocalTime valid_from,
dcp::LocalTime valid_to,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio
+ bool disable_forensic_marking_picture,
+ optional<int> disable_forensic_marking_audio
)
{
/* Signer for new KDM */
@@ -314,8 +314,8 @@ from_dkdm (
boost::posix_time::ptime valid_from,
boost::posix_time::ptime valid_to,
dcp::Formulation formulation,
- int disable_forensic_marking_picture,
- int disable_forensic_marking_audio,
+ bool disable_forensic_marking_picture,
+ optional<int> disable_forensic_marking_audio,
bool zip
)
{
@@ -399,8 +399,8 @@ int main (int argc, char* argv[])
optional<string> duration_string;
bool verbose = false;
dcp::Formulation formulation = dcp::MODIFIED_TRANSITIONAL_1;
- int disable_forensic_marking_picture = 0;
- int disable_forensic_marking_audio = 0;
+ bool disable_forensic_marking_picture = false;
+ optional<int> disable_forensic_marking_audio;
program_name = argv[0];
@@ -470,13 +470,13 @@ int main (int argc, char* argv[])
}
break;
case 'p':
- disable_forensic_marking_picture = -1;
+ disable_forensic_marking_picture = true;
break;
case 'a':
- disable_forensic_marking_audio = -1;
- if (optarg == NULL && argv[optind] != NULL && argv[optind][0] != '-') {
+ disable_forensic_marking_audio = 0;
+ if (optarg == 0 && argv[optind] != 0 && argv[optind][0] != '-') {
disable_forensic_marking_audio = atoi (argv[optind++]);
- } else if (optarg != NULL) {
+ } else if (optarg) {
disable_forensic_marking_audio = atoi (optarg);
}
break;