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);
}
private:
http::HTTPConnectionManager *conManager;
http::Chunk *currentChunk;
- logic::AdaptationLogicFactory *logicFactory;
logic::IAdaptationLogic *adaptationLogic;
logic::IAdaptationLogic::LogicType logicType;
mpd::Profile profile;
using namespace dash::xml;
using namespace dash::mpd;
-AdaptationLogicFactory::AdaptationLogicFactory ()
-{
-
-}
-AdaptationLogicFactory::~AdaptationLogicFactory ()
-{
-
-}
-
IAdaptationLogic* AdaptationLogicFactory::create (IAdaptationLogic::LogicType logic, IMPDManager *mpdManager)
{
switch(logic)
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);
};
}
}