Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
bef61ae2
Commit
bef61ae2
authored
Nov 01, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DASH: allocate hot-path parser on the stack and cosmetics
parent
8fdf5c8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
modules/stream_filter/dash/dash.cpp
modules/stream_filter/dash/dash.cpp
+12
-31
No files found.
modules/stream_filter/dash/dash.cpp
View file @
bef61ae2
...
...
@@ -71,7 +71,6 @@ struct stream_sys_t
static
int
Read
(
stream_t
*
p_stream
,
void
*
p_buffer
,
unsigned
int
i_len
);
static
int
Peek
(
stream_t
*
p_stream
,
const
uint8_t
**
pp_peek
,
unsigned
int
i_peek
);
static
int
Control
(
stream_t
*
p_stream
,
int
i_query
,
va_list
args
);
static
bool
IsDash
(
stream_t
*
p_stream
,
dash
::
xml
::
DOMParser
*
p_parser
);
/*****************************************************************************
* Open:
...
...
@@ -80,11 +79,12 @@ static int Open(vlc_object_t *p_this)
{
stream_t
*
p_stream
=
(
stream_t
*
)
p_this
;
dash
::
xml
::
DOMParser
*
p_parser
=
new
dash
::
xml
::
DOMParser
(
p_stream
->
p_source
);
if
(
!
IsDash
(
p_stream
,
p_parser
))
dash
::
xml
::
DOMParser
parser
(
p_stream
->
p_source
);
if
(
!
parser
.
isDash
())
return
VLC_EGENERIC
;
if
(
!
parser
.
parse
())
{
delete
(
p_parser
);
msg_Dbg
(
p_stream
,
"could not parse file"
);
return
VLC_EGENERIC
;
}
...
...
@@ -93,13 +93,13 @@ static int Open(vlc_object_t *p_this)
if
(
unlikely
(
p_sys
==
NULL
))
return
VLC_ENOMEM
;
dash
::
http
::
HTTPConnectionManager
*
p_conManager
=
new
dash
::
http
::
HTTPConnectionManager
(
p_stream
);
dash
::
xml
::
Node
*
p_node
=
p_parser
->
getRootNode
();
dash
::
DASHManager
*
p_dashManager
=
new
dash
::
DASHManager
(
p_conManager
,
p_node
,
dash
::
http
::
HTTPConnectionManager
*
p_conManager
=
new
dash
::
http
::
HTTPConnectionManager
(
p_stream
);
dash
::
xml
::
Node
*
p_node
=
parser
.
getRootNode
();
dash
::
DASHManager
*
p_dashManager
=
new
dash
::
DASHManager
(
p_conManager
,
p_node
,
dash
::
logic
::
IAdaptationLogic
::
RateBased
,
p_parser
->
getProfile
(
p_node
));
delete
(
p_parser
);
parser
.
getProfile
(
p_node
));
p_sys
->
p_dashManager
=
p_dashManager
;
p_sys
->
p_node
=
p_node
;
...
...
@@ -192,22 +192,3 @@ static int Control (stream_t *p_stream, int i_query, va_list args)
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Helpers:
*****************************************************************************/
static
bool
IsDash
(
stream_t
*
p_stream
,
dash
::
xml
::
DOMParser
*
p_parser
)
{
if
(
!
p_parser
->
isDash
())
{
msg_Dbg
(
p_stream
,
"DASH filter: file is no mpd"
);
return
false
;
}
if
(
!
p_parser
->
parse
())
{
msg_Dbg
(
p_stream
,
"DASH filter: could not parse file"
);
return
false
;
}
return
true
;
}
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