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
1f8343b8
Commit
1f8343b8
authored
Nov 28, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Hide es out timeshift delay from time display."
This reverts commit
d30180d8
.
parent
3074c601
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
72 deletions
+11
-72
src/input/es_out.c
src/input/es_out.c
+1
-6
src/input/es_out.h
src/input/es_out.h
+4
-7
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+4
-27
src/input/input.c
src/input/input.c
+1
-28
src/input/input_internal.h
src/input/input_internal.h
+1
-4
No files found.
src/input/es_out.c
View file @
1f8343b8
...
...
@@ -2249,14 +2249,9 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
}
case
ES_OUT_GET_BUFFERING
:
{
#warning "TODO ES_OUT_GET_BUFFERING"
bool
*
pb
=
(
bool
*
)
va_arg
(
args
,
bool
*
);
mtime_t
*
pi_delay
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
pb
=
(
bool
*
)
va_arg
(
args
,
bool
*
);
*
pb
=
p_sys
->
b_buffering
;
*
pi_delay
=
0
;
return
VLC_SUCCESS
;
}
case
ES_OUT_GET_EMPTY
:
pb
=
(
bool
*
)
va_arg
(
args
,
bool
*
);
...
...
src/input/es_out.h
View file @
1f8343b8
...
...
@@ -49,7 +49,7 @@ enum es_out_query_private_e
ES_OUT_SET_ES_DEFAULT_BY_ID
,
/* Get buffering state */
ES_OUT_GET_BUFFERING
,
/* arg1=bool*
, arg2=mtime_t*
res=cannot fail */
ES_OUT_GET_BUFFERING
,
/* arg1=bool* res=cannot fail */
/* Check if es_out has still data to play */
ES_OUT_GET_EMPTY
,
/* arg1=bool* res=cannot fail */
...
...
@@ -81,15 +81,12 @@ static inline mtime_t es_out_GetWakeup( es_out_t *p_out )
assert
(
!
i_ret
);
return
i_wu
;
}
static
inline
bool
es_out_GetBuffering
(
es_out_t
*
p_out
,
mtime_t
*
pi_delay
)
static
inline
bool
es_out_GetBuffering
(
es_out_t
*
p_out
)
{
bool
b
;
mtime_t
i_delay
;
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_GET_BUFFERING
,
&
b
,
&
i_delay
);
assert
(
!
i_ret
);
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_GET_BUFFERING
,
&
b
);
if
(
pi_delay
)
*
pi_delay
=
i_delay
;
assert
(
!
i_ret
);
return
b
;
}
static
inline
bool
es_out_GetEmpty
(
es_out_t
*
p_out
)
...
...
src/input/es_out_timeshift.c
View file @
1f8343b8
...
...
@@ -239,7 +239,6 @@ static bool TsHasCmd( ts_thread_t * );
static
bool
TsIsUnused
(
ts_thread_t
*
);
static
int
TsChangePause
(
ts_thread_t
*
,
bool
b_source_paused
,
bool
b_paused
,
mtime_t
i_date
);
static
int
TsChangeRate
(
ts_thread_t
*
,
int
i_src_rate
,
int
i_rate
);
static
mtime_t
TsGetDelay
(
ts_thread_t
*
);
static
void
*
TsRun
(
vlc_object_t
*
);
...
...
@@ -461,22 +460,14 @@ static int ControlLockedGetWakeup( es_out_t *p_out, mtime_t *pi_wakeup )
return
VLC_SUCCESS
;
}
static
int
ControlLockedGetBuffering
(
es_out_t
*
p_out
,
bool
*
pb_buffering
,
mtime_t
*
pi_delay
)
static
int
ControlLockedGetBuffering
(
es_out_t
*
p_out
,
bool
*
pb_buffering
)
{
es_out_sys_t
*
p_sys
=
p_out
->
p_sys
;
if
(
p_sys
->
b_delayed
)
{
mtime_t
i_delay
;
es_out_GetBuffering
(
p_sys
->
p_out
,
&
i_delay
);
*
pb_buffering
=
true
;
*
pi_delay
=
i_delay
+
TsGetDelay
(
p_sys
->
p_thread
);
}
else
{
*
pb_buffering
=
es_out_GetBuffering
(
p_sys
->
p_out
,
pi_delay
);
}
*
pb_buffering
=
es_out_GetBuffering
(
p_sys
->
p_out
);
return
VLC_SUCCESS
;
}
...
...
@@ -644,8 +635,7 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
case
ES_OUT_GET_BUFFERING
:
{
bool
*
pb_buffering
=
(
bool
*
)
va_arg
(
args
,
bool
*
);
mtime_t
*
pi_delay
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
return
ControlLockedGetBuffering
(
p_out
,
pb_buffering
,
pi_delay
);
return
ControlLockedGetBuffering
(
p_out
,
pb_buffering
);
}
case
ES_OUT_SET_PAUSE_STATE
:
{
...
...
@@ -911,19 +901,6 @@ static int TsChangeRate( ts_thread_t *p_ts, int i_src_rate, int i_rate )
return
i_ret
;
}
static
mtime_t
TsGetDelay
(
ts_thread_t
*
p_ts
)
{
mtime_t
i_delay
;
vlc_mutex_lock
(
&
p_ts
->
lock
);
i_delay
=
p_ts
->
i_cmd_delay
+
p_ts
->
i_rate_delay
+
p_ts
->
i_buffering_delay
;
if
(
p_ts
->
b_paused
)
i_delay
+=
mdate
()
-
p_ts
->
i_pause_date
;
vlc_mutex_unlock
(
&
p_ts
->
lock
);
return
i_delay
;
}
static
void
*
TsRun
(
vlc_object_t
*
p_thread
)
{
...
...
@@ -943,7 +920,7 @@ static void *TsRun( vlc_object_t *p_thread )
for
(
;;
)
{
const
int
canc
=
vlc_savecancel
();
b_buffering
=
es_out_GetBuffering
(
p_ts
->
p_out
,
NULL
);
b_buffering
=
es_out_GetBuffering
(
p_ts
->
p_out
);
if
(
(
!
p_ts
->
b_paused
||
b_buffering
)
&&
!
TsPopCmdLocked
(
p_ts
,
&
cmd
,
false
)
)
{
...
...
src/input/input.c
View file @
1f8343b8
...
...
@@ -198,7 +198,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input
->
p
->
input
.
b_rescale_ts
=
true
;
p_input
->
p
->
input
.
b_eof
=
false
;
p_input
->
p
->
input
.
i_cr_average
=
0
;
memset
(
&
p_input
->
p
->
input_last_times
,
0
,
sizeof
(
p_input
->
p
->
input_last_times
)
);
vlc_mutex_lock
(
&
p_item
->
lock
);
...
...
@@ -646,9 +645,6 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed, mtime_t *p
static
void
MainLoopInterface
(
input_thread_t
*
p_input
)
{
input_event_times_t
ev
;
mtime_t
i_es_out_delay
;
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
,
&
i_es_out_delay
);
ev
.
f_position
=
0
.
0
;
ev
.
i_time
=
0
;
...
...
@@ -667,29 +663,6 @@ static void MainLoopInterface( input_thread_t *p_input )
DEMUX_GET_LENGTH
,
&
ev
.
i_length
)
)
ev
.
i_length
=
0
;
if
(
ev
.
i_time
>
0
)
{
ev
.
i_time
-=
i_es_out_delay
;
if
(
ev
.
i_time
<
0
)
ev
.
i_time
=
0
;
}
if
(
ev
.
i_length
>
0
)
{
ev
.
f_position
-=
(
double
)
i_es_out_delay
/
ev
.
i_length
;
}
if
(
p_input
->
i_state
==
PAUSE_S
)
{
input_event_times_t
old
=
p_input
->
p
->
input_last_times
;
/* XXX We have a jitter because of PCR frequency/get time precision.
* Hides it */
if
(
llabs
(
ev
.
i_time
-
old
.
i_time
)
<
CLOCK_FREQ
)
ev
.
i_time
=
old
.
i_time
;
}
p_input
->
p
->
input_last_times
=
ev
;
input_SendEventTimes
(
p_input
,
&
ev
);
}
...
...
@@ -739,7 +712,7 @@ static void MainLoop( input_thread_t *p_input )
* is paused -> this may cause problem with some of them
* The same problem can be seen when seeking while paused */
b_paused
=
p_input
->
i_state
==
PAUSE_S
&&
!
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
,
NULL
);
!
es_out_GetBuffering
(
p_input
->
p
->
p_es_out
);
if
(
!
b_paused
)
{
...
...
src/input/input_internal.h
View file @
1f8343b8
...
...
@@ -33,7 +33,6 @@
#include <vlc_input.h>
#include <libvlc.h>
#include "input_interface.h"
#include "event.h"
/*****************************************************************************
* Private input fields
...
...
@@ -119,9 +118,7 @@ struct input_thread_private_t
bool
b_out_pace_control
;
/* idem ? */
/* Main input properties */
input_source_t
input
;
input_event_times_t
input_last_times
;
input_source_t
input
;
/* Slave demuxers (subs, and others) */
int
i_slave
;
input_source_t
**
slave
;
...
...
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