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
beaa348e
Commit
beaa348e
authored
Feb 10, 2010
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the normal vlm lock to protect access to the condition variable.
parent
7e6968ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
src/input/vlm.c
src/input/vlm.c
+15
-18
src/input/vlm_internal.h
src/input/vlm_internal.h
+1
-2
src/input/vlmshell.c
src/input/vlmshell.c
+3
-3
No files found.
src/input/vlm.c
View file @
beaa348e
...
@@ -105,9 +105,9 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -105,9 +105,9 @@ static int InputEvent( vlc_object_t *p_this, char const *psz_cmd,
}
}
vlm_SendEventMediaInstanceState
(
p_vlm
,
p_media
->
cfg
.
id
,
p_media
->
cfg
.
psz_name
,
psz_instance_name
,
var_GetInteger
(
p_input
,
"state"
)
);
vlm_SendEventMediaInstanceState
(
p_vlm
,
p_media
->
cfg
.
id
,
p_media
->
cfg
.
psz_name
,
psz_instance_name
,
var_GetInteger
(
p_input
,
"state"
)
);
vlc_mutex_lock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_lock
(
&
p_vlm
->
lock
);
vlc_cond_signal
(
&
p_vlm
->
wait
_manage
);
vlc_cond_signal
(
&
p_vlm
->
wait
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -146,8 +146,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
...
@@ -146,8 +146,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
}
}
vlc_mutex_init
(
&
p_vlm
->
lock
);
vlc_mutex_init
(
&
p_vlm
->
lock
);
vlc_mutex_init
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_init
(
&
p_vlm
->
lock
);
vlc_cond_init_daytime
(
&
p_vlm
->
wait
_manage
);
vlc_cond_init_daytime
(
&
p_vlm
->
wait
);
p_vlm
->
i_id
=
1
;
p_vlm
->
i_id
=
1
;
TAB_INIT
(
p_vlm
->
i_media
,
p_vlm
->
media
);
TAB_INIT
(
p_vlm
->
i_media
,
p_vlm
->
media
);
TAB_INIT
(
p_vlm
->
i_schedule
,
p_vlm
->
schedule
);
TAB_INIT
(
p_vlm
->
i_schedule
,
p_vlm
->
schedule
);
...
@@ -158,8 +158,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
...
@@ -158,8 +158,8 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
if
(
vlc_clone
(
&
p_vlm
->
thread
,
Manage
,
p_vlm
,
VLC_THREAD_PRIORITY_LOW
)
)
if
(
vlc_clone
(
&
p_vlm
->
thread
,
Manage
,
p_vlm
,
VLC_THREAD_PRIORITY_LOW
)
)
{
{
vlc_cond_destroy
(
&
p_vlm
->
wait
_manage
);
vlc_cond_destroy
(
&
p_vlm
->
wait
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_object_release
(
p_vlm
);
vlc_object_release
(
p_vlm
);
vlc_mutex_unlock
(
&
vlm_mutex
);
vlc_mutex_unlock
(
&
vlm_mutex
);
...
@@ -218,17 +218,17 @@ static void vlm_Destructor( vlm_t *p_vlm )
...
@@ -218,17 +218,17 @@ static void vlm_Destructor( vlm_t *p_vlm )
vlm_ControlInternal
(
p_vlm
,
VLM_CLEAR_SCHEDULES
);
vlm_ControlInternal
(
p_vlm
,
VLM_CLEAR_SCHEDULES
);
TAB_CLEAN
(
p_vlm
->
schedule
,
p_vlm
->
schedule
);
TAB_CLEAN
(
p_vlm
->
schedule
,
p_vlm
->
schedule
);
vlc_mutex_lock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_lock
(
&
p_vlm
->
lock
);
vlc_cond_signal
(
&
p_vlm
->
wait
_manage
);
vlc_cond_signal
(
&
p_vlm
->
wait
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
libvlc_priv
(
p_vlm
->
p_libvlc
)
->
p_vlm
=
NULL
;
libvlc_priv
(
p_vlm
->
p_libvlc
)
->
p_vlm
=
NULL
;
vlc_object_kill
(
p_vlm
);
vlc_object_kill
(
p_vlm
);
/*vlc_cancel( p_vlm->thread ); */
/*vlc_cancel( p_vlm->thread ); */
vlc_join
(
p_vlm
->
thread
,
NULL
);
vlc_join
(
p_vlm
->
thread
,
NULL
);
vlc_cond_destroy
(
&
p_vlm
->
wait
_manage
);
vlc_cond_destroy
(
&
p_vlm
->
wait
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
vlc_mutex_destroy
(
&
p_vlm
->
lock
);
}
}
...
@@ -373,14 +373,11 @@ static void* Manage( void* p_object )
...
@@ -373,14 +373,11 @@ static void* Manage( void* p_object )
char
**
ppsz_scheduled_commands
=
NULL
;
char
**
ppsz_scheduled_commands
=
NULL
;
int
i_scheduled_commands
=
0
;
int
i_scheduled_commands
=
0
;
vlc_mutex_lock
(
&
vlm
->
lock
_manage
);
vlc_mutex_lock
(
&
vlm
->
lock
);
if
(
i_nextschedule
)
if
(
i_nextschedule
)
vlc_cond_timedwait
(
&
vlm
->
wait
_manage
,
&
vlm
->
lock_manage
,
i_nextschedule
);
vlc_cond_timedwait
(
&
vlm
->
wait
,
&
vlm
->
lock
,
i_nextschedule
);
else
else
vlc_cond_wait
(
&
vlm
->
wait_manage
,
&
vlm
->
lock_manage
);
vlc_cond_wait
(
&
vlm
->
wait
,
&
vlm
->
lock
);
vlc_mutex_unlock
(
&
vlm
->
lock_manage
);
vlc_mutex_lock
(
&
vlm
->
lock
);
/* destroy the inputs that wants to die, and launch the next input */
/* destroy the inputs that wants to die, and launch the next input */
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
for
(
i
=
0
;
i
<
vlm
->
i_media
;
i
++
)
...
...
src/input/vlm_internal.h
View file @
beaa348e
...
@@ -90,8 +90,7 @@ struct vlm_t
...
@@ -90,8 +90,7 @@ struct vlm_t
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
vlc_thread_t
thread
;
vlc_thread_t
thread
;
vlc_mutex_t
lock_manage
;
vlc_cond_t
wait
;
vlc_cond_t
wait_manage
;
/* */
/* */
int64_t
i_id
;
int64_t
i_id
;
...
...
src/input/vlmshell.c
View file @
beaa348e
...
@@ -665,9 +665,9 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
...
@@ -665,9 +665,9 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
}
}
*
pp_status
=
vlm_MessageSimpleNew
(
psz_cmd
);
*
pp_status
=
vlm_MessageSimpleNew
(
psz_cmd
);
vlc_mutex_lock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_lock
(
&
p_vlm
->
lock
);
vlc_cond_signal
(
&
p_vlm
->
wait
_manage
);
vlc_cond_signal
(
&
p_vlm
->
wait
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
_manage
);
vlc_mutex_unlock
(
&
p_vlm
->
lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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