IMF MCA labels
authorjhurst <jhurst@cinecert.com>
Mon, 1 Jul 2013 22:14:16 +0000 (22:14 +0000)
committerjhurst <>
Mon, 1 Jul 2013 22:14:16 +0000 (22:14 +0000)
cinecanvas fade time now okay with HH:MM:SS:

src/MDD.cpp
src/MDD.h
src/MXF.cpp
src/MXF.h
src/as-02-wrap.cpp
src/asdcp-wrap.cpp

index c60fc061181e1311ca6204dab3bddfdc47aed6ae..eba638f28fb13cdfc7000be9aad18143d65b3140 100644 (file)
@@ -1013,7 +1013,78 @@ static const ASDCP::MDDEntry s_MDD_Table[] = {
   { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x02, 0x01, 0x01, // 325
       0x0d, 0x01, 0x03, 0x01, 0x16, 0x01, 0x02, 0x00 },
       {0}, false, "WAVEssenceClip" },
-
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 326
+      0x04, 0x02, 0x02, 0x10, 0x04, 0x01, 0x00, 0x00 },
+    {0}, false, "IMFAudioChannelCfg_MCA" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 327
+      0x03, 0x02, 0x01, 0x20, 0x01, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_M1" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 328
+      0x03, 0x02, 0x01, 0x20, 0x02, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_M2" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 329
+      0x03, 0x02, 0x01, 0x20, 0x03, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_Lt" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 330
+      0x03, 0x02, 0x01, 0x20, 0x04, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_Rt" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 331
+      0x03, 0x02, 0x01, 0x20, 0x05, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_Lst" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 332
+      0x03, 0x02, 0x01, 0x20, 0x06, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_Rst" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 333
+      0x03, 0x02, 0x01, 0x20, 0x07, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioChannel_S" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 334
+      0x03, 0x02, 0x01, 0x20, 0x08, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFNumberedSourceChannel" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 335
+      0x03, 0x02, 0x02, 0x20, 0x01, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_ST" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 336
+      0x03, 0x02, 0x02, 0x20, 0x02, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_DM" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 337
+      0x03, 0x02, 0x02, 0x20, 0x03, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_DNS" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 338
+      0x03, 0x02, 0x02, 0x20, 0x04, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_30" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 339
+      0x03, 0x02, 0x02, 0x20, 0x05, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_40" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 340
+      0x03, 0x02, 0x02, 0x20, 0x06, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_50" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 341
+      0x03, 0x02, 0x02, 0x20, 0x07, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_60" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 342
+      0x03, 0x02, 0x02, 0x20, 0x08, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_70" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 343
+      0x03, 0x02, 0x02, 0x20, 0x09, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_LtRt" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 344
+      0x03, 0x02, 0x02, 0x20, 0x0a, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_51Ex" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 345
+      0x03, 0x02, 0x02, 0x20, 0x0b, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_HI" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 346
+      0x03, 0x02, 0x02, 0x20, 0x0c, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioSoundfield_VIN" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 347
+      0x03, 0x02, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioGroup_MPg" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 348
+      0x03, 0x02, 0x03, 0x20, 0x02, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioGroup_DVS" },
+  { { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, // 349
+      0x03, 0x02, 0x03, 0x20, 0x03, 0x00, 0x00, 0x00 },
+      {0}, false, "IMFAudioGroup_Dcm" },
   { {0}, {0}, false, 0 }
 };
 
index 7cbe35e6a385a9f7c01108f475be54b791b79dc1..4dcb228df504d019ea6569b364207d78ba096ae5 100755 (executable)
--- a/src/MDD.h
+++ b/src/MDD.h
@@ -361,6 +361,30 @@ namespace ASDCP {
        MDD_DCAudioSoundfield_61, // 323
        MDD_DCAudioSoundfield_M, // 324
        MDD_WAVEssenceClip, // 325
+       MDD_IMFAudioChannelCfg_MCA, // 326
+       MDD_IMFAudioChannel_M1, // 327
+       MDD_IMFAudioChannel_M2, // 328
+       MDD_IMFAudioChannel_Lt, // 329
+       MDD_IMFAudioChannel_Rt, // 330
+       MDD_IMFAudioChannel_Lst, // 331
+       MDD_IMFAudioChannel_Rst, // 332
+       MDD_IMFAudioChannel_S, // 333
+       MDD_IMFNumberedSourceChannel, // 334
+       MDD_IMFAudioSoundfield_ST, // 335
+       MDD_IMFAudioSoundfield_DM, // 336
+       MDD_IMFAudioSoundfield_DNS, // 337
+       MDD_IMFAudioSoundfield_30, // 338
+       MDD_IMFAudioSoundfield_40, // 339
+       MDD_IMFAudioSoundfield_50, // 340
+       MDD_IMFAudioSoundfield_60, // 341
+       MDD_IMFAudioSoundfield_70, // 342
+       MDD_IMFAudioSoundfield_LtRt, // 343
+       MDD_IMFAudioSoundfield_51Ex, // 344
+       MDD_IMFAudioSoundfield_HI, // 345
+       MDD_IMFAudioSoundfield_VIN, // 346
+       MDD_IMFAudioGroup_MPg, // 347
+       MDD_IMFAudioGroup_DVS, // 348
+       MDD_IMFAudioGroup_Dcm, // 349
         MDD_Max
 
     }; // enum MDD_t
