o Added asdcp.decode_mca_string() subroutine
{
std::string symbol_buf;
channel_count = 0;
{
std::string symbol_buf;
channel_count = 0;
- ASDCP::MXF::SoundfieldGroupLabelSubDescriptor *current_soundfield = 0;
+ ASDCP::MXF::SoundfieldGroupLabelSubDescriptor *current_soundfield = 0, *prev_soundfield = 0;
std::string::const_iterator i;
for ( i = s.begin(); i != s.end(); ++i )
std::string::const_iterator i;
for ( i = s.begin(); i != s.end(); ++i )
}
else if ( symbol_buf.empty() )
{
}
else if ( symbol_buf.empty() )
{
- DefaultLogSink().Error("Encountered '(', without leading soundfield group symbol.\n");
- return false;
+ if ( prev_soundfield != 0 )
+ {
+ current_soundfield = prev_soundfield;
+ // appending to the existing soundfield group
+ continue;
+ }
+ else
+ {
+ DefaultLogSink().Error("Encountered '(', without leading soundfield group symbol.\n");
+ return false;
+ }
}
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
}
mca_label_map_t::const_iterator i = labels.find(symbol_buf);
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
if ( i == labels.end() )
{
DefaultLogSink().Error("Unknown symbol: '%s'\n", symbol_buf.c_str());
current_soundfield->RFC5646SpokenLanguage = language;
current_soundfield->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(current_soundfield));
current_soundfield->RFC5646SpokenLanguage = language;
current_soundfield->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(current_soundfield));
+ prev_soundfield = current_soundfield;
symbol_buf.clear();
}
else if ( *i == ')' )
symbol_buf.clear();
}
else if ( *i == ')' )
channel_descr->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
symbol_buf.clear();
channel_descr->MCALabelDictionaryID = i->second.ul;
descriptor_list.push_back(reinterpret_cast<ASDCP::MXF::InterchangeObject*>(channel_descr));
symbol_buf.clear();
+ current_soundfield = 0;
}
else if ( *i == ',' )
{
}
else if ( *i == ',' )
{