+ virtual Result_t GetMDObjectByID(const UUID&, InterchangeObject** = 0);
+ virtual Result_t GetMDObjectByType(const byte_t*, InterchangeObject** = 0);
+ virtual Result_t GetMDObjectsByType(const byte_t* ObjectID, std::list<InterchangeObject*>& ObjectList);
+
+ virtual Result_t Lookup(ui32_t frame_num, IndexTableSegment::IndexEntry&) const;
+ virtual void PushIndexEntry(const IndexTableSegment::IndexEntry&);
+ virtual void SetDeltaParams(const IndexTableSegment::DeltaEntry&);
+ virtual void SetIndexParamsCBR(IPrimerLookup* lookup, ui32_t size, const Rational& Rate);
+ virtual void SetIndexParamsVBR(IPrimerLookup* lookup, const Rational& Rate, Kumu::fpos_t offset);
+ };
+
+ //---------------------------------------------------------------------------------
+ //
+
+ //
+ inline std::string to_lower(std::string str) {
+ std::transform(str.begin(), str.end(), str.begin(), ::tolower);
+ return str;
+ }
+
+ // ignore case when searching for audio labels
+ struct ci_comp
+ {
+ inline bool operator()(const std::string& a, const std::string& b) const {
+ return to_lower(a) < to_lower(b);
+ }
+ };
+
+ 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&);
+
+ //
+ class ASDCP_MCAConfigParser : public InterchangeObject_list_t
+ {
+ KM_NO_COPY_CONSTRUCT(ASDCP_MCAConfigParser);
+ ASDCP_MCAConfigParser();
+
+ protected:
+ mca_label_map_t m_LabelMap;
+ ui32_t m_ChannelCount;
+ const Dictionary*& m_Dict;
+
+
+ public:
+ ASDCP_MCAConfigParser(const Dictionary*&);
+ bool DecodeString(const std::string& s, const std::string& language = "en-US");
+
+ // Valid only after a successful call to DecodeString
+ ui32_t ChannelCount() const;
+ };
+
+ //
+ class AS02_MCAConfigParser : public ASDCP_MCAConfigParser
+ {
+ KM_NO_COPY_CONSTRUCT(AS02_MCAConfigParser);
+ AS02_MCAConfigParser();
+
+ public:
+ AS02_MCAConfigParser(const Dictionary*&);