Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
dd159d08
Commit
dd159d08
authored
Nov 24, 2011
by
Hugo Beauzée-Luyssen
Committed by
Rémi Denis-Courmont
Nov 24, 2011
Browse files
dash: Removing factory another class instantiation.
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
c1a6296e
Changes
4
Hide whitespace changes
Inline
Side-by-side
modules/stream_filter/dash/DASHManager.cpp
View file @
dd159d08
...
...
@@ -40,8 +40,7 @@ DASHManager::DASHManager (HTTPConnectionManager *conManager, Node *node, IAda
this
->
node
=
node
;
this
->
logicType
=
type
;
this
->
profile
=
profile
;
this
->
mpdManagerFactory
=
new
MPDManagerFactory
();
this
->
mpdManager
=
this
->
mpdManagerFactory
->
create
(
this
->
profile
,
this
->
node
);
this
->
mpdManager
=
mpd
::
MPDManagerFactory
::
create
(
this
->
profile
,
this
->
node
);
this
->
adaptationLogic
=
AdaptationLogicFactory
::
create
(
this
->
logicType
,
this
->
mpdManager
);
this
->
currentChunk
=
NULL
;
...
...
@@ -50,7 +49,6 @@ DASHManager::DASHManager (HTTPConnectionManager *conManager, Node *node, IAda
DASHManager
::~
DASHManager
()
{
delete
(
this
->
adaptationLogic
);
delete
(
this
->
mpdManager
);
}
int
DASHManager
::
read
(
void
*
p_buffer
,
size_t
len
)
...
...
modules/stream_filter/dash/DASHManager.h
View file @
dd159d08
...
...
@@ -51,7 +51,6 @@ namespace dash
logic
::
IAdaptationLogic
::
LogicType
logicType
;
mpd
::
Profile
profile
;
xml
::
Node
*
node
;
mpd
::
MPDManagerFactory
*
mpdManagerFactory
;
mpd
::
IMPDManager
*
mpdManager
;
};
}
...
...
modules/stream_filter/dash/mpd/MPDManagerFactory.cpp
View file @
dd159d08
...
...
@@ -30,29 +30,19 @@
using
namespace
dash
::
mpd
;
using
namespace
dash
::
xml
;
MPDManagerFactory
::
MPDManagerFactory
()
{
// TODO Auto-generated constructor stub
}
MPDManagerFactory
::~
MPDManagerFactory
()
{
// TODO Auto-generated destructor stub
}
IMPDManager
*
MPDManagerFactory
::
create
(
Profile
profile
,
Node
*
root
)
{
switch
(
profile
)
{
case
mpd
::
Basic
:
return
new
NullManager
();
case
mpd
::
BasicCM
:
return
this
->
createBasicCMManager
(
root
);
case
mpd
::
BasicCM
:
return
createBasicCMManager
(
root
);
case
mpd
::
Full2011
:
return
new
NullManager
();
case
mpd
::
NotValid
:
return
new
NullManager
();
default:
return
new
NullManager
();
}
}
IMPDManager
*
MPDManagerFactory
::
createBasicCMManager
(
Node
*
root
)
{
BasicCMParser
*
parser
=
new
BasicCMParser
(
root
);
...
...
modules/stream_filter/dash/mpd/MPDManagerFactory.h
View file @
dd159d08
...
...
@@ -38,13 +38,10 @@ namespace dash
class
MPDManagerFactory
{
public:
MPDManagerFactory
();
virtual
~
MPDManagerFactory
();
IMPDManager
*
create
(
Profile
profile
,
dash
::
xml
::
Node
*
root
);
static
IMPDManager
*
create
(
Profile
profile
,
dash
::
xml
::
Node
*
root
);
private:
IMPDManager
*
createBasicCMManager
(
dash
::
xml
::
Node
*
root
);
static
IMPDManager
*
createBasicCMManager
(
dash
::
xml
::
Node
*
root
);
};
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment