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
e937acbf
Commit
e937acbf
authored
Jul 09, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smooth: propagate tautology
parent
11f2aed1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
modules/stream_filter/smooth/downloader.c
modules/stream_filter/smooth/downloader.c
+7
-18
No files found.
modules/stream_filter/smooth/downloader.c
View file @
e937acbf
...
@@ -175,21 +175,18 @@ static int sms_Download( stream_t *s, chunk_t *chunk, char *url )
...
@@ -175,21 +175,18 @@ static int sms_Download( stream_t *s, chunk_t *chunk, char *url )
#ifdef DISABLE_BANDWIDTH_ADAPTATION
#ifdef DISABLE_BANDWIDTH_ADAPTATION
static
quality_level_t
*
static
quality_level_t
*
BandwidthAdaptation
(
stream_t
*
s
,
sms_stream_t
*
sms
,
BandwidthAdaptation
(
stream_t
*
s
,
sms_stream_t
*
sms
,
uint64_t
obw
,
uint64_t
i_duration
,
uint64_t
obw
,
uint64_t
i_duration
)
bool
b_starved
)
{
{
VLC_UNUSED
(
obw
);
VLC_UNUSED
(
obw
);
VLC_UNUSED
(
s
);
VLC_UNUSED
(
s
);
VLC_UNUSED
(
i_duration
);
VLC_UNUSED
(
i_duration
);
VLC_UNUSED
(
b_starved
);
return
sms
->
current_qlvl
;
return
sms
->
current_qlvl
;
}
}
#else
#else
static
quality_level_t
*
static
quality_level_t
*
BandwidthAdaptation
(
stream_t
*
s
,
sms_stream_t
*
sms
,
BandwidthAdaptation
(
stream_t
*
s
,
sms_stream_t
*
sms
,
uint64_t
obw
,
uint64_t
i_duration
,
uint64_t
obw
,
uint64_t
i_duration
)
bool
b_starved
)
{
{
quality_level_t
*
ret
=
NULL
;
quality_level_t
*
ret
=
NULL
;
...
@@ -197,11 +194,8 @@ BandwidthAdaptation( stream_t *s, sms_stream_t *sms,
...
@@ -197,11 +194,8 @@ BandwidthAdaptation( stream_t *s, sms_stream_t *sms,
if
(
sms
->
qlevels
.
i_size
<
2
)
if
(
sms
->
qlevels
.
i_size
<
2
)
return
sms
->
qlevels
.
p_elems
[
0
];
return
sms
->
qlevels
.
p_elems
[
0
];
if
(
b_starved
)
{
//TODO: do something on starvation post first buffering
//TODO: do something on starvation post first buffering
// s->p_sys->i_probe_length *= 2;
// s->p_sys->i_probe_length *= 2;
}
/* PASS 1 */
/* PASS 1 */
quality_level_t
*
lowest
=
sms
->
qlevels
.
p_elems
[
0
];
quality_level_t
*
lowest
=
sms
->
qlevels
.
p_elems
[
0
];
...
@@ -495,18 +489,13 @@ static int Download( stream_t *s, sms_stream_t *sms )
...
@@ -495,18 +489,13 @@ static int Download( stream_t *s, sms_stream_t *sms )
if
(
sms
->
p_chunks
==
NULL
||
sms
->
p_chunks
==
sms
->
p_lastchunk
)
if
(
sms
->
p_chunks
==
NULL
||
sms
->
p_chunks
==
sms
->
p_lastchunk
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
bool
b_starved
=
false
;
vlc_mutex_lock
(
&
p_sys
->
playback
.
lock
);
vlc_mutex_lock
(
&
p_sys
->
playback
.
lock
);
if
(
&
p_sys
->
playback
.
b_underrun
)
{
p_sys
->
playback
.
b_underrun
=
false
;
p_sys
->
playback
.
b_underrun
=
false
;
bw_stats_underrun
(
sms
);
bw_stats_underrun
(
sms
);
b_starved
=
true
;
}
vlc_mutex_unlock
(
&
p_sys
->
playback
.
lock
);
vlc_mutex_unlock
(
&
p_sys
->
playback
.
lock
);
quality_level_t
*
new_qlevel
=
BandwidthAdaptation
(
s
,
sms
,
sms
->
i_obw
,
quality_level_t
*
new_qlevel
=
BandwidthAdaptation
(
s
,
sms
,
sms
->
i_obw
,
duration
,
b_starved
);
duration
);
assert
(
new_qlevel
);
assert
(
new_qlevel
);
if
(
sms
->
qlevels
.
i_size
<
2
)
if
(
sms
->
qlevels
.
i_size
<
2
)
...
...
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