[vlc-commits] dash: No need to instantiate a factory.
Hugo Beauzée-Luyssen
git at videolan.org
Thu Nov 24 18:00:54 CET 2011
vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Nov 24 11:26:47 2011 +0100| [c1a6296ed71ac9fd57138d77aa609ac420460479] | committer: Rémi Denis-Courmont
dash: No need to instantiate a factory.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c1a6296ed71ac9fd57138d77aa609ac420460479
---
modules/stream_filter/dash/DASHManager.cpp | 4 +---
modules/stream_filter/dash/DASHManager.h | 1 -
.../adaptationlogic/AdaptationLogicFactory.cpp | 9 ---------
.../dash/adaptationlogic/AdaptationLogicFactory.h | 5 +----
4 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/modules/stream_filter/dash/DASHManager.cpp b/modules/stream_filter/dash/DASHManager.cpp
index ef10283..9dfb333 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 870ce13..e35d10b 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 3e28652..0bd8478 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 9988d2e..79ff47b 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);
};
}
}
More information about the vlc-commits
mailing list