phdr
[asdcplib.git] / src / MXF.h
index 6e6a47afd154e4326661e51888a2d60f0ee9efbd..6041772a08c7abbd5e6ddbc20d7f6c61b18e3ad7 100755 (executable)
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -1,5 +1,5 @@
 /*
-Copyright (c) 2005-2013, John Hurst
+Copyright (c) 2005-2014, John Hurst
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -405,6 +405,10 @@ namespace ASDCP
          SourcePackage*   GetSourcePackage();
        };
 
+      // Searches the header object and returns the edit rate based on the contents of the
+      // File Package items.  Logs an error message and returns false if anthing goes wrong.
+      bool GetEditRateFromFP(ASDCP::MXF::OP1aHeader& header, ASDCP::Rational& edit_rate);
+
       //
       class OPAtomIndexFooter : public Partition
        {
@@ -459,7 +463,18 @@ namespace ASDCP
        }
       };
 
-      typedef std::map<const std::string, const UL, ci_comp> mca_label_map_t;
+      struct label_traits
+      {
+        const std::string tag_name;
+       const bool requires_prefix;
+       const UL ul;
+
+      label_traits(const std::string& tag_name, const bool requires_prefix, const UL ul) : 
+       tag_name(tag_name), requires_prefix(requires_prefix), ul(ul) { }
+      };
+
+      typedef std::map<const std::string, const label_traits, ci_comp> mca_label_map_t;
+
       bool decode_mca_string(const std::string& s, const mca_label_map_t& labels,
                             const Dictionary*& dict, const std::string& language, InterchangeObject_list_t&, ui32_t&);
 
@@ -477,7 +492,7 @@ namespace ASDCP
          
        public:
          ASDCP_MCAConfigParser(const Dictionary*&);
-         bool DecodeString(const std::string& s, const std::string& language = "en");
+         bool DecodeString(const std::string& s, const std::string& language = "en-US");
 
          // Valid only after a successful call to DecodeString
          ui32_t ChannelCount() const;