[vlc-commits] demux: dash: parse Role
Francois Cartegnie
git at videolan.org
Fri May 17 20:34:57 CEST 2019
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 14 21:27:57 2019 +0200| [3dd384dbdc4c05d7300d818edf29e10521b3d532] | committer: Francois Cartegnie
demux: dash: parse Role
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3dd384dbdc4c05d7300d818edf29e10521b3d532
---
modules/demux/dash/mpd/IsoffMainParser.cpp | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index a8ba02ba25..b2ae86d440 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -248,7 +248,24 @@ void IsoffMainParser::parseAdaptationSets (Node *periodNode, Period *period)
{
std::string uri = role->getAttributeValue("schemeIdUri");
if(uri == "urn:mpeg:dash:role:2011")
- adaptationSet->description.Set(role->getAttributeValue("value"));
+ {
+ const std::string &rolevalue = role->getAttributeValue("value");
+ adaptationSet->description.Set(rolevalue);
+ if(rolevalue == "main")
+ adaptationSet->setRole(Role::MAIN);
+ else if(rolevalue == "alternate")
+ adaptationSet->setRole(Role::ALTERNATE);
+ else if(rolevalue == "supplementary")
+ adaptationSet->setRole(Role::SUPPLEMENTARY);
+ else if(rolevalue == "commentary")
+ adaptationSet->setRole(Role::COMMENTARY);
+ else if(rolevalue == "dub")
+ adaptationSet->setRole(Role::DUB);
+ else if(rolevalue == "caption")
+ adaptationSet->setRole(Role::CAPTION);
+ else if(rolevalue == "subtitle")
+ adaptationSet->setRole(Role::SUBTITLE);
+ }
}
#ifdef ADAPTATIVE_ADVANCED_DEBUG
if(adaptationSet->description.Get().empty())
More information about the vlc-commits
mailing list