index 6686e6aafa6ac2a326fbc22096d7273826eff871..d3351efeb8176a41e16953b4bea1d96bbaaab381 100755 (executable)
@@ -1449,44 +1449,14 @@ ASDCP::MXF::CreateObject(const Dictionary*& Dict, const UL& label)
 
 //------------------------------------------------------------------------------------------
 
-
-ASDCP::MXF::MCAConfigParser::MCAConfigParser(const Dictionary*& d) : m_Dict(d), m_ChannelCount(0)
-{
-  label_map.insert(label_map_t::value_type("L", m_Dict->ul(MDD_DCAudioChannel_L)));
-  label_map.insert(label_map_t::value_type("R", m_Dict->ul(MDD_DCAudioChannel_R)));
-  label_map.insert(label_map_t::value_type("C", m_Dict->ul(MDD_DCAudioChannel_C)));
-  label_map.insert(label_map_t::value_type("LFE", m_Dict->ul(MDD_DCAudioChannel_LFE)));
-  label_map.insert(label_map_t::value_type("Ls", m_Dict->ul(MDD_DCAudioChannel_Ls)));
-  label_map.insert(label_map_t::value_type("Rs", m_Dict->ul(MDD_DCAudioChannel_Rs)));
-  label_map.insert(label_map_t::value_type("Lss", m_Dict->ul(MDD_DCAudioChannel_Lss)));
-  label_map.insert(label_map_t::value_type("Rss", m_Dict->ul(MDD_DCAudioChannel_Rss)));
-  label_map.insert(label_map_t::value_type("Lrs", m_Dict->ul(MDD_DCAudioChannel_Lrs)));
-  label_map.insert(label_map_t::value_type("Rrs", m_Dict->ul(MDD_DCAudioChannel_Rrs)));
-  label_map.insert(label_map_t::value_type("Lc", m_Dict->ul(MDD_DCAudioChannel_Lc)));
-  label_map.insert(label_map_t::value_type("Rc", m_Dict->ul(MDD_DCAudioChannel_Rc)));
-  label_map.insert(label_map_t::value_type("Cs", m_Dict->ul(MDD_DCAudioChannel_Cs)));
-  label_map.insert(label_map_t::value_type("HI", m_Dict->ul(MDD_DCAudioChannel_HI)));
-  label_map.insert(label_map_t::value_type("VIN", m_Dict->ul(MDD_DCAudioChannel_VIN)));
-  label_map.insert(label_map_t::value_type("51", m_Dict->ul(MDD_DCAudioSoundfield_51)));
-  label_map.insert(label_map_t::value_type("71", m_Dict->ul(MDD_DCAudioSoundfield_71)));
-  label_map.insert(label_map_t::value_type("SDS", m_Dict->ul(MDD_DCAudioSoundfield_SDS)));
-  label_map.insert(label_map_t::value_type("61", m_Dict->ul(MDD_DCAudioSoundfield_61)));
-  label_map.insert(label_map_t::value_type("M", m_Dict->ul(MDD_DCAudioSoundfield_M)));
-}
-
 //
-ui32_t
-ASDCP::MXF::MCAConfigParser::ChannelCount() const
-{
-  return m_ChannelCount;
-}
-
-// 51(L,R,C,LFE,Ls,Rs),HI,VIN
 bool
-ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::string& language)
+ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& labels, const Dictionary& dict, const std::string& language,
+                             InterchangeObject_list_t& descriptor_list, ui32_t& channel_count)
 {
+  const Dictionary *dictp = &dict;
   std::string symbol_buf;
-  m_ChannelCount = 0;
+  channel_count = 0;
   ASDCP::MXF::SoundfieldGroupLabelSubDescriptor *current_soundfield = 0;
   std::string::const_iterator i;
 
@@ -1506,9 +1476,9 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
              return false;
            }
 
