Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
c41d3aa3
Commit
c41d3aa3
authored
Sep 29, 2017
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci_filters: handle mouse events
parent
a39f72e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
modules/video_filter/ci_filters.m
modules/video_filter/ci_filters.m
+19
-0
No files found.
modules/video_filter/ci_filters.m
View file @
c41d3aa3
...
...
@@ -32,6 +32,7 @@
#include <vlc_picture.h>
#include <vlc_plugin.h>
#include <vlc_modules.h>
#include <vlc_mouse.h>
#include "filter_picture.h"
#include "vt_utils.h"
...
...
@@ -78,6 +79,9 @@ struct ci_filters_ctx
struct
filter_sys_t
{
char
const
*
psz_filter
;
bool
mouse_moved
;
vlc_mouse_t
old_mouse
;
vlc_mouse_t
mouse
;
struct
ci_filters_ctx
*
ctx
;
};
...
...
@@ -349,15 +353,29 @@ Filter(filter_t *filter, picture_t *src)
return
NULL
;
}
filter
->
p_sys
->
mouse_moved
=
false
;
return
dst
;
error:
if
(
dst
)
picture_Release
(
dst
);
picture_Release
(
src
);
filter
->
p_sys
->
mouse_moved
=
false
;
return
NULL
;
}
static
int
Mouse
(
filter_t
*
filter
,
struct
vlc_mouse_t
*
mouse
,
const
struct
vlc_mouse_t
*
old
,
const
struct
vlc_mouse_t
*
new
)
{
VLC_UNUSED
(
mouse
);
filter_sys_t
*
sys
=
filter
->
p_sys
;
sys
->
old_mouse
=
*
old
;
sys
->
mouse
=
*
new
;
sys
->
mouse_moved
=
true
;
return
VLC_EGENERIC
;
}
static
int
Open_FilterInit
(
filter_t
*
filter
,
struct
filter_chain
*
fchain
)
{
...
...
@@ -605,6 +623,7 @@ Open(vlc_object_t *obj, char const *psz_filter)
filter
->
p_sys
->
ctx
=
ctx
;
filter
->
pf_video_filter
=
Filter
;
filter
->
pf_video_mouse
=
Mouse
;
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