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
327ea9c1
Commit
327ea9c1
authored
Feb 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: cosmetic changes
parent
9643fcb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
21 deletions
+19
-21
src/input/input.c
src/input/input.c
+19
-21
No files found.
src/input/input.c
View file @
327ea9c1
...
@@ -684,22 +684,16 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
...
@@ -684,22 +684,16 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
while
(
vlc_object_alive
(
p_input
)
&&
!
p_input
->
b_error
)
while
(
vlc_object_alive
(
p_input
)
&&
!
p_input
->
b_error
)
{
{
bool
b_force_update
;
mtime_t
i_wakeup
=
0
;
vlc_value_t
val
;
bool
b_demux_polled
=
true
;
mtime_t
i_wakeup
;
bool
b_force_update
=
false
;
bool
b_paused
;
bool
b_paused
=
p_input
->
p
->
i_state
==
PAUSE_S
;
bool
b_demux_polled
;
/* Demux data */
b_force_update
=
false
;
i_wakeup
=
0
;
/* FIXME if p_input->p->i_state == PAUSE_S the access/access_demux
/* FIXME if p_input->p->i_state == PAUSE_S the access/access_demux
* is paused -> this may cause problem with some of them
* is paused -> this may cause problem with some of them
* The same problem can be seen when seeking while paused */
* The same problem can be seen when seeking while paused */
b_paused
=
p_input
->
p
->
i_state
==
PAUSE_S
&&
if
(
b_paused
)
(
!
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
)
||
p_input
->
p
->
input
.
b_eof
)
;
b_paused
=
!
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
)
||
p_input
->
p
->
input
.
b_eof
;
b_demux_polled
=
true
;
if
(
!
b_paused
)
if
(
!
b_paused
)
{
{
if
(
!
p_input
->
p
->
input
.
b_eof
)
if
(
!
p_input
->
p
->
input
.
b_eof
)
...
@@ -717,8 +711,9 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
...
@@ -717,8 +711,9 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
* This way we won't trigger timeshifting for nothing */
* This way we won't trigger timeshifting for nothing */
else
if
(
b_pause_after_eof
&&
p_input
->
p
->
b_can_pause
)
else
if
(
b_pause_after_eof
&&
p_input
->
p
->
b_can_pause
)
{
{
vlc_value_t
val
=
{
.
i_int
=
PAUSE_S
};
msg_Dbg
(
p_input
,
"pausing at EOF (pause after each)"
);
msg_Dbg
(
p_input
,
"pausing at EOF (pause after each)"
);
val
.
i_int
=
PAUSE_S
;
Control
(
p_input
,
INPUT_CONTROL_SET_STATE
,
val
);
Control
(
p_input
,
INPUT_CONTROL_SET_STATE
,
val
);
b_paused
=
true
;
b_paused
=
true
;
...
@@ -744,20 +739,23 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
...
@@ -744,20 +739,23 @@ static void MainLoop( input_thread_t *p_input, bool b_interactive )
{
{
mtime_t
i_limit
=
i_deadline
;
mtime_t
i_limit
=
i_deadline
;
/* We will postpone the execution of a seek until we have
/* Postpone seeking until ES buffering is complete or at most
* finished the ES bufferisation (postpone is limited to
* 125 ms. */
* 125ms) */
bool
b_buffering
=
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
)
bool
b_buffering
=
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
)
&&
&&
!
p_input
->
p
->
input
.
b_eof
;
!
p_input
->
p
->
input
.
b_eof
;
if
(
b_buffering
)
if
(
b_buffering
)
{
{
/* When postpone is in order, check the ES level every 20ms */
mtime_t
now
=
mdate
();
mtime_t
now
=
mdate
();
if
(
i_last_seek_mdate
+
INT64_C
(
125000
)
>=
now
)
i_limit
=
__MIN
(
i_deadline
,
now
+
INT64_C
(
20000
)
);
/* Recheck ES buffer level every 20 ms when seeking */
if
(
now
<
i_last_seek_mdate
+
INT64_C
(
125000
)
&&
i_deadline
>
now
+
INT64_C
(
20000
)
)
i_limit
=
now
+
INT64_C
(
20000
);
}
}
int
i_type
;
int
i_type
;
vlc_value_t
val
;
if
(
ControlPop
(
p_input
,
&
i_type
,
&
val
,
i_limit
,
b_buffering
)
)
if
(
ControlPop
(
p_input
,
&
i_type
,
&
val
,
i_limit
,
b_buffering
)
)
{
{
if
(
b_buffering
&&
i_limit
<
i_deadline
)
if
(
b_buffering
&&
i_limit
<
i_deadline
)
...
...
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