-         label_map_t::const_iterator i = label_map.find(symbol_buf);
+         mca_label_map_t::const_iterator i = labels.find(symbol_buf);
       
-         if ( i == label_map.end() )
+         if ( i == labels.end() )
            {
              fprintf(stderr, "Unknown symbol: '%s'\n", symbol_buf.c_str());
              return false;
@@ -1520,7 +1490,7 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
              return false;
            }
 
-         current_soundfield = new ASDCP::MXF::SoundfieldGroupLabelSubDescriptor(m_Dict);
+         current_soundfield = new ASDCP::MXF::SoundfieldGroupLabelSubDescriptor(dictp);
 
          GenRandomValue(current_soundfield->InstanceUID);
          GenRandomValue(current_soundfield->MCALinkID);
@@ -1528,7 +1498,7 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
          current_soundfield->MCATagName = i->first;
          current_soundfield->RFC5646SpokenLanguage = language;
          current_soundfield->MCALabelDictionaryID = i->second;
-         push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(current_soundfield));
+         descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(current_soundfield));
          symbol_buf.clear();
        }
       else if ( *i == ')' )
@@ -1545,26 +1515,26 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
              return false;
            }
 
-         label_map_t::const_iterator i = label_map.find(symbol_buf);
+         mca_label_map_t::const_iterator i = labels.find(symbol_buf);
       
-         if ( i == label_map.end() )
+         if ( i == labels.end() )
            {
              fprintf(stderr, "Unknown symbol: '%s'\n", symbol_buf.c_str());
              return false;
            }
 
          ASDCP::MXF::AudioChannelLabelSubDescriptor *channel_descr =
-           new ASDCP::MXF::AudioChannelLabelSubDescriptor(m_Dict);
+           new ASDCP::MXF::AudioChannelLabelSubDescriptor(dictp);
 
          GenRandomValue(channel_descr->InstanceUID);
          assert(current_soundfield);
          channel_descr->MCALinkID = current_soundfield->MCALinkID;
-         channel_descr->MCAChannelID = m_ChannelCount++;
+         channel_descr->MCAChannelID = channel_count++;
          channel_descr->MCATagSymbol = "ch" + i->first;
          channel_descr->MCATagName = i->first;
          channel_descr->RFC5646SpokenLanguage = language;
          channel_descr->MCALabelDictionaryID = i->second;
-         push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
+         descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
          symbol_buf.clear();
          current_soundfield = 0;
        }
@@ -1572,9 +1542,9 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
        {
          if ( ! symbol_buf.empty() )
            {
-             label_map_t::const_iterator i = label_map.find(symbol_buf);
+             mca_label_map_t::const_iterator i = labels.find(symbol_buf);
 
-             if ( i == label_map.end() )
+             if ( i == labels.end() )
                {
                  fprintf(stderr, "Unknown symbol: '%s'\n", symbol_buf.c_str());
                  return false;
@@ -1587,7 +1557,7 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
                }
 
              ASDCP::MXF::AudioChannelLabelSubDescriptor *channel_descr =
-               new ASDCP::MXF::AudioChannelLabelSubDescriptor(m_Dict);
+               new ASDCP::MXF::AudioChannelLabelSubDescriptor(dictp);
 
              GenRandomValue(channel_descr->InstanceUID);
 
@@ -1596,12 +1566,12 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
                  channel_descr->MCALinkID = current_soundfield->MCALinkID;
                }
 
-             channel_descr->MCAChannelID = m_ChannelCount++;
+             channel_descr->MCAChannelID = channel_count++;
              channel_descr->MCATagSymbol = "ch" + i->first;
              channel_descr->MCATagName = i->first;
              channel_descr->RFC5646SpokenLanguage = language;
              channel_descr->MCALabelDictionaryID = i->second;
-             push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
+             descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
              symbol_buf.clear();
            }
        }
