Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
57eefa00
Commit
57eefa00
authored
May 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Erase: actual thread-safety
parent
8c1c227d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/video_filter/erase.c
modules/video_filter/erase.c
+8
-7
No files found.
modules/video_filter/erase.c
View file @
57eefa00
...
...
@@ -169,12 +169,11 @@ static int Create( vlc_object_t *p_this )
p_sys
->
i_x
=
var_CreateGetIntegerCommand
(
p_filter
,
CFG_PREFIX
"x"
);
p_sys
->
i_y
=
var_CreateGetIntegerCommand
(
p_filter
,
CFG_PREFIX
"y"
);
vlc_mutex_init
(
&
p_sys
->
lock
);
var_AddCallback
(
p_filter
,
CFG_PREFIX
"x"
,
EraseCallback
,
p_sys
);
var_AddCallback
(
p_filter
,
CFG_PREFIX
"y"
,
EraseCallback
,
p_sys
);
var_AddCallback
(
p_filter
,
CFG_PREFIX
"mask"
,
EraseCallback
,
p_sys
);
vlc_mutex_init
(
&
p_sys
->
lock
);
return
VLC_SUCCESS
;
}
...
...
@@ -188,6 +187,9 @@ static void Destroy( vlc_object_t *p_this )
if
(
p_sys
->
p_mask
)
picture_Release
(
p_sys
->
p_mask
);
var_DelCallback
(
p_filter
,
CFG_PREFIX
"x"
,
EraseCallback
,
p_sys
);
var_DelCallback
(
p_filter
,
CFG_PREFIX
"y"
,
EraseCallback
,
p_sys
);
var_DelCallback
(
p_filter
,
CFG_PREFIX
"mask"
,
EraseCallback
,
p_sys
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
p_filter
->
p_sys
);
...
...
@@ -223,13 +225,12 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
int
i_plane
;
vlc_mutex_lock
(
&
p_sys
->
lock
);
const
int
i_mask_pitch
=
p_sys
->
p_mask
->
A_PITCH
;
const
int
i_mask_visible_pitch
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_pitch
;
const
int
i_mask_visible_lines
=
p_sys
->
p_mask
->
p
[
A_PLANE
].
i_visible_lines
;
for
(
i_plane
=
0
;
i_plane
<
p_inpic
->
i_planes
;
i_plane
++
)
for
(
i
nt
i
_plane
=
0
;
i_plane
<
p_inpic
->
i_planes
;
i_plane
++
)
{
const
int
i_pitch
=
p_inpic
->
p
[
i_plane
].
i_pitch
;
const
int
i_2pitch
=
i_pitch
<<
1
;
...
...
@@ -240,9 +241,8 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
uint8_t
*
p_inpix
=
p_inpic
->
p
[
i_plane
].
p_pixels
;
uint8_t
*
p_outpix
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
uint8_t
*
p_mask
=
p_sys
->
p_mask
->
A_PIXELS
;
int
i_x
=
p_sys
->
i_x
,
i_y
=
p_sys
->
i_y
;
int
i_x
=
p_sys
->
i_x
,
i_y
=
p_sys
->
i_y
;
int
x
,
y
;
int
i_height
=
i_mask_visible_lines
;
int
i_width
=
i_mask_visible_pitch
;
...
...
@@ -394,6 +394,7 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
}
}
}
vlc_mutex_unlock
(
&
p_sys
->
lock
);
}
static
int
EraseCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
...
...
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