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
858cbefa
Commit
858cbefa
authored
Nov 17, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dash: static-ify isDash
parent
b698c1c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
modules/stream_filter/dash/dash.cpp
modules/stream_filter/dash/dash.cpp
+8
-7
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+2
-2
modules/stream_filter/dash/xml/DOMParser.h
modules/stream_filter/dash/xml/DOMParser.h
+1
-1
No files found.
modules/stream_filter/dash/dash.cpp
View file @
858cbefa
...
@@ -75,13 +75,14 @@ static int Control (stream_t *p_stream, int i_query, va_list args);
...
@@ -75,13 +75,14 @@ static int Control (stream_t *p_stream, int i_query, va_list args);
/*****************************************************************************
/*****************************************************************************
* Open:
* Open:
*****************************************************************************/
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_
this
)
static
int
Open
(
vlc_object_t
*
p_
obj
)
{
{
stream_t
*
p_stream
=
(
stream_t
*
)
p_
this
;
stream_t
*
p_stream
=
(
stream_t
*
)
p_
obj
;
dash
::
xml
::
DOMParser
parser
(
p_stream
->
p_source
);
if
(
!
dash
::
xml
::
DOMParser
::
isDash
(
p_stream
->
p_source
))
if
(
!
parser
.
isDash
())
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
dash
::
xml
::
DOMParser
parser
(
p_stream
->
p_source
);
if
(
!
parser
.
parse
())
if
(
!
parser
.
parse
())
{
{
msg_Dbg
(
p_stream
,
"could not parse file"
);
msg_Dbg
(
p_stream
,
"could not parse file"
);
...
@@ -111,16 +112,16 @@ static int Open(vlc_object_t *p_this)
...
@@ -111,16 +112,16 @@ static int Open(vlc_object_t *p_this)
p_stream
->
pf_peek
=
Peek
;
p_stream
->
pf_peek
=
Peek
;
p_stream
->
pf_control
=
Control
;
p_stream
->
pf_control
=
Control
;
msg_Dbg
(
p_
this
,
"DASH filter: open (%s)"
,
p_stream
->
psz_path
);
msg_Dbg
(
p_
obj
,
"DASH filter: open (%s)"
,
p_stream
->
psz_path
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
/*****************************************************************************
* Close:
* Close:
*****************************************************************************/
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_
this
)
static
void
Close
(
vlc_object_t
*
p_
obj
)
{
{
stream_t
*
p_stream
=
(
stream_t
*
)
p_
this
;
stream_t
*
p_stream
=
(
stream_t
*
)
p_
obj
;
stream_sys_t
*
p_sys
=
(
stream_sys_t
*
)
p_stream
->
p_sys
;
stream_sys_t
*
p_sys
=
(
stream_sys_t
*
)
p_stream
->
p_sys
;
dash
::
DASHManager
*
p_dashManager
=
p_sys
->
p_dashManager
;
dash
::
DASHManager
*
p_dashManager
=
p_sys
->
p_dashManager
;
dash
::
http
::
HTTPConnectionManager
*
p_conManager
=
p_sys
->
p_conManager
;
dash
::
http
::
HTTPConnectionManager
*
p_conManager
=
p_sys
->
p_conManager
;
...
...
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
858cbefa
...
@@ -139,11 +139,11 @@ Profile DOMParser::getProfile (dash::xml::Node *node)
...
@@ -139,11 +139,11 @@ Profile DOMParser::getProfile (dash::xml::Node *node)
return
dash
::
mpd
::
NotValid
;
return
dash
::
mpd
::
NotValid
;
}
}
bool
DOMParser
::
isDash
()
bool
DOMParser
::
isDash
(
stream_t
*
stream
)
{
{
const
uint8_t
*
peek
,
*
peek_end
;
const
uint8_t
*
peek
,
*
peek_end
;
int64_t
i_size
=
stream_Peek
(
this
->
stream
,
&
peek
,
2048
);
int64_t
i_size
=
stream_Peek
(
stream
,
&
peek
,
2048
);
if
(
i_size
<
1
)
if
(
i_size
<
1
)
return
false
;
return
false
;
...
...
modules/stream_filter/dash/xml/DOMParser.h
View file @
858cbefa
...
@@ -55,7 +55,7 @@ namespace dash
...
@@ -55,7 +55,7 @@ namespace dash
Node
*
getRootNode
();
Node
*
getRootNode
();
void
print
();
void
print
();
dash
::
mpd
::
Profile
getProfile
(
dash
::
xml
::
Node
*
node
);
dash
::
mpd
::
Profile
getProfile
(
dash
::
xml
::
Node
*
node
);
bool
isDash
(
);
static
bool
isDash
(
stream_t
*
stream
);
private:
private:
Node
*
root
;
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