[vlc-commits] dash: dashmanager refactoring
Christopher Mueller
git at videolan.org
Mon Apr 16 11:05:01 CEST 2012
vlc | branch: master | Christopher Mueller <christopher.mueller at itec.aau.at> | Tue Apr 3 16:41:40 2012 +0200| [df63a73ad02bd9f9a201f95820c888b16dca8cdf] | committer: Hugo Beauzée-Luyssen
dash: dashmanager refactoring
Signed-off-by: Christopher Mueller <christopher.mueller at itec.aau.at>
Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df63a73ad02bd9f9a201f95820c888b16dca8cdf
---
modules/stream_filter/dash/DASHManager.cpp | 31 +++++++++++++++------------
modules/stream_filter/dash/dash.cpp | 5 +---
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/modules/stream_filter/dash/DASHManager.cpp b/modules/stream_filter/dash/DASHManager.cpp
index b897019..d89b9a2 100644
--- a/modules/stream_filter/dash/DASHManager.cpp
+++ b/modules/stream_filter/dash/DASHManager.cpp
@@ -43,20 +43,6 @@ DASHManager::DASHManager ( MPD *mpd,
mpd ( mpd ),
stream (stream)
{
- this->mpdManager = mpd::MPDManagerFactory::create( mpd );
- if ( this->mpdManager == NULL )
- return ;
- this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager, this->stream);
- if ( this->adaptationLogic == NULL )
- return ;
-
- this->conManager = new dash::http::HTTPConnectionManager(this->adaptationLogic, this->stream);
-
- this->buffer = new BlockBuffer(this->stream);
- this->downloader = new DASHDownloader(this->conManager, this->buffer);
-
- this->conManager->attach(this->adaptationLogic);
- this->buffer->attach(this->adaptationLogic);
}
DASHManager::~DASHManager ()
{
@@ -69,6 +55,23 @@ DASHManager::~DASHManager ()
bool DASHManager::start()
{
+ this->mpdManager = mpd::MPDManagerFactory::create( mpd );
+
+ if ( this->mpdManager == NULL )
+ return false;
+
+ this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager, this->stream);
+
+ if ( this->adaptationLogic == NULL )
+ return false;
+
+ this->conManager = new dash::http::HTTPConnectionManager(this->adaptationLogic, this->stream);
+ this->buffer = new BlockBuffer(this->stream);
+ this->downloader = new DASHDownloader(this->conManager, this->buffer);
+
+ this->conManager->attach(this->adaptationLogic);
+ this->buffer->attach(this->adaptationLogic);
+
return this->downloader->start();
}
int DASHManager::read( void *p_buffer, size_t len )
diff --git a/modules/stream_filter/dash/dash.cpp b/modules/stream_filter/dash/dash.cpp
index 56eaa9f..423a2f6 100644
--- a/modules/stream_filter/dash/dash.cpp
+++ b/modules/stream_filter/dash/dash.cpp
@@ -117,10 +117,7 @@ static int Open(vlc_object_t *p_obj)
dash::logic::IAdaptationLogic::RateBased,
p_stream);
- if ( p_dashManager->getMpdManager() == NULL ||
- p_dashManager->getMpdManager()->getMPD() == NULL ||
- p_dashManager->getAdaptionLogic() == NULL ||
- p_dashManager->start() == false)
+ if(!p_dashManager->start())
{
delete p_dashManager;
free( p_sys );
More information about the vlc-commits
mailing list