Adapt for changes to disable_forensic variable types in libdcp.
authorCarl Hetherington <cth@carlh.net>
Wed, 14 Feb 2018 23:17:24 +0000 (23:17 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 14 Feb 2018 23:28:26 +0000 (23:28 +0000)
src/lib/film.cc
src/lib/film.h
src/tools/dcpomatic.cc
src/tools/dcpomatic_kdm_cli.cc

index 23c83d037ba7b2432fe671127d89c80b9d249d32..332353b71e4ea06b5923885539eb4b7dad27ab7c 100644 (file)
@@ -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;
index 67bcfbbdf44697e975362098aab8ab690eb4e084..355a41da531f4078aa23999b499e4efd17c615b0 100644 (file)
@@ -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 {
index 4d6b38d5c4cb8550a8d353248f4918594aba536d..05534cc608a57697025ed1a18bbd791d1ba3adca 100644 (file)
@@ -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."));
index fbd6bb87035a7d9eabb619b70faaef7ce63960c5..f632d808aaea0a737807816a8e1b3a794a4ed32a 100644 (file)
@@ -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;