Rename mxf filename ignoring stuff slightly.
authorCarl Hetherington <cth@carlh.net>
Wed, 7 Jan 2015 16:33:22 +0000 (16:33 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 7 Jan 2015 16:33:22 +0000 (16:33 +0000)
src/mxf.cc
src/types.h
tools/dcpdiff.cc

index 442eb696b62cc347d86031dde771e0822dc7955a..5c99e01fcf8efdd4fecca15186807caf14bce1dc 100644 (file)
@@ -114,12 +114,12 @@ MXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler not
                return false;
        }
 
-       if (_file != other_mxf->file ()) {
-               if (!opt.mxf_names_can_differ) {
-                       note (DCP_ERROR, "MXF: names differ");
+       if (_file.leaf() != other_mxf->file().leaf()) {
+               if (!opt.mxf_filenames_can_differ) {
+                       note (DCP_ERROR, "MXF: filenames differ");
                        return false;
                } else {
-                       note (DCP_NOTE, "MXF: names differ");
+                       note (DCP_NOTE, "MXF: filenames differ");
                }
        }
        
index 08613c79774fb8a01980c0ef74e390958b5aff0c..594bd7b7676c64b3512b8399e24666f34888795e 100644 (file)
@@ -127,7 +127,7 @@ struct EqualityOptions
                , max_std_dev_pixel_error (0)
                , max_audio_sample_error (0)
                , cpl_annotation_texts_can_differ (false)
-               , mxf_names_can_differ (false)
+               , mxf_filenames_can_differ (false)
                , reel_hashes_can_differ (false)
        {}
 
@@ -139,8 +139,8 @@ struct EqualityOptions
        int max_audio_sample_error;
        /** true if the <AnnotationText> nodes of CPLs are allowed to differ */
        bool cpl_annotation_texts_can_differ;
-       /** true if MXF filenames are allowed to differ */
-       bool mxf_names_can_differ;
+       /** true if MXF file leafnames are allowed to differ */
+       bool mxf_filenames_can_differ;
        /** true if <Hash>es in Reels can differ */
        bool reel_hashes_can_differ;
 };
index bf2a144cd4aa45518ac4c484abe7356c77babb4d..c99a85239ea714f999e90a7c92916d287b452960 100644 (file)
@@ -37,7 +37,7 @@ help (string n)
             << "  -V, --version                show libdcp version\n"
             << "  -h, --help                   show this help\n"
             << "  -v, --verbose                be verbose\n"
-            << "  -n, --mxf-names              allow differing MXF names\n"
+            << "  -n, --mxf-filenames          allow differing MXF filenames\n"
             << "      --cpl-annotation-texts   allow differing CPL annotation texts\n"
             << "  -m, --mean-pixel             maximum allowed mean pixel error (default 5)\n"
             << "  -s, --std-dev-pixel          maximum allowed standard deviation of pixel error (default 5)\n"
@@ -93,7 +93,7 @@ main (int argc, char* argv[])
                        { "version", no_argument, 0, 'V'},
                        { "help", no_argument, 0, 'h'},
                        { "verbose", no_argument, 0, 'v'},
-                       { "mxf-names", no_argument, 0, 'n'},
+                       { "mxf-filenames", no_argument, 0, 'n'},
                        { "mean-pixel", required_argument, 0, 'm'},
                        { "std-dev-pixel", required_argument, 0, 's'},
                        { "keep-going", no_argument, 0, 'k'},
@@ -120,7 +120,7 @@ main (int argc, char* argv[])
                        verbose = true;
                        break;
                case 'n':
-                       options.mxf_names_can_differ = true;
+                       options.mxf_filenames_can_differ = true;
                        break;
                case 'm':
                        options.max_mean_pixel_error = atof (optarg);