Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
087f8dc2
Commit
087f8dc2
authored
Nov 22, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics.
parent
71536498
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
30 deletions
+32
-30
src/input/input.c
src/input/input.c
+31
-0
src/input/input_internal.h
src/input/input_internal.h
+1
-30
No files found.
src/input/input.c
View file @
087f8dc2
...
...
@@ -1398,6 +1398,37 @@ static void End( input_thread_t * p_input )
/*****************************************************************************
* Control
*****************************************************************************/
void
input_ControlPush
(
input_thread_t
*
p_input
,
int
i_type
,
vlc_value_t
*
p_val
)
{
vlc_mutex_lock
(
&
p_input
->
p
->
lock_control
);
if
(
i_type
==
INPUT_CONTROL_SET_DIE
)
{
/* Special case, empty the control */
p_input
->
p
->
i_control
=
1
;
p_input
->
p
->
control
[
0
].
i_type
=
i_type
;
memset
(
&
p_input
->
p
->
control
[
0
].
val
,
0
,
sizeof
(
vlc_value_t
)
);
}
else
if
(
p_input
->
p
->
i_control
>=
INPUT_CONTROL_FIFO_SIZE
)
{
msg_Err
(
p_input
,
"input control fifo overflow, trashing type=%d"
,
i_type
);
}
else
{
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
i_type
=
i_type
;
if
(
p_val
)
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
val
=
*
p_val
;
else
memset
(
&
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
val
,
0
,
sizeof
(
vlc_value_t
)
);
p_input
->
p
->
i_control
++
;
}
vlc_cond_signal
(
&
p_input
->
p
->
wait_control
);
vlc_mutex_unlock
(
&
p_input
->
p
->
lock_control
);
}
static
inline
int
ControlPopNoLock
(
input_thread_t
*
p_input
,
int
*
pi_type
,
vlc_value_t
*
p_val
,
mtime_t
i_deadline
)
...
...
src/input/input_internal.h
View file @
087f8dc2
...
...
@@ -203,36 +203,7 @@ enum input_control_e
};
/* Internal helpers */
static
inline
void
input_ControlPush
(
input_thread_t
*
p_input
,
int
i_type
,
vlc_value_t
*
p_val
)
{
vlc_mutex_lock
(
&
p_input
->
p
->
lock_control
);
if
(
i_type
==
INPUT_CONTROL_SET_DIE
)
{
/* Special case, empty the control */
p_input
->
p
->
i_control
=
1
;
p_input
->
p
->
control
[
0
].
i_type
=
i_type
;
memset
(
&
p_input
->
p
->
control
[
0
].
val
,
0
,
sizeof
(
vlc_value_t
)
);
}
else
if
(
p_input
->
p
->
i_control
>=
INPUT_CONTROL_FIFO_SIZE
)
{
msg_Err
(
p_input
,
"input control fifo overflow, trashing type=%d"
,
i_type
);
}
else
{
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
i_type
=
i_type
;
if
(
p_val
)
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
val
=
*
p_val
;
else
memset
(
&
p_input
->
p
->
control
[
p_input
->
p
->
i_control
].
val
,
0
,
sizeof
(
vlc_value_t
)
);
p_input
->
p
->
i_control
++
;
}
vlc_cond_signal
(
&
p_input
->
p
->
wait_control
);
vlc_mutex_unlock
(
&
p_input
->
p
->
lock_control
);
}
void
input_ControlPush
(
input_thread_t
*
,
int
i_type
,
vlc_value_t
*
);
/**********************************************************************
* Item metadata
...
...
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