Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e8bfbde1
Commit
e8bfbde1
authored
Jan 30, 2012
by
Christopher Mueller
Committed by
Hugo Beauzée-Luyssen
Feb 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: added IS namespace and getprofile to domparser
Signed-off-by:
Hugo Beauzée-Luyssen
<
beauze.h@gmail.com
>
parent
24abb523
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+20
-5
modules/stream_filter/dash/xml/DOMParser.h
modules/stream_filter/dash/xml/DOMParser.h
+1
-0
No files found.
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
e8bfbde1
...
...
@@ -28,6 +28,7 @@
#include "DOMParser.h"
using
namespace
dash
::
xml
;
using
namespace
dash
::
mpd
;
DOMParser
::
DOMParser
(
stream_t
*
stream
)
:
root
(
NULL
),
...
...
@@ -132,21 +133,35 @@ void DOMParser::print (Node *node, int offset)
this
->
print
(
node
->
getSubNodes
().
at
(
i
),
offset
);
}
}
void
DOMParser
::
print
()
{
this
->
print
(
this
->
root
,
0
);
}
bool
DOMParser
::
isDash
(
stream_t
*
stream
)
{
const
char
*
psz_namespace
=
"urn:mpeg:mpegB:schema:DASH:MPD:DIS2011"
;
const
char
*
psz_namespaceDIS
=
"urn:mpeg:mpegB:schema:DASH:MPD:DIS2011"
;
const
char
*
psz_namespaceIS
=
"urn:mpeg:DASH:schema:MPD:2011"
;
const
uint8_t
*
peek
;
int
peek_size
=
stream_Peek
(
stream
,
&
peek
,
1024
);
if
(
peek_size
<
(
int
)
strlen
(
psz_namespace
))
if
(
peek_size
<
(
int
)
strlen
(
psz_namespace
DIS
))
return
false
;
std
::
string
header
((
const
char
*
)
peek
,
peek_size
);
return
header
.
find
(
psz_namespace
)
!=
std
::
string
::
npos
;
return
(
header
.
find
(
psz_namespaceDIS
)
!=
std
::
string
::
npos
)
||
(
header
.
find
(
psz_namespaceIS
)
!=
std
::
string
::
npos
);
}
Profile
DOMParser
::
getProfile
()
{
if
(
this
->
root
==
NULL
)
return
dash
::
mpd
::
UnknownProfile
;
const
std
::
string
profile
=
this
->
root
->
getAttributeValue
(
"profiles"
);
if
(
!
profile
.
compare
(
"urn:mpeg:mpegB:profile:dash:isoff-basic-on-demand:cm"
))
return
dash
::
mpd
::
BasicCM
;
if
(
!
profile
.
compare
(
"urn:mpeg:dash:profile:isoff-main:2011"
))
return
dash
::
mpd
::
IsoffMain
;
return
dash
::
mpd
::
UnknownProfile
;
}
modules/stream_filter/dash/xml/DOMParser.h
View file @
e8bfbde1
...
...
@@ -55,6 +55,7 @@ namespace dash
Node
*
getRootNode
();
void
print
();
static
bool
isDash
(
stream_t
*
stream
);
mpd
::
Profile
getProfile
();
private:
Node
*
root
;
...
...
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