Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
32402847
Commit
32402847
authored
Nov 25, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: dash: simplify MPD factory
parent
47af7ca1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
26 deletions
+21
-26
modules/stream_filter/dash/mpd/MPDFactory.cpp
modules/stream_filter/dash/mpd/MPDFactory.cpp
+21
-22
modules/stream_filter/dash/mpd/MPDFactory.h
modules/stream_filter/dash/mpd/MPDFactory.h
+0
-4
No files found.
modules/stream_filter/dash/mpd/MPDFactory.cpp
View file @
32402847
...
...
@@ -33,32 +33,31 @@ using namespace dash::mpd;
MPD
*
MPDFactory
::
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
)
{
IMPDParser
*
parser
=
NULL
;
switch
(
profile
)
{
case
dash
:
:
mpd
::
Profile
::
Full
:
return
MPDFactory
::
createBasicCMMPD
(
root
,
p_stream
);
case
dash
:
:
mpd
::
Profile
::
ISOOnDemand
:
case
dash
:
:
mpd
::
Profile
::
ISOMain
:
return
MPDFactory
::
createIsoffMainMPD
(
root
,
p_stream
);
default:
return
NULL
;
case
Profile
:
:
Full
:
parser
=
new
BasicCMParser
(
root
,
p_stream
);
break
;
case
Profile
:
:
ISOOnDemand
:
case
Profile
:
:
ISOMain
:
parser
=
new
IsoffMainParser
(
root
,
p_stream
);
default:
break
;
}
}
MPD
*
MPDFactory
::
createBasicCMMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
)
{
dash
::
mpd
::
BasicCMParser
mpdParser
(
root
,
p_stream
);
if
(
mpdParser
.
parse
()
==
false
||
mpdParser
.
getMPD
()
==
NULL
)
if
(
!
parser
)
return
NULL
;
mpdParser
.
getMPD
()
->
setProfile
(
Profile
(
Profile
::
ISOOnDemand
)
);
return
mpdParser
.
getMPD
();
}
MPD
*
MPDFactory
::
createIsoffMainMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
)
{
dash
::
mpd
::
IsoffMainParser
mpdParser
(
root
,
p_stream
);
if
(
mpdParser
.
parse
()
==
false
||
mpdParser
.
getMPD
()
==
NULL
)
return
NULL
;
mpdParser
.
getMPD
()
->
setProfile
(
Profile
(
Profile
::
ISOMain
)
);
return
mpdParser
.
getMPD
();
MPD
*
mpd
=
NULL
;
if
(
parser
->
parse
())
mpd
=
parser
->
getMPD
();
delete
parser
;
if
(
mpd
)
mpd
->
setProfile
(
profile
);
return
mpd
;
}
modules/stream_filter/dash/mpd/MPDFactory.h
View file @
32402847
...
...
@@ -37,10 +37,6 @@ namespace dash
{
public:
static
MPD
*
create
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
,
Profile
profile
);
private:
static
MPD
*
createBasicCMMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
static
MPD
*
createIsoffMainMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
);
};
}
}
...
...
Write
Preview
Markdown
is supported
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