[vlc-commits] demux: dash: pass role as description

Francois Cartegnie git at videolan.org
Sat Jul 25 22:30:46 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jul 25 22:12:19 2015 +0200| [3e7441cc93b07a696d49a848add98b829ec23851] | committer: Francois Cartegnie

demux: dash: pass role as description

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3e7441cc93b07a696d49a848add98b829ec23851
---

 modules/demux/dash/mpd/IsoffMainParser.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/demux/dash/mpd/IsoffMainParser.cpp b/modules/demux/dash/mpd/IsoffMainParser.cpp
index cf81742..5c14e0c 100644
--- a/modules/demux/dash/mpd/IsoffMainParser.cpp
+++ b/modules/demux/dash/mpd/IsoffMainParser.cpp
@@ -239,6 +239,14 @@ void    IsoffMainParser::setAdaptationSets  (Node *periodNode, Period *period)
         if(baseUrl)
             adaptationSet->baseUrl.Set(new Url(baseUrl->getText()));
 
+        Node *role = DOMHelper::getFirstChildElementByName((*it), "Role");
+        if(role && role->hasAttribute("schemeIdUri") && role->hasAttribute("value"))
+        {
+            std::string uri = role->getAttributeValue("schemeIdUri");
+            if(uri == "urn:mpeg:dash:role:2011")
+                adaptationSet->description.Set(role->getAttributeValue("value"));
+        }
+
         parseSegmentInformation( *it, adaptationSet );
 
         setRepresentations((*it), adaptationSet);



More information about the vlc-commits mailing list