diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-31 11:33:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-31 11:33:19 +0100 |
| commit | 43175d3a567c1cc00bb1c672da3d6b2ffa4a4602 (patch) | |
| tree | fec8b07b06da821a5cabfa6a12cdf5c262498920 /tools/dcpdiff.cc | |
| parent | aaa33afbc17d60f9e836b4a2ad2e7ec2c294b837 (diff) | |
Inspect J2K data in MXFs.
Diffstat (limited to 'tools/dcpdiff.cc')
| -rw-r--r-- | tools/dcpdiff.cc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc index d1b49d05..21b3ff47 100644 --- a/tools/dcpdiff.cc +++ b/tools/dcpdiff.cc @@ -8,15 +8,20 @@ static void help (string n) { cerr << "Syntax: " << n << " [OPTION] <DCP> <DCP>\n" - << " -v, --version show DVD-o-matic version\n" + << " -b, --bitwise bitwise check\n" + << " -v, --version show libdcp version\n" << " -h, --help show this help\n" << "\n" - << "The <DCP>s are the DCP directories to compare.\n"; + << "The <DCP>s are the DCP directories to compare.\n" + << "Default is to compare metadata and content ignoring timestamps\n" + << "and differing UUIDs. Pass -b to perform a bitwise comparison.\n"; } int main (int argc, char* argv[]) { + bool bitwise = false; + int option_index = 0; while (1) { static struct option long_options[] = { @@ -25,13 +30,16 @@ main (int argc, char* argv[]) { 0, 0, 0, 0 } }; - int c = getopt_long (argc, argv, "vh", long_options, &option_index); + int c = getopt_long (argc, argv, "bvh", long_options, &option_index); if (c == -1) { break; } switch (c) { + case 'b': + bitwise = true; + break; case 'v': cout << "dcpdiff version " << LIBDCP_VERSION << "\n"; exit (EXIT_SUCCESS); @@ -49,7 +57,12 @@ main (int argc, char* argv[]) DCP a (argv[optind]); DCP b (argv[optind + 1]); - list<string> notes = a.equals (b, EqualityFlags (LIBDCP_METADATA | MXF_BITWISE)); + EqualityFlags flags = EqualityFlags (LIBDCP_METADATA | MXF_INSPECT); + if (bitwise) { + flags = EqualityFlags (flags | MXF_BITWISE); + } + + list<string> notes = a.equals (b, flags); if (notes.empty ()) { cout << "DCPs identical\n"; exit (EXIT_SUCCESS); |
