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
98df0fd9
Commit
98df0fd9
authored
Dec 24, 2014
by
François Cartegnie
🤞
Browse files
demux: dash: parse program info
parent
01e36efe
Changes
2
Show whitespace changes
Inline
Side-by-side
modules/stream_filter/dash/mpd/IsoffMainParser.cpp
View file @
98df0fd9
...
...
@@ -29,6 +29,7 @@
#include "IsoffMainParser.h"
#include "SegmentTemplate.h"
#include "SegmentInfoDefault.h"
#include "ProgramInformation.h"
#include "xml/DOMHelper.h"
#include <vlc_strings.h>
#include <vlc_stream.h>
...
...
@@ -50,6 +51,7 @@ bool IsoffMainParser::parse (Profile profile)
{
mpd
=
new
MPD
(
p_stream
,
profile
);
setMPDAttributes
();
parseProgramInformation
(
DOMHelper
::
getFirstChildElementByName
(
root
,
"ProgramInformation"
),
mpd
);
setMPDBaseUrl
(
root
);
parsePeriods
(
root
);
...
...
@@ -329,6 +331,33 @@ void IsoffMainParser::setInitSegment (dash::xml::Node *segBaseNode, Segme
}
}
void
IsoffMainParser
::
parseProgramInformation
(
Node
*
node
,
MPD
*
mpd
)
{
if
(
!
node
)
return
;
ProgramInformation
*
info
=
new
(
std
::
nothrow
)
ProgramInformation
();
if
(
info
)
{
Node
*
child
=
DOMHelper
::
getFirstChildElementByName
(
node
,
"Title"
);
if
(
child
)
info
->
setTitle
(
child
->
getText
());
child
=
DOMHelper
::
getFirstChildElementByName
(
node
,
"Source"
);
if
(
child
)
info
->
setSource
(
child
->
getText
());
child
=
DOMHelper
::
getFirstChildElementByName
(
node
,
"Copyright"
);
if
(
child
)
info
->
setCopyright
(
child
->
getText
());
if
(
node
->
hasAttribute
(
"moreInformationURL"
))
info
->
setMoreInformationUrl
(
node
->
getAttributeValue
(
"moreInformationURL"
));
mpd
->
setProgramInformation
(
info
);
}
}
void
IsoffMainParser
::
print
()
{
if
(
mpd
)
...
...
modules/stream_filter/dash/mpd/IsoffMainParser.h
View file @
98df0fd9
...
...
@@ -59,6 +59,7 @@ namespace dash
void
parseSegmentBase
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentList
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
size_t
parseSegmentTemplate
(
dash
::
xml
::
Node
*
,
SegmentInformation
*
);
void
parseProgramInformation
(
dash
::
xml
::
Node
*
,
MPD
*
);
};
class
IsoTime
...
...
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