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
ea61bf32
Commit
ea61bf32
authored
May 29, 2012
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Rework profile handling.
Profile was parsed twice.
parent
907c5042
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
26 deletions
+5
-26
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+0
-6
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
+0
-4
modules/stream_filter/dash/mpd/MPD.cpp
modules/stream_filter/dash/mpd/MPD.cpp
+0
-12
modules/stream_filter/dash/mpd/MPD.h
modules/stream_filter/dash/mpd/MPD.h
+0
-1
modules/stream_filter/dash/mpd/MPDFactory.cpp
modules/stream_filter/dash/mpd/MPDFactory.cpp
+2
-2
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+3
-1
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
ea61bf32
...
...
@@ -75,12 +75,6 @@ bool BasicCMParser::setMPD()
this
->
mpd
=
new
MPD
;
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
it
=
attr
.
find
(
"profile"
);
if
(
it
==
attr
.
end
()
)
it
=
attr
.
find
(
"profiles"
);
//The standard spells it the two ways...
if
(
it
!=
attr
.
end
()
)
this
->
mpd
->
setProfile
(
it
->
second
);
it
=
attr
.
find
(
"mediaPresentationDuration"
);
/*
Standard specifies a default of "On-Demand",
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
ea61bf32
...
...
@@ -62,10 +62,6 @@ void IsoffMainParser::setMPDAttributes ()
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
it
=
attr
.
find
(
"profiles"
);
if
(
it
!=
attr
.
end
())
this
->
mpd
->
setProfile
(
it
->
second
);
it
=
attr
.
find
(
"mediaPresentationDuration"
);
if
(
it
!=
attr
.
end
())
this
->
mpd
->
setDuration
(
str_duration
(
it
->
second
.
c_str
()));
...
...
modules/stream_filter/dash/mpd/MPD.cpp
View file @
ea61bf32
...
...
@@ -167,15 +167,3 @@ void MPD::setProfile(Profile profile)
{
this
->
profile
=
profile
;
}
void
MPD
::
setProfile
(
const
std
::
string
&
strProfile
)
{
if
(
strProfile
==
"urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm"
)
this
->
profile
=
dash
::
mpd
::
BasicCM
;
else
if
(
strProfile
==
"urn:mpeg:mpegB:profile:dash:full:2011"
)
this
->
profile
=
dash
::
mpd
::
Full2011
;
else
if
(
strProfile
==
"urn:mpeg:dash:profile:isoff-main:2011"
)
this
->
profile
=
dash
::
mpd
::
IsoffMain
;
else
this
->
profile
=
dash
::
mpd
::
UnknownProfile
;
}
modules/stream_filter/dash/mpd/MPD.h
View file @
ea61bf32
...
...
@@ -45,7 +45,6 @@ namespace dash
virtual
~
MPD
();
Profile
getProfile
()
const
;
void
setProfile
(
const
std
::
string
&
strProfile
);
void
setProfile
(
Profile
profile
);
bool
isLive
()
const
;
void
setLive
(
bool
live
);
...
...
modules/stream_filter/dash/mpd/MPDFactory.cpp
View file @
ea61bf32
...
...
@@ -49,7 +49,7 @@ MPD* MPDFactory::createBasicCMMPD (dash::xml::Node *root, stream_t *p_stream)
if
(
mpdParser
.
parse
()
==
false
||
mpdParser
.
getMPD
()
==
NULL
)
return
NULL
;
mpdParser
.
getMPD
()
->
setProfile
(
dash
::
mpd
::
BasicCM
);
return
mpdParser
.
getMPD
();
}
MPD
*
MPDFactory
::
createIsoffMainMPD
(
dash
::
xml
::
Node
*
root
,
stream_t
*
p_stream
)
...
...
@@ -58,6 +58,6 @@ MPD* MPDFactory::createIsoffMainMPD (dash::xml::Node *root, stream_t *p_stream)
if
(
mpdParser
.
parse
()
==
false
||
mpdParser
.
getMPD
()
==
NULL
)
return
NULL
;
mpdParser
.
getMPD
()
->
setProfile
(
dash
::
mpd
::
IsoffMain
);
return
mpdParser
.
getMPD
();
}
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
ea61bf32
...
...
@@ -157,7 +157,9 @@ Profile DOMParser::getProfile ()
if
(
this
->
root
==
NULL
)
return
dash
::
mpd
::
UnknownProfile
;
const
std
::
string
profile
=
this
->
root
->
getAttributeValue
(
"profiles"
);
std
::
string
profile
=
this
->
root
->
getAttributeValue
(
"profiles"
);
if
(
profile
.
length
()
==
0
)
profile
=
this
->
root
->
getAttributeValue
(
"profile"
);
//The standard spells it the both ways...
if
(
profile
.
find
(
"urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm"
)
!=
std
::
string
::
npos
||
profile
.
find
(
"urn:mpeg:dash:profile:isoff-ondemand:2011"
)
!=
std
::
string
::
npos
||
...
...
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