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
0e5576b3
Commit
0e5576b3
authored
Dec 11, 2013
by
Felix Abecassis
Committed by
Jean-Baptiste Kempf
Dec 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove audio decoder buffering.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
de7bd292
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
54 deletions
+6
-54
src/input/decoder.c
src/input/decoder.c
+6
-54
No files found.
src/input/decoder.c
View file @
0e5576b3
...
...
@@ -146,9 +146,6 @@ struct decoder_owner_sys_t
subpicture_t
*
p_subpic
;
subpicture_t
**
pp_subpic_next
;
block_t
*
p_audio
;
block_t
**
pp_audio_next
;
block_t
*
p_block
;
block_t
**
pp_block_next
;
}
buffer
;
...
...
@@ -169,7 +166,6 @@ struct decoder_owner_sys_t
};
#define DECODER_MAX_BUFFERING_COUNT (4)
#define DECODER_MAX_BUFFERING_AUDIO_DURATION (AOUT_MAX_PREPARE_TIME)
#define DECODER_MAX_BUFFERING_VIDEO_DURATION (1*CLOCK_FREQ)
/* Pictures which are DECODER_BOGUS_VIDEO_DELAY or more in advance probably have
...
...
@@ -558,7 +554,7 @@ void input_DecoderStartBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
i_count
=
0
;
assert
(
!
p_owner
->
buffer
.
p_picture
&&
!
p_owner
->
buffer
.
p_subpic
&&
!
p_owner
->
buffer
.
p_
audio
&&
!
p_owner
->
buffer
.
p_
block
);
!
p_owner
->
buffer
.
p_block
);
p_owner
->
buffer
.
p_picture
=
NULL
;
p_owner
->
buffer
.
pp_picture_next
=
&
p_owner
->
buffer
.
p_picture
;
...
...
@@ -566,9 +562,6 @@ void input_DecoderStartBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
p_subpic
=
NULL
;
p_owner
->
buffer
.
pp_subpic_next
=
&
p_owner
->
buffer
.
p_subpic
;
p_owner
->
buffer
.
p_audio
=
NULL
;
p_owner
->
buffer
.
pp_audio_next
=
&
p_owner
->
buffer
.
p_audio
;
p_owner
->
buffer
.
p_block
=
NULL
;
p_owner
->
buffer
.
pp_block_next
=
&
p_owner
->
buffer
.
p_block
;
...
...
@@ -884,7 +877,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
p_owner
->
buffer
.
i_count
=
0
;
p_owner
->
buffer
.
p_picture
=
NULL
;
p_owner
->
buffer
.
p_subpic
=
NULL
;
p_owner
->
buffer
.
p_audio
=
NULL
;
p_owner
->
buffer
.
p_block
=
NULL
;
p_owner
->
b_flushing
=
false
;
...
...
@@ -1176,45 +1168,20 @@ static void DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,
/* */
vlc_mutex_lock
(
&
p_owner
->
lock
);
if
(
p_audio
&&
(
p_owner
->
b_buffering
||
p_owner
->
buffer
.
p_audio
)
)
{
p_audio
->
p_next
=
NULL
;
*
p_owner
->
buffer
.
pp_audio_next
=
p_audio
;
p_owner
->
buffer
.
pp_audio_next
=
&
p_audio
->
p_next
;
p_owner
->
buffer
.
i_count
++
;
if
(
p_owner
->
buffer
.
i_count
>
DECODER_MAX_BUFFERING_COUNT
||
p_audio
->
i_pts
-
p_owner
->
buffer
.
p_audio
->
i_pts
>
DECODER_MAX_BUFFERING_AUDIO_DURATION
)
if
(
p_audio
&&
p_owner
->
b_buffering
)
{
p_owner
->
buffer
.
b_full
=
true
;
vlc_cond_signal
(
&
p_owner
->
wait_acknowledge
);
}
}
for
(
;;
)
{
bool
b_
has_more
=
false
,
b_
paused
;
bool
b_paused
;
bool
b_reject
=
DecoderWaitUnblock
(
p_dec
);
if
(
p_owner
->
b_buffering
)
break
;
b_paused
=
p_owner
->
b_paused
;
/* */
if
(
p_owner
->
buffer
.
p_audio
)
{
p_audio
=
p_owner
->
buffer
.
p_audio
;
p_owner
->
buffer
.
p_audio
=
p_audio
->
p_next
;
p_owner
->
buffer
.
i_count
--
;
b_has_more
=
p_owner
->
buffer
.
p_audio
!=
NULL
;
if
(
!
b_has_more
)
p_owner
->
buffer
.
pp_audio_next
=
&
p_owner
->
buffer
.
p_audio
;
}
if
(
!
p_audio
)
break
;
...
...
@@ -1251,9 +1218,6 @@ static void DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,
block_Release
(
p_audio
);
}
if
(
!
b_has_more
)
break
;
if
(
!
p_owner
->
buffer
.
p_audio
)
break
;
}
vlc_mutex_unlock
(
&
p_owner
->
lock
);
...
...
@@ -1712,18 +1676,6 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
if
(
!
p_owner
->
buffer
.
p_picture
)
p_owner
->
buffer
.
pp_picture_next
=
&
p_owner
->
buffer
.
p_picture
;
}
while
(
p_owner
->
buffer
.
p_audio
)
{
block_t
*
p_audio
=
p_owner
->
buffer
.
p_audio
;
p_owner
->
buffer
.
p_audio
=
p_audio
->
p_next
;
p_owner
->
buffer
.
i_count
--
;
block_Release
(
p_audio
);
if
(
!
p_owner
->
buffer
.
p_audio
)
p_owner
->
buffer
.
pp_audio_next
=
&
p_owner
->
buffer
.
p_audio
;
}
while
(
p_owner
->
buffer
.
p_subpic
)
{
subpicture_t
*
p_subpic
=
p_owner
->
buffer
.
p_subpic
;
...
...
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