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
2a6547a9
Commit
2a6547a9
authored
Jan 05, 2012
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Removing useless and potentially harmful recursion.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
88dc675a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
+25
-24
No files found.
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
View file @
2a6547a9
...
@@ -87,14 +87,27 @@ void HTTPConnectionManager::closeAllConnections ()
...
@@ -87,14 +87,27 @@ void HTTPConnectionManager::closeAllConnections ()
this
->
chunkMap
.
clear
();
this
->
chunkMap
.
clear
();
}
}
int
HTTPConnectionManager
::
read
(
Chunk
*
chunk
,
void
*
p_buffer
,
size_t
len
)
int
HTTPConnectionManager
::
read
(
Chunk
*
chunk
,
void
*
p_buffer
,
size_t
len
)
{
{
if
(
this
->
chunkMap
.
find
(
chunk
)
!
=
this
->
chunkMap
.
end
())
if
(
this
->
chunkMap
.
find
(
chunk
)
=
=
this
->
chunkMap
.
end
())
{
{
mtime_t
start
=
mdate
();
this
->
bytesReadChunk
=
0
;
int
ret
=
this
->
chunkMap
[
chunk
]
->
read
(
p_buffer
,
len
);
this
->
timeSecChunk
=
0
;
mtime_t
end
=
mdate
();
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
return
-
1
;
}
mtime_t
start
=
mdate
();
int
ret
=
this
->
chunkMap
[
chunk
]
->
read
(
p_buffer
,
len
);
mtime_t
end
=
mdate
();
std
::
cout
<<
"ret: "
<<
ret
<<
std
::
endl
;
if
(
ret
<=
0
)
this
->
closeConnection
(
chunk
);
else
{
double
time
=
((
double
)(
end
-
start
))
/
1000000
;
double
time
=
((
double
)(
end
-
start
))
/
1000000
;
this
->
bytesReadSession
+=
ret
;
this
->
bytesReadSession
+=
ret
;
...
@@ -116,30 +129,18 @@ int HTTPConnectionManager::read (Chunk *chun
...
@@ -116,30 +129,18 @@ int HTTPConnectionManager::read (Chunk *chun
this
->
bpsLastChunk
=
0
;
this
->
bpsLastChunk
=
0
;
this
->
notify
();
this
->
notify
();
if
(
ret
<=
0
)
this
->
closeConnection
(
chunk
);
return
ret
;
}
}
else
return
ret
;
{
}
this
->
bytesReadChunk
=
0
;
this
->
timeSecChunk
=
0
;
int
HTTPConnectionManager
::
peek
(
Chunk
*
chunk
,
const
uint8_t
**
pp_peek
,
size_t
i_peek
)
{
if
(
this
->
chunkMap
.
find
(
chunk
)
==
this
->
chunkMap
.
end
())
{
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
return
-
1
;
return
-
1
;
return
this
->
read
(
chunk
,
p_buffer
,
len
);
}
}
}
return
this
->
chunkMap
[
chunk
]
->
peek
(
pp_peek
,
i_peek
);
int
HTTPConnectionManager
::
peek
(
Chunk
*
chunk
,
const
uint8_t
**
pp_peek
,
size_t
i_peek
)
{
if
(
this
->
chunkMap
.
find
(
chunk
)
!=
this
->
chunkMap
.
end
())
return
this
->
chunkMap
[
chunk
]
->
peek
(
pp_peek
,
i_peek
);
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
return
-
1
;
return
this
->
peek
(
chunk
,
pp_peek
,
i_peek
);
}
}
IHTTPConnection
*
HTTPConnectionManager
::
initConnection
(
Chunk
*
chunk
)
IHTTPConnection
*
HTTPConnectionManager
::
initConnection
(
Chunk
*
chunk
)
...
...
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