Commit 2a212f7d authored by Francois Cartegnie's avatar Francois Cartegnie

demux: dash: handle profiles list

parent 93b2b55f
......@@ -166,12 +166,24 @@ bool DOMParser::isDash (stream_t *stream)
Profile DOMParser::getProfile() const
{
Profile res(Profile::Unknown);
if(this->root == NULL)
return Profile(Profile::Unknown);
return res;
std::string urn = this->root->getAttributeValue("profiles");
if ( urn.length() == 0 )
urn = this->root->getAttributeValue("profile"); //The standard spells it the both ways...
return Profile(urn);
size_t pos;
size_t nextpos = -1;
do
{
pos = nextpos + 1;
nextpos = urn.find_first_of(",", pos);
res = Profile(urn.substr(pos, nextpos - pos));
}
while (nextpos != std::string::npos && res == Profile::Unknown);
return res;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment