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
e709ac0c
Commit
e709ac0c
authored
Jun 30, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: hook an interruption context to stop the input
parent
d5567521
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
src/input/input.c
src/input/input.c
+7
-0
src/input/input_internal.h
src/input/input_internal.h
+2
-0
No files found.
src/input/input.c
View file @
e709ac0c
...
...
@@ -236,6 +236,9 @@ void input_Stop( input_thread_t *p_input )
sys
->
is_stopped
=
true
;
vlc_cond_signal
(
&
sys
->
wait_control
);
vlc_mutex_unlock
(
&
sys
->
lock_control
);
/* Interrupt access/stream/demux/etc *after* the input is stopped.
* Otherwise the interruption could be mistreated as a spurious wake-up. */
vlc_interrupt_raise
(
&
sys
->
interrupt
);
}
/**
...
...
@@ -247,6 +250,7 @@ void input_Close( input_thread_t *p_input )
{
if
(
p_input
->
p
->
is_running
)
vlc_join
(
p_input
->
p
->
thread
,
NULL
);
vlc_interrupt_deinit
(
&
p_input
->
p
->
interrupt
);
vlc_object_release
(
p_input
);
}
...
...
@@ -419,6 +423,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
vlc_mutex_init
(
&
p_input
->
p
->
lock_control
);
vlc_cond_init
(
&
p_input
->
p
->
wait_control
);
p_input
->
p
->
i_control
=
0
;
vlc_interrupt_init
(
&
p_input
->
p
->
interrupt
);
/* Create Object Variables for private use only */
input_ConfigVarInit
(
p_input
);
...
...
@@ -512,6 +517,8 @@ static void *Run( void *obj )
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
obj
;
vlc_interrupt_set
(
&
p_input
->
p
->
interrupt
);
if
(
!
Init
(
p_input
)
)
{
MainLoop
(
p_input
,
true
);
/* FIXME it can be wrong (like with VLM) */
...
...
src/input/input_internal.h
View file @
e709ac0c
...
...
@@ -29,6 +29,7 @@
#include <vlc_input.h>
#include <libvlc.h>
#include "input_interface.h"
#include "misc/interrupt.h"
/*****************************************************************************
* Private input fields
...
...
@@ -164,6 +165,7 @@ struct input_thread_private_t
input_control_t
control
[
INPUT_CONTROL_FIFO_SIZE
];
vlc_thread_t
thread
;
vlc_interrupt_t
interrupt
;
};
/***************************************************************************
...
...
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