[vlc-commits] dash: added generic mpd generation

Christopher Mueller git at videolan.org
Thu Feb 2 12:33:26 CET 2012


vlc | branch: master | Christopher Mueller <christopher.mueller at itec.aau.at> | Mon Jan 30 14:48:34 2012 +0100| [110b681898e139a4e38abde60166ddaa11a6ebd6] | committer: Hugo Beauzée-Luyssen

dash: added generic mpd generation

Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>

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

 modules/stream_filter/dash/dash.cpp |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/stream_filter/dash/dash.cpp b/modules/stream_filter/dash/dash.cpp
index 5633316..ab3acee 100644
--- a/modules/stream_filter/dash/dash.cpp
+++ b/modules/stream_filter/dash/dash.cpp
@@ -38,7 +38,7 @@
 #include "xml/DOMParser.h"
 #include "http/HTTPConnectionManager.h"
 #include "adaptationlogic/IAdaptationLogic.h"
-#include "mpd/BasicCMParser.h"
+#include "mpd/MPDFactory.h"
 
 #define SEEK 0
 
@@ -90,19 +90,18 @@ static int Open(vlc_object_t *p_obj)
         msg_Dbg( p_stream, "Could not parse mpd file." );
         return VLC_EGENERIC;
     }
+
     //Begin the actual MPD parsing:
-    dash::mpd::BasicCMParser    mpdParser( parser.getRootNode(), p_stream->p_source );
-    if ( mpdParser.parse() == false || mpdParser.getMPD() == NULL )
-    {
-        msg_Err( p_obj, "MPD file parsing failed." );
+    dash::mpd::MPD *mpd = dash::mpd::MPDFactory::create(parser.getRootNode(), p_stream->p_source, parser.getProfile());
+
+    if(mpd == NULL)
         return VLC_EGENERIC;
-    }
 
     stream_sys_t        *p_sys = (stream_sys_t *) malloc(sizeof(stream_sys_t));
     if (unlikely(p_sys == NULL))
         return VLC_ENOMEM;
 
-    p_sys->p_mpd = mpdParser.getMPD();
+    p_sys->p_mpd = mpd;
     dash::http::HTTPConnectionManager *p_conManager =
                               new dash::http::HTTPConnectionManager( p_stream );
     dash::DASHManager*p_dashManager =



More information about the vlc-commits mailing list