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
7d185504
Commit
7d185504
authored
Dec 25, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* add some locking the the video filter2 handling code in video output core. Fix #945 (untested)
parent
f0fbcbd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
include/vlc_vout.h
include/vlc_vout.h
+1
-0
src/video_output/video_output.c
src/video_output/video_output.c
+6
-0
No files found.
include/vlc_vout.h
View file @
7d185504
...
@@ -398,6 +398,7 @@ struct vout_thread_t
...
@@ -398,6 +398,7 @@ struct vout_thread_t
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
vlc_mutex_t
subpicture_lock
;
/**< subpicture heap lock */
vlc_mutex_t
subpicture_lock
;
/**< subpicture heap lock */
vlc_mutex_t
change_lock
;
/**< thread change lock */
vlc_mutex_t
change_lock
;
/**< thread change lock */
vlc_mutex_t
vfilter_lock
;
/**< video filter2 change lock */
vout_sys_t
*
p_sys
;
/**< system output method */
vout_sys_t
*
p_sys
;
/**< system output method */
/**@}*/
/**@}*/
...
...
src/video_output/video_output.c
View file @
7d185504
...
@@ -308,6 +308,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
...
@@ -308,6 +308,7 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt )
/* Initialize locks */
/* Initialize locks */
vlc_mutex_init
(
p_vout
,
&
p_vout
->
picture_lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
picture_lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
change_lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
change_lock
);
vlc_mutex_init
(
p_vout
,
&
p_vout
->
vfilter_lock
);
/* Mouse coordinates */
/* Mouse coordinates */
var_Create
(
p_vout
,
"mouse-x"
,
VLC_VAR_INTEGER
);
var_Create
(
p_vout
,
"mouse-x"
,
VLC_VAR_INTEGER
);
...
@@ -942,6 +943,7 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -942,6 +943,7 @@ static void RunThread( vout_thread_t *p_vout)
if
(
p_vout
->
b_vfilter_change
==
VLC_TRUE
)
if
(
p_vout
->
b_vfilter_change
==
VLC_TRUE
)
{
{
int
i
;
int
i
;
vlc_mutex_lock
(
&
p_vout
->
vfilter_lock
);
RemoveVideoFilters2
(
p_vout
);
RemoveVideoFilters2
(
p_vout
);
for
(
i
=
0
;
i
<
p_vout
->
i_vfilters_cfg
;
i
++
)
for
(
i
=
0
;
i
<
p_vout
->
i_vfilters_cfg
;
i
++
)
{
{
...
@@ -988,6 +990,7 @@ static void RunThread( vout_thread_t *p_vout)
...
@@ -988,6 +990,7 @@ static void RunThread( vout_thread_t *p_vout)
}
}
}
}
p_vout
->
b_vfilter_change
=
VLC_FALSE
;
p_vout
->
b_vfilter_change
=
VLC_FALSE
;
vlc_mutex_unlock
(
&
p_vout
->
vfilter_lock
);
}
}
if
(
p_picture
)
if
(
p_picture
)
...
@@ -1284,6 +1287,7 @@ static void DestroyThread( vout_thread_t *p_vout )
...
@@ -1284,6 +1287,7 @@ static void DestroyThread( vout_thread_t *p_vout )
/* Destroy the locks */
/* Destroy the locks */
vlc_mutex_destroy
(
&
p_vout
->
picture_lock
);
vlc_mutex_destroy
(
&
p_vout
->
picture_lock
);
vlc_mutex_destroy
(
&
p_vout
->
change_lock
);
vlc_mutex_destroy
(
&
p_vout
->
change_lock
);
vlc_mutex_destroy
(
&
p_vout
->
vfilter_lock
);
/* Release the module */
/* Release the module */
if
(
p_vout
&&
p_vout
->
p_module
)
if
(
p_vout
&&
p_vout
->
p_module
)
...
@@ -1589,8 +1593,10 @@ static int VideoFilter2Callback( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1589,8 +1593,10 @@ static int VideoFilter2Callback( vlc_object_t *p_this, char const *psz_cmd,
{
{
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
p_this
;
vlc_mutex_lock
(
&
p_vout
->
vfilter_lock
);
ParseVideoFilter2Chain
(
p_vout
,
newval
.
psz_string
);
ParseVideoFilter2Chain
(
p_vout
,
newval
.
psz_string
);
p_vout
->
b_vfilter_change
=
VLC_TRUE
;
p_vout
->
b_vfilter_change
=
VLC_TRUE
;
vlc_mutex_unlock
(
&
p_vout
->
vfilter_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