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
9caf4cee
Commit
9caf4cee
authored
Dec 28, 2011
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Dec 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Try to fetch mimeType attribute from the parent element.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
699b4b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
modules/stream_filter/dash/mpd/BasicCMParser.cpp
modules/stream_filter/dash/mpd/BasicCMParser.cpp
+10
-5
modules/stream_filter/dash/mpd/BasicCMParser.h
modules/stream_filter/dash/mpd/BasicCMParser.h
+3
-1
No files found.
modules/stream_filter/dash/mpd/BasicCMParser.cpp
View file @
9caf4cee
...
...
@@ -150,7 +150,7 @@ void BasicCMParser::setGroups (Node *root, Period *period)
for
(
size_t
i
=
0
;
i
<
groups
.
size
();
i
++
)
{
Group
*
group
=
new
Group
(
groups
.
at
(
i
)
->
getAttributes
());
if
(
this
->
parseCommonAttributesElements
(
groups
.
at
(
i
),
group
)
==
false
)
if
(
this
->
parseCommonAttributesElements
(
groups
.
at
(
i
),
group
,
NULL
)
==
false
)
{
delete
group
;
continue
;
...
...
@@ -169,7 +169,7 @@ void BasicCMParser::setRepresentations (Node *root, Group *group)
const
std
::
map
<
std
::
string
,
std
::
string
>
attributes
=
representations
.
at
(
i
)
->
getAttributes
();
Representation
*
rep
=
new
Representation
(
attributes
);
if
(
this
->
parseCommonAttributesElements
(
representations
.
at
(
i
),
rep
)
==
false
)
if
(
this
->
parseCommonAttributesElements
(
representations
.
at
(
i
),
rep
,
group
)
==
false
)
{
delete
rep
;
continue
;
...
...
@@ -351,7 +351,7 @@ void BasicCMParser::parseContentDescriptor(Node *node, const std::string &name,
}
}
bool
BasicCMParser
::
parseCommonAttributesElements
(
Node
*
node
,
CommonAttributesElements
*
common
)
const
bool
BasicCMParser
::
parseCommonAttributesElements
(
Node
*
node
,
CommonAttributesElements
*
common
,
CommonAttributesElements
*
parent
)
const
{
const
std
::
map
<
std
::
string
,
std
::
string
>
&
attr
=
node
->
getAttributes
();
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
it
;
...
...
@@ -359,8 +359,13 @@ bool BasicCMParser::parseCommonAttributesElements( Node *node, CommonAttribut
it
=
attr
.
find
(
"mimeType"
);
if
(
it
==
attr
.
end
()
)
{
std
::
cerr
<<
"Missing mandatory attribute: @mimeType"
<<
std
::
endl
;
return
false
;
if
(
parent
&&
parent
->
getMimeType
().
empty
()
==
false
)
common
->
setMimeType
(
parent
->
getMimeType
()
);
else
{
std
::
cerr
<<
"Missing mandatory attribute: @mimeType"
<<
std
::
endl
;
return
false
;
}
}
common
->
setMimeType
(
it
->
second
);
//Everything else is optionnal.
...
...
modules/stream_filter/dash/mpd/BasicCMParser.h
View file @
9caf4cee
...
...
@@ -67,7 +67,9 @@ namespace dash
void
parseContentDescriptor
(
xml
::
Node
*
node
,
const
std
::
string
&
name
,
void
(
CommonAttributesElements
::*
addPtr
)(
ContentDescription
*
),
CommonAttributesElements
*
self
)
const
;
bool
parseCommonAttributesElements
(
dash
::
xml
::
Node
*
node
,
CommonAttributesElements
*
common
)
const
;
bool
parseCommonAttributesElements
(
dash
::
xml
::
Node
*
node
,
CommonAttributesElements
*
common
,
CommonAttributesElements
*
parent
)
const
;
bool
parseSegment
(
Segment
*
seg
,
const
std
::
map
<
std
::
string
,
std
::
string
>
&
attr
);
ProgramInformation
*
parseProgramInformation
();
};
...
...
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