@@ -1618,16 +1588,16 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
 
   if ( ! symbol_buf.empty() )
     {
-      label_map_t::const_iterator i = label_map.find(symbol_buf);
+      mca_label_map_t::const_iterator i = labels.find(symbol_buf);
       
-      if ( i == label_map.end() )
+      if ( i == labels.end() )
        {
          fprintf(stderr, "Unknown symbol: '%s'\n", symbol_buf.c_str());
          return false;
        }
 
       ASDCP::MXF::AudioChannelLabelSubDescriptor *channel_descr =
-       new ASDCP::MXF::AudioChannelLabelSubDescriptor(m_Dict);
+       new ASDCP::MXF::AudioChannelLabelSubDescriptor(dictp);
 
       GenRandomValue(channel_descr->InstanceUID);
 
@@ -1636,18 +1606,81 @@ ASDCP::MXF::MCAConfigParser::DecodeString(const std::string& s, const std::strin
          channel_descr->MCALinkID = current_soundfield->MCALinkID;
        }
 
-      channel_descr->MCAChannelID = m_ChannelCount++;
+      channel_descr->MCAChannelID = channel_count++;
       channel_descr->MCATagSymbol = "ch" + i->first;
       channel_descr->MCATagName = i->first;
       channel_descr->RFC5646SpokenLanguage = language;
       channel_descr->MCALabelDictionaryID = i->second;
-      push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
+      descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
     }
 
   return true;
 }
 
 
