//------------------------------------------------------------------------------------------
+//
+static bool
+ul_is_an_mca_group(const ASDCP::UL& ul)
+{
+ if ( ul.Value()[10] == 2 ) // magic depends on UL "Essence Facet" byte (see ST 428-12)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+//
+static bool
+ul_is_an_mca_channel(const ASDCP::UL& ul)
+{
+ if ( ul.Value()[10] == 1 ) // magic depends on UL "Essence Facet" byte (see ST 428-12)
+ {
+ return true;
+ }
+
+ if ( ul == ASDCP::DefaultSMPTEDict().ul(ASDCP::MDD_AudioChannelSLVS) ) // not all ULs obey ST 428-12!
+ {
+ return true;
+ }
+
+ return false;
+}
+
//
bool
ASDCP::MXF::decode_mca_string(const std::string& s, const mca_label_map_t& labels, const Dictionary*& dict, const std::string& language,
return false;
}
- if ( i->second.ul.Value()[10] != 2 ) // magic depends on UL "Essence Facet" byte (see ST 428-12)
+ if ( ! ul_is_an_mca_group(i->second.ul) )
{
DefaultLogSink().Error("Not a soundfield group symbol: '%s'\n", symbol_buf.c_str());
return false;
return false;
}
- if ( i->second.ul.Value()[10] != 1 ) // magic depends on UL "Essence Facet" byte (see ST 428-12)
+ if ( ! ul_is_an_mca_channel(i->second.ul) )
{
DefaultLogSink().Error("Not a channel symbol: '%s'\n", symbol_buf.c_str());
return false;
m_LabelMap.insert(pair("FSKSync", label_traits("FSK Sync" , true, m_Dict->ul(MDD_DCAudioChannel_FSKSyncSignalChannel))));
m_LabelMap.insert(pair("DBOX", label_traits("D-BOX Motion Code Primary Stream" , false, m_Dict->ul(MDD_DBOXMotionCodePrimaryStream))));
m_LabelMap.insert(pair("DBOX2", label_traits("D-BOX Motion Code Secondary Stream", false, m_Dict->ul(MDD_DBOXMotionCodeSecondaryStream))));
+ m_LabelMap.insert(pair("SLVS", label_traits("Sign Language Video Stream" , false, m_Dict->ul(MDD_AudioChannelSLVS))));
}
//