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
b758d168
Commit
b758d168
authored
Jan 26, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: use unsigned stats
parent
a4504ffb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+1
-1
src/audio_output/dec.c
src/audio_output/dec.c
+1
-1
src/input/decoder.c
src/input/decoder.c
+10
-12
No files found.
src/audio_output/aout_internal.h
View file @
b758d168
...
@@ -137,7 +137,7 @@ int aout_DecNew(audio_output_t *, const audio_sample_format_t *,
...
@@ -137,7 +137,7 @@ int aout_DecNew(audio_output_t *, const audio_sample_format_t *,
const
audio_replay_gain_t
*
,
const
aout_request_vout_t
*
);
const
audio_replay_gain_t
*
,
const
aout_request_vout_t
*
);
void
aout_DecDelete
(
audio_output_t
*
);
void
aout_DecDelete
(
audio_output_t
*
);
int
aout_DecPlay
(
audio_output_t
*
,
block_t
*
,
int
i_input_rate
);
int
aout_DecPlay
(
audio_output_t
*
,
block_t
*
,
int
i_input_rate
);
int
aout_DecGetResetLost
(
audio_output_t
*
);
unsigned
aout_DecGetResetLost
(
audio_output_t
*
);
void
aout_DecChangePause
(
audio_output_t
*
,
bool
b_paused
,
mtime_t
i_date
);
void
aout_DecChangePause
(
audio_output_t
*
,
bool
b_paused
,
mtime_t
i_date
);
void
aout_DecFlush
(
audio_output_t
*
,
bool
wait
);
void
aout_DecFlush
(
audio_output_t
*
,
bool
wait
);
void
aout_RequestRestart
(
audio_output_t
*
,
unsigned
);
void
aout_RequestRestart
(
audio_output_t
*
,
unsigned
);
...
...
src/audio_output/dec.c
View file @
b758d168
...
@@ -395,7 +395,7 @@ lost:
...
@@ -395,7 +395,7 @@ lost:
goto
out
;
goto
out
;
}
}
int
aout_DecGetResetLost
(
audio_output_t
*
aout
)
unsigned
aout_DecGetResetLost
(
audio_output_t
*
aout
)
{
{
aout_owner_t
*
owner
=
aout_owner
(
aout
);
aout_owner_t
*
owner
=
aout_owner
(
aout
);
return
atomic_exchange
(
&
owner
->
buffers_lost
,
0
);
return
atomic_exchange
(
&
owner
->
buffers_lost
,
0
);
...
...
src/input/decoder.c
View file @
b758d168
...
@@ -1038,7 +1038,8 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block )
...
@@ -1038,7 +1038,8 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block )
}
}
static
int
DecoderPlayAudio
(
decoder_t
*
p_dec
,
block_t
*
p_audio
,
static
int
DecoderPlayAudio
(
decoder_t
*
p_dec
,
block_t
*
p_audio
,
int
*
pi_played_sum
,
int
*
pi_lost_sum
)
unsigned
*
restrict
pi_played_sum
,
unsigned
*
restrict
pi_lost_sum
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
bool
prerolled
;
bool
prerolled
;
...
@@ -1109,8 +1110,8 @@ static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,
...
@@ -1109,8 +1110,8 @@ static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,
return
0
;
return
0
;
}
}
static
void
DecoderUpdateStatAudio
(
decoder_t
*
p_dec
,
int
i_
decoded
,
static
void
DecoderUpdateStatAudio
(
decoder_t
*
p_dec
,
unsigned
decoded
,
int
i_lost
,
int
i_
played
)
unsigned
lost
,
unsigned
played
)
{
{
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
decoder_owner_sys_t
*
p_owner
=
p_dec
->
p_owner
;
input_thread_t
*
p_input
=
p_owner
->
p_input
;
input_thread_t
*
p_input
=
p_owner
->
p_input
;
...
@@ -1120,19 +1121,18 @@ static void DecoderUpdateStatAudio( decoder_t *p_dec, int i_decoded,
...
@@ -1120,19 +1121,18 @@ static void DecoderUpdateStatAudio( decoder_t *p_dec, int i_decoded,
return
;
return
;
if
(
p_owner
->
p_aout
!=
NULL
)
if
(
p_owner
->
p_aout
!=
NULL
)
i_
lost
+=
aout_DecGetResetLost
(
p_owner
->
p_aout
);
lost
+=
aout_DecGetResetLost
(
p_owner
->
p_aout
);
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_lock
(
&
p_input
->
p
->
counters
.
counters_lock
);
stats_Update
(
p_input
->
p
->
counters
.
p_lost_abuffers
,
i_
lost
,
NULL
);
stats_Update
(
p_input
->
p
->
counters
.
p_lost_abuffers
,
lost
,
NULL
);
stats_Update
(
p_input
->
p
->
counters
.
p_played_abuffers
,
i_
played
,
NULL
);
stats_Update
(
p_input
->
p
->
counters
.
p_played_abuffers
,
played
,
NULL
);
stats_Update
(
p_input
->
p
->
counters
.
p_decoded_audio
,
i_
decoded
,
NULL
);
stats_Update
(
p_input
->
p
->
counters
.
p_decoded_audio
,
decoded
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p
->
counters
.
counters_lock
);
vlc_mutex_unlock
(
&
p_input
->
p
->
counters
.
counters_lock
);
}
}
static
int
DecoderQueueAudio
(
decoder_t
*
p_dec
,
block_t
*
p_aout_buf
)
static
int
DecoderQueueAudio
(
decoder_t
*
p_dec
,
block_t
*
p_aout_buf
)
{
{
int
i_lost
=
0
;
unsigned
i_lost
=
0
,
i_played
=
0
;
int
i_played
=
0
;
int
ret
=
DecoderPlayAudio
(
p_dec
,
p_aout_buf
,
&
i_played
,
&
i_lost
);
int
ret
=
DecoderPlayAudio
(
p_dec
,
p_aout_buf
,
&
i_played
,
&
i_lost
);
...
@@ -1145,9 +1145,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
...
@@ -1145,9 +1145,7 @@ static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
{
{
block_t
*
p_aout_buf
;
block_t
*
p_aout_buf
;
block_t
**
pp_block
=
p_block
?
&
p_block
:
NULL
;
block_t
**
pp_block
=
p_block
?
&
p_block
:
NULL
;
int
i_decoded
=
0
;
unsigned
i_decoded
=
0
,
i_lost
=
0
,
i_played
=
0
;
int
i_lost
=
0
;
int
i_played
=
0
;
while
(
(
p_aout_buf
=
p_dec
->
pf_decode_audio
(
p_dec
,
pp_block
)
)
)
while
(
(
p_aout_buf
=
p_dec
->
pf_decode_audio
(
p_dec
,
pp_block
)
)
)
{
{
...
...
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