Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f137ba51
Commit
f137ba51
authored
Nov 13, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow using es_out timeshift pause support.
parent
7e1b9f44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
32 deletions
+38
-32
src/input/input.c
src/input/input.c
+38
-32
No files found.
src/input/input.c
View file @
f137ba51
...
...
@@ -490,7 +490,7 @@ void input_StopThread( input_thread_t *p_input )
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_DIE
,
NULL
);
}
sout_instance_t
*
input_DetachSout
(
input_thread_t
*
p_input
)
sout_instance_t
*
input_DetachSout
(
input_thread_t
*
p_input
)
{
assert
(
p_input
->
b_dead
);
sout_instance_t
*
p_sout
=
p_input
->
p
->
p_sout
;
...
...
@@ -504,7 +504,7 @@ sout_instance_t * input_DetachSout( input_thread_t *p_input )
* This is the "normal" thread that spawns the input processing chain,
* reads the stream, cleans up and waits
*****************************************************************************/
static
void
*
Run
(
vlc_object_t
*
p_this
)
static
void
*
Run
(
vlc_object_t
*
p_this
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
p_this
;
const
int
canc
=
vlc_savecancel
();
...
...
@@ -536,7 +536,7 @@ exit:
* This is the "just forget me" thread that spawns the input processing chain,
* reads the stream, cleans up and releases memory
*****************************************************************************/
static
void
*
RunAndDestroy
(
vlc_object_t
*
p_this
)
static
void
*
RunAndDestroy
(
vlc_object_t
*
p_this
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
p_this
;
const
int
canc
=
vlc_savecancel
();
...
...
@@ -1498,8 +1498,11 @@ static void ControlReduce( input_thread_t *p_input )
/* Pause input */
static
void
ControlPause
(
input_thread_t
*
p_input
,
mtime_t
i_control_date
)
{
int
i_ret
;
int
i_state
;
int
i_ret
=
VLC_SUCCESS
;
int
i_state
=
PAUSE_S
;
if
(
p_input
->
p
->
b_can_pause
)
{
if
(
p_input
->
p
->
input
.
p_access
)
i_ret
=
access_Control
(
p_input
->
p
->
input
.
p_access
,
ACCESS_SET_PAUSE_STATE
,
true
);
...
...
@@ -1507,30 +1510,32 @@ static void ControlPause( input_thread_t *p_input, mtime_t i_control_date )
i_ret
=
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_PAUSE_STATE
,
true
);
i_state
=
PAUSE_S
;
if
(
i_ret
)
{
msg_Warn
(
p_input
,
"cannot set pause state"
);
i_state
=
p_input
->
i_state
;
}
}
/* Switch to new state */
input_ChangeStateWithVarCallback
(
p_input
,
i_state
,
false
);
/* */
if
(
!
i_ret
)
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
tru
e
,
true
,
i_control_date
);
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
p_input
->
p
->
b_can_paus
e
,
true
,
i_control_date
);
}
static
void
ControlUnpause
(
input_thread_t
*
p_input
,
mtime_t
i_control_date
)
{
int
i_ret
;
int
i_ret
=
VLC_SUCCESS
;
if
(
p_input
->
p
->
b_can_pause
)
{
if
(
p_input
->
p
->
input
.
p_access
)
i_ret
=
access_Control
(
p_input
->
p
->
input
.
p_access
,
ACCESS_SET_PAUSE_STATE
,
false
);
else
i_ret
=
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_PAUSE_STATE
,
false
);
if
(
i_ret
)
{
/* FIXME What to do ? */
...
...
@@ -1539,6 +1544,7 @@ static void ControlUnpause( input_thread_t *p_input, mtime_t i_control_date )
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_DIE
,
NULL
);
vlc_mutex_lock
(
&
p_input
->
p
->
lock_control
);
}
}
/* Switch to play */
input_ChangeStateWithVarCallback
(
p_input
,
PLAYING_S
,
false
);
...
...
@@ -1676,14 +1682,14 @@ static bool Control( input_thread_t *p_input, int i_type,
b_force_update
=
true
;
}
else
if
(
val
.
i_int
==
PAUSE_S
&&
p_input
->
i_state
==
PLAYING_S
&&
p_input
->
p
->
b_can_pause
)
else
if
(
val
.
i_int
==
PAUSE_S
&&
p_input
->
i_state
==
PLAYING_S
/*
&&
p_input->p->b_can_pause
*/
)
{
ControlPause
(
p_input
,
i_control_date
);
b_force_update
=
true
;
}
else
if
(
val
.
i_int
==
PAUSE_S
&&
!
p_input
->
p
->
b_can_pause
)
else
if
(
val
.
i_int
==
PAUSE_S
&&
!
p_input
->
p
->
b_can_pause
&&
0
)
{
b_force_update
=
true
;
...
...
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