summaryrefslogtreecommitdiff
path: root/tools/dcpdiff.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-02 10:09:30 +0100
committerCarl Hetherington <cth@carlh.net>2020-12-02 10:09:30 +0100
commit2b522d0382a6d4534f1504123a9d16700fe50f0a (patch)
tree63d5c8ee3a82ee739f98957ef425afc8286778b5 /tools/dcpdiff.cc
parent3c90f397bf2222e0249ba169df0dac75b556f989 (diff)
Fix equals() with image subtitles to not compare unique IDs.
Also add an option to save subtitle images to PNGs when they differ.
Diffstat (limited to 'tools/dcpdiff.cc')
-rw-r--r--tools/dcpdiff.cc29
1 files changed, 17 insertions, 12 deletions
diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc
index 3940c0d4..2bda4347 100644
--- a/tools/dcpdiff.cc
+++ b/tools/dcpdiff.cc
@@ -61,17 +61,18 @@ static void
help (string n)
{
cerr << "Syntax: " << n << " [OPTION] <DCP> <DCP>\n"
- << " -V, --version show libdcp version\n"
- << " -h, --help show this help\n"
- << " -v, --verbose be verbose\n"
- << " --cpl-annotation-texts allow differing CPL annotation texts\n"
- << " --reel-annotation-texts allow differing reel annotation texts\n"
- << " -a, --annotation-texts allow different CPL and reel annotation texts\n"
- << " -d, --issue-dates allow different issue dates\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"
- << " --key hexadecimal key to use to decrypt MXFs\n"
- << " --ignore-missing-assets ignore missing asset files\n"
+ << " -V, --version show libdcp version\n"
+ << " -h, --help show this help\n"
+ << " -v, --verbose be verbose\n"
+ << " --cpl-annotation-texts allow differing CPL annotation texts\n"
+ << " --reel-annotation-texts allow differing reel annotation texts\n"
+ << " -a, --annotation-texts allow different CPL and reel annotation texts\n"
+ << " -d, --issue-dates allow different issue dates\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"
+ << " --key hexadecimal key to use to decrypt MXFs\n"
+ << " --ignore-missing-assets ignore missing asset files\n"
+ << " --export-differing-subtitles export the first pair of differing image subtitles to the current working directory\n"
<< "\n"
<< "The <DCP>s are the DCP directories to compare.\n"
<< "Comparison is of metadata and content, ignoring timestamps\n"
@@ -147,10 +148,11 @@ main (int argc, char* argv[])
{ "cpl-annotation-texts", no_argument, 0, 'C'},
{ "key", required_argument, 0, 'D'},
{ "reel-annotation-texts", no_argument, 0, 'E'},
+ { "export-differing-subtitles", no_argument, 0, 'F' },
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "Vhvm:s:adACD:E", long_options, &option_index);
+ int c = getopt_long (argc, argv, "Vhvm:s:adACD:EF", long_options, &option_index);
if (c == -1) {
break;
@@ -191,6 +193,9 @@ main (int argc, char* argv[])
case 'E':
options.reel_annotation_texts_can_differ = true;
break;
+ case 'F':
+ options.export_differing_subtitles = true;
+ break;
}
}