version bump
[asdcplib.git] / src / klvwalk.cpp
index 26475dfc24020f4439a7f5347ab71e9a22eb3632..671506047f95e0d9b37a74222b822c20168a9172 100755 (executable)
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2005-2007, John Hurst
+Copyright (c) 2005-2009, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@ using Kumu::DefaultLogSink;
 //
 // command line option parser class
 
-static const char* PACKAGE = "klvwalk";    // program name for messages
+static const char* PROGRAM_NAME = "klvwalk";    // program name for messages
 typedef std::list<std::string> FileList_t;
 
 // Increment the iterator, test for an additional non-option command line argument.
@@ -65,12 +65,12 @@ banner(FILE* stream = stdout)
 {
   fprintf(stream, "\n\
 %s (asdcplib %s)\n\n\
-Copyright (c) 2005-2007 John Hurst\n\
+Copyright (c) 2005-2009 John Hurst\n\
 %s is part of the asdcplib DCP tools package.\n\
 asdcplib may be copied only under the terms of the license found at\n\
 the top of every file in the asdcplib distribution kit.\n\n\
 Specify the -h (help) option for further information about %s\n\n",
-         PACKAGE, ASDCP::Version(), PACKAGE, PACKAGE);
+         PROGRAM_NAME, ASDCP::Version(), PROGRAM_NAME, PROGRAM_NAME);
 }
 
 //
@@ -89,7 +89,7 @@ USAGE: %s [-r] [-v] <input-file> [<input-file2> ...]\n\
 \n\
   NOTES: o There is no option grouping, all options must be distinct arguments.\n\
          o All option arguments must be separated from the option by whitespace.\n\
-\n", PACKAGE, PACKAGE);
+\n", PROGRAM_NAME, PROGRAM_NAME);
 }
 
 //
@@ -178,7 +178,7 @@ main(int argc, const char** argv)
 
   if ( Options.error_flag )
     {
-      fprintf(stderr, "There was a problem. Type %s -h for help.\n", PACKAGE);
+      fprintf(stderr, "There was a problem. Type %s -h for help.\n", PROGRAM_NAME);
       return 3;
     }
 
@@ -193,7 +193,8 @@ main(int argc, const char** argv)
       if ( Options.read_mxf_flag ) // dump MXF
        {
          Kumu::FileReader        Reader;
-         ASDCP::MXF::OPAtomHeader Header;
+         const Dictionary* Dict = &DefaultCompositeDict();
+         ASDCP::MXF::OPAtomHeader Header(Dict);
          
          result = Reader.OpenRead((*fi).c_str());
          
@@ -213,7 +214,7 @@ main(int argc, const char** argv)
 
                  if ( ASDCP_SUCCESS(result) )
                    {
-                     MXF::Partition TmpPart;
+                     MXF::Partition TmpPart(Dict);
                      result = TmpPart.InitFromFile(Reader);
 
                      if ( ASDCP_SUCCESS(result) && TmpPart.BodySID > 0 )
@@ -224,7 +225,7 @@ main(int argc, const char** argv)
 
          if ( ASDCP_SUCCESS(result) )
            {
-             ASDCP::MXF::OPAtomIndexFooter Index;
+             ASDCP::MXF::OPAtomIndexFooter Index(Dict);
              result = Reader.Seek(Header.FooterPartition);
              
              if ( ASDCP_SUCCESS(result) )
@@ -252,7 +253,7 @@ main(int argc, const char** argv)
          
          while ( ASDCP_SUCCESS(result) )
            {
-             KP.Dump(stdout, true);
+             KP.Dump(stdout, DefaultCompositeDict(), true);
              result = KP.InitFromFile(Reader);
            }