Commit c1a6296e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Rémi Denis-Courmont

dash: No need to instantiate a factory.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent b67634af
......@@ -42,15 +42,13 @@ DASHManager::DASHManager (HTTPConnectionManager *conManager, Node *node, IAda
this->profile = profile;
this->mpdManagerFactory = new MPDManagerFactory();
this->mpdManager = this->mpdManagerFactory->create(this->profile, this->node);
this->logicFactory = new AdaptationLogicFactory();
this->adaptationLogic = this->logicFactory->create(this->logicType, this->mpdManager);
this->adaptationLogic = AdaptationLogicFactory::create( this->logicType, this->mpdManager );
this->currentChunk = NULL;
this->conManager->attach(this->adaptationLogic);
}
DASHManager::~DASHManager ()
{
delete(this->logicFactory);
delete(this->adaptationLogic);
delete(this->mpdManager);
}
......
......@@ -47,7 +47,6 @@ namespace dash
private:
http::HTTPConnectionManager *conManager;
http::Chunk *currentChunk;
logic::AdaptationLogicFactory *logicFactory;
logic::IAdaptationLogic *adaptationLogic;
logic::IAdaptationLogic::LogicType logicType;
mpd::Profile profile;
......
......@@ -31,15 +31,6 @@ using namespace dash::logic;
using namespace dash::xml;
using namespace dash::mpd;
AdaptationLogicFactory::AdaptationLogicFactory ()
{
}
AdaptationLogicFactory::~AdaptationLogicFactory ()
{
}
IAdaptationLogic* AdaptationLogicFactory::create (IAdaptationLogic::LogicType logic, IMPDManager *mpdManager)
{
switch(logic)
......
......@@ -39,10 +39,7 @@ namespace dash
class AdaptationLogicFactory
{
public:
AdaptationLogicFactory ();
virtual ~AdaptationLogicFactory ();
IAdaptationLogic* create (IAdaptationLogic::LogicType logic, dash::mpd::IMPDManager *mpdManager);
static IAdaptationLogic* create (IAdaptationLogic::LogicType logic, dash::mpd::IMPDManager *mpdManager);
};
}
}
......
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