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
a47715a1
Commit
a47715a1
authored
May 23, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted input to vlc_clone().
parent
998746af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
src/input/input.c
src/input/input.c
+9
-5
src/input/input_internal.h
src/input/input_internal.h
+2
-0
No files found.
src/input/input.c
View file @
a47715a1
...
...
@@ -64,7 +64,7 @@
*****************************************************************************/
static
void
Destructor
(
input_thread_t
*
p_input
);
static
void
*
Run
(
v
lc_object_t
*
p_this
);
static
void
*
Run
(
v
oid
*
);
static
input_thread_t
*
Create
(
vlc_object_t
*
,
input_item_t
*
,
const
char
*
,
bool
,
input_resource_t
*
);
...
...
@@ -217,7 +217,9 @@ int input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
int
input_Start
(
input_thread_t
*
p_input
)
{
/* Create thread and wait for its readiness. */
if
(
vlc_thread_create
(
p_input
,
Run
,
VLC_THREAD_PRIORITY_INPUT
)
)
p_input
->
p
->
is_running
=
!
vlc_clone
(
&
p_input
->
p
->
thread
,
Run
,
p_input
,
VLC_THREAD_PRIORITY_INPUT
);
if
(
!
p_input
->
p
->
is_running
)
{
input_ChangeState
(
p_input
,
ERROR_S
);
msg_Err
(
p_input
,
"cannot create input thread"
);
...
...
@@ -257,7 +259,8 @@ void input_Stop( input_thread_t *p_input, bool b_abort )
*/
int
input_Close
(
input_thread_t
*
p_input
)
{
vlc_thread_join
(
p_input
);
if
(
p_input
->
p
->
is_running
)
vlc_join
(
p_input
->
p
->
thread
,
NULL
);
vlc_object_release
(
p_input
);
}
...
...
@@ -417,6 +420,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
vlc_cond_init
(
&
p_input
->
p
->
wait_control
);
p_input
->
p
->
i_control
=
0
;
p_input
->
p
->
b_abort
=
false
;
p_input
->
p
->
is_running
=
false
;
/* Create Object Variables for private use only */
input_ConfigVarInit
(
p_input
);
...
...
@@ -542,9 +546,9 @@ static void Destructor( 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
(
v
lc_object_t
*
p_this
)
static
void
*
Run
(
v
oid
*
obj
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
p_this
;
input_thread_t
*
p_input
=
(
input_thread_t
*
)
obj
;
const
int
canc
=
vlc_savecancel
();
if
(
Init
(
p_input
)
)
...
...
src/input/input_internal.h
View file @
a47715a1
...
...
@@ -164,6 +164,8 @@ struct input_thread_private_t
input_control_t
control
[
INPUT_CONTROL_FIFO_SIZE
];
bool
b_abort
;
bool
is_running
;
vlc_thread_t
thread
;
};
/***************************************************************************
...
...
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