diff --git a/modules/stream_filter/dash/DASHManager.cpp b/modules/stream_filter/dash/DASHManager.cpp index ef102831320fb0356593b7378d2d8dce8fb6df8f..9dfb3335e73b4813251933bff882763be31e09ae 100644 --- a/modules/stream_filter/dash/DASHManager.cpp +++ b/modules/stream_filter/dash/DASHManager.cpp @@ -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); } diff --git a/modules/stream_filter/dash/DASHManager.h b/modules/stream_filter/dash/DASHManager.h index 870ce13928ee39d8de90cb7dd04fafa918f7e5bb..e35d10b8192719409731d771ff6a8692eee13f4e 100644 --- a/modules/stream_filter/dash/DASHManager.h +++ b/modules/stream_filter/dash/DASHManager.h @@ -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; diff --git a/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp b/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp index 3e286521c5b18ac9050a453a0bfbd9c7df84497f..0bd8478d2196568e1db3840db9dd55a4b93af2e3 100644 --- a/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp +++ b/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.cpp @@ -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) diff --git a/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h b/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h index 9988d2eb1c15c0bb8fa4c7c99625aa0fc9c3e0b8..79ff47b3c062260c20952ea9f4e7c75895359c04 100644 --- a/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h +++ b/modules/stream_filter/dash/adaptationlogic/AdaptationLogicFactory.h @@ -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); }; } }