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
d20cd478
Commit
d20cd478
authored
Nov 26, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter/httplive.c: select stream with lowest bandwidth to start playback.
Start playback with the lowest bandwidth stream.
parent
ccaec9e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+24
-1
No files found.
modules/stream_filter/httplive.c
View file @
d20cd478
...
...
@@ -232,6 +232,29 @@ static hls_stream_t *hls_GetLast(vlc_array_t *hls_stream)
return
(
hls_stream_t
*
)
hls_Get
(
hls_stream
,
count
);
}
static
int
hls_LowestBandwidthStream
(
vlc_array_t
*
hls_stream
)
{
int
count
=
vlc_array_count
(
hls_stream
);
int
i_lowest
=
0
;
uint64_t
lowest
=
0
;
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
hls_stream_t
*
hls
=
(
hls_stream_t
*
)
vlc_array_item_at_index
(
hls_stream
,
i
);
if
(
lowest
==
0
)
{
lowest
=
hls
->
bandwidth
;
i_lowest
=
i
;
}
else
if
(
hls
->
bandwidth
<
lowest
)
{
lowest
=
hls
->
bandwidth
;
i_lowest
=
i
;
}
}
return
i_lowest
;
}
/* Segment */
static
segment_t
*
segment_New
(
hls_stream_t
*
hls
,
int
duration
,
char
*
uri
)
{
...
...
@@ -1158,7 +1181,7 @@ static int Open(vlc_object_t *p_this)
}
/* */
int
current
=
p_sys
->
current
=
0
;
int
current
=
p_sys
->
current
=
hls_LowestBandwidthStream
(
p_sys
->
hls_stream
)
;
p_sys
->
segment
=
0
;
if
(
Prefetch
(
s
,
&
current
)
!=
VLC_SUCCESS
)
...
...
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