Commit df63a73a authored by Christopher Mueller's avatar Christopher Mueller Committed by Hugo Beauzée-Luyssen

dash: dashmanager refactoring

Signed-off-by: default avatarChristopher Mueller <christopher.mueller@itec.aau.at>
Signed-off-by: default avatarHugo Beauzée-Luyssen <beauze.h@gmail.com>
parent 30f33e47
......@@ -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 )
......
......@@ -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 );
......
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