+ASDCP::MXF::ASDCP_MCAConfigParser::ASDCP_MCAConfigParser(const Dictionary*& d) : m_Dict(d), m_ChannelCount(0)
+{
+  m_LabelMap.insert(mca_label_map_t::value_type("L", m_Dict->ul(MDD_DCAudioChannel_L)));
+  m_LabelMap.insert(mca_label_map_t::value_type("R", m_Dict->ul(MDD_DCAudioChannel_R)));
+  m_LabelMap.insert(mca_label_map_t::value_type("C", m_Dict->ul(MDD_DCAudioChannel_C)));
+  m_LabelMap.insert(mca_label_map_t::value_type("LFE", m_Dict->ul(MDD_DCAudioChannel_LFE)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Ls", m_Dict->ul(MDD_DCAudioChannel_Ls)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rs", m_Dict->ul(MDD_DCAudioChannel_Rs)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Lss", m_Dict->ul(MDD_DCAudioChannel_Lss)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rss", m_Dict->ul(MDD_DCAudioChannel_Rss)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Lrs", m_Dict->ul(MDD_DCAudioChannel_Lrs)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rrs", m_Dict->ul(MDD_DCAudioChannel_Rrs)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Lc", m_Dict->ul(MDD_DCAudioChannel_Lc)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rc", m_Dict->ul(MDD_DCAudioChannel_Rc)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Cs", m_Dict->ul(MDD_DCAudioChannel_Cs)));
+  m_LabelMap.insert(mca_label_map_t::value_type("HI", m_Dict->ul(MDD_DCAudioChannel_HI)));
+  m_LabelMap.insert(mca_label_map_t::value_type("VIN", m_Dict->ul(MDD_DCAudioChannel_VIN)));
+  m_LabelMap.insert(mca_label_map_t::value_type("51", m_Dict->ul(MDD_DCAudioSoundfield_51)));
+  m_LabelMap.insert(mca_label_map_t::value_type("71", m_Dict->ul(MDD_DCAudioSoundfield_71)));
+  m_LabelMap.insert(mca_label_map_t::value_type("SDS", m_Dict->ul(MDD_DCAudioSoundfield_SDS)));
+  m_LabelMap.insert(mca_label_map_t::value_type("61", m_Dict->ul(MDD_DCAudioSoundfield_61)));
+  m_LabelMap.insert(mca_label_map_t::value_type("M", m_Dict->ul(MDD_DCAudioSoundfield_M)));
+}
+
+//
+ui32_t
+ASDCP::MXF::ASDCP_MCAConfigParser::ChannelCount() const
+{
+  return m_ChannelCount;
+}
+
+// 51(L,R,C,LFE,Ls,Rs),HI,VIN
+bool
+ASDCP::MXF::ASDCP_MCAConfigParser::DecodeString(const std::string& s, const std::string& language)
+{
+  return decode_mca_string(s, m_LabelMap, *m_Dict, language, *this, m_ChannelCount);
+}
+
+
+
+ASDCP::MXF::AS02_MCAConfigParser::AS02_MCAConfigParser(const Dictionary*& d) : ASDCP::MXF::ASDCP_MCAConfigParser(d)
+{
+  m_LabelMap.insert(mca_label_map_t::value_type("M1", m_Dict->ul(MDD_IMFAudioChannel_M1)));
+  m_LabelMap.insert(mca_label_map_t::value_type("M2", m_Dict->ul(MDD_IMFAudioChannel_M2)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Lt", m_Dict->ul(MDD_IMFAudioChannel_Lt)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rt", m_Dict->ul(MDD_IMFAudioChannel_Rt)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Lst", m_Dict->ul(MDD_IMFAudioChannel_Lst)));
+  m_LabelMap.insert(mca_label_map_t::value_type("Rst", m_Dict->ul(MDD_IMFAudioChannel_Rst)));
+  m_LabelMap.insert(mca_label_map_t::value_type("S", m_Dict->ul(MDD_IMFAudioChannel_S)));
+  m_LabelMap.insert(mca_label_map_t::value_type("ST", m_Dict->ul(MDD_IMFAudioSoundfield_ST)));
+  m_LabelMap.insert(mca_label_map_t::value_type("DM", m_Dict->ul(MDD_IMFAudioSoundfield_DM)));
+  m_LabelMap.insert(mca_label_map_t::value_type("DNS", m_Dict->ul(MDD_IMFAudioSoundfield_DNS)));
+  m_LabelMap.insert(mca_label_map_t::value_type("30", m_Dict->ul(MDD_IMFAudioSoundfield_30)));
+  m_LabelMap.insert(mca_label_map_t::value_type("40", m_Dict->ul(MDD_IMFAudioSoundfield_40)));
+  m_LabelMap.insert(mca_label_map_t::value_type("50", m_Dict->ul(MDD_IMFAudioSoundfield_50)));
+  m_LabelMap.insert(mca_label_map_t::value_type("60", m_Dict->ul(MDD_IMFAudioSoundfield_60)));
+  m_LabelMap.insert(mca_label_map_t::value_type("70", m_Dict->ul(MDD_IMFAudioSoundfield_70)));
+  m_LabelMap.insert(mca_label_map_t::value_type("LtRt", m_Dict->ul(MDD_IMFAudioSoundfield_LtRt)));
+  m_LabelMap.insert(mca_label_map_t::value_type("51Ex", m_Dict->ul(MDD_IMFAudioSoundfield_51Ex)));
+  m_LabelMap.insert(mca_label_map_t::value_type("HI", m_Dict->ul(MDD_IMFAudioSoundfield_HI)));
+  m_LabelMap.insert(mca_label_map_t::value_type("VIN", m_Dict->ul(MDD_IMFAudioSoundfield_VIN)));
+}
+
 //
 // end MXF.cpp
 //
index 826c0495cc38b1d82075dabf4927cd9d599515c4..cda4408fa0f6aa3e421836fcd0aa8df55f74b4bd 100755 (executable)
--- a/src/MXF.h
+++ b/src/MXF.h
@@ -433,26 +433,39 @@ namespace ASDCP
        }
       };
 
+      typedef std::map<const std::string, const UL, 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 MCAConfigParser : public InterchangeObject_list_t
+      class ASDCP_MCAConfigParser : public InterchangeObject_list_t
        {
-         typedef std::map<const std::string, const UL, ci_comp> label_map_t;
-         label_map_t label_map;
-         ui32_t m_ChannelCount;
+         KM_NO_COPY_CONSTRUCT(ASDCP_MCAConfigParser);
+         ASDCP_MCAConfigParser();
 
+       protected:
+         mca_label_map_t m_LabelMap;
+         ui32_t m_ChannelCount;
          const Dictionary*& m_Dict;
 
-         KM_NO_COPY_CONSTRUCT(MCAConfigParser);
-         MCAConfigParser();
          
        public:
-         MCAConfigParser(const Dictionary*&);
+         ASDCP_MCAConfigParser(const Dictionary*&);
          bool DecodeString(const std::string& s, const std::string& language = "en");
 
          // 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*&);
+       };
+
     } // namespace MXF
 } // namespace ASDCP
 
index b5cb138dd932cd19ed4a63300affdc80bc026d93..5066d6e813541191c732de4969b7d7b1b608c8fd 100755 (executable)
@@ -189,7 +189,7 @@ public:
   bool show_ul_values_flag;    /// if true, dump the UL table before going tp work.
   Kumu::PathList_t filenames;  // list of filenames to be processed
   UL channel_assignment;
-  ASDCP::MXF::MCAConfigParser mca_config;
+  ASDCP::MXF::AS02_MCAConfigParser mca_config;
 
   //new attributes for AS-02 support 
   AS_02::IndexStrategy_t index_strategy; //Shim parameter index_strategy_frame/clip
index 77e7845bb3862bd940695220b9fdd72a70a15c9c..04608d34ec300d40ee74a6f3cefff8e949ec9409 100755 (executable)
@@ -230,7 +230,7 @@ public:
   ui32_t ffoa;  /// first frame of action for atmos wrapping
   ui32_t max_channel_count; /// max channel count for atmos wrapping
   ui32_t max_object_count; /// max object count for atmos wrapping
-  ASDCP::MXF::MCAConfigParser mca_config;
+  ASDCP::MXF::ASDCP_MCAConfigParser mca_config;
 
   //
   Rational PictureRate()