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
3b671854
Commit
3b671854
authored
May 13, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Android vout: support the mouse events from jni
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
d4485d3f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
modules/video_output/android/opaque.c
modules/video_output/android/opaque.c
+1
-1
modules/video_output/android/surface.c
modules/video_output/android/surface.c
+1
-1
modules/video_output/android/utils.c
modules/video_output/android/utils.c
+23
-0
modules/video_output/android/utils.h
modules/video_output/android/utils.h
+8
-0
No files found.
modules/video_output/android/opaque.c
View file @
3b671854
...
@@ -235,7 +235,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -235,7 +235,7 @@ static int Open(vlc_object_t *p_this)
vd
->
display
=
Display
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
vd
->
control
=
Control
;
vd
->
prepare
=
NULL
;
vd
->
prepare
=
NULL
;
vd
->
manage
=
NULL
;
vd
->
manage
=
Manage
;
/* Fix initial state */
/* Fix initial state */
vout_display_SendEventFullscreen
(
vd
,
false
);
vout_display_SendEventFullscreen
(
vd
,
false
);
...
...
modules/video_output/android/surface.c
View file @
3b671854
...
@@ -274,7 +274,7 @@ static int Open(vlc_object_t *p_this)
...
@@ -274,7 +274,7 @@ static int Open(vlc_object_t *p_this)
vd
->
display
=
Display
;
vd
->
display
=
Display
;
vd
->
control
=
Control
;
vd
->
control
=
Control
;
vd
->
prepare
=
NULL
;
vd
->
prepare
=
NULL
;
vd
->
manage
=
NULL
;
vd
->
manage
=
Manage
;
/* Fix initial state */
/* Fix initial state */
vout_display_SendEventFullscreen
(
vd
,
false
);
vout_display_SendEventFullscreen
(
vd
,
false
);
...
...
modules/video_output/android/utils.c
View file @
3b671854
...
@@ -48,3 +48,26 @@ void *LoadNativeWindowAPI(native_window_api_t *native)
...
@@ -48,3 +48,26 @@ void *LoadNativeWindowAPI(native_window_api_t *native)
dlclose
(
p_library
);
dlclose
(
p_library
);
return
NULL
;
return
NULL
;
}
}
extern
void
jni_getMouseCoordinates
(
int
*
,
int
*
,
int
*
,
int
*
);
void
Manage
(
vout_display_t
*
vd
)
{
int
x
,
y
,
button
,
action
;
jni_getMouseCoordinates
(
&
action
,
&
button
,
&
x
,
&
y
);
if
(
x
>=
0
&&
y
>=
0
)
{
switch
(
action
)
{
case
AMOTION_EVENT_ACTION_DOWN
:
vout_display_SendEventMouseMoved
(
vd
,
x
,
y
);
vout_display_SendEventMousePressed
(
vd
,
button
);
break
;
case
AMOTION_EVENT_ACTION_UP
:
vout_display_SendEventMouseMoved
(
vd
,
x
,
y
);
vout_display_SendEventMouseReleased
(
vd
,
button
);
break
;
case
AMOTION_EVENT_ACTION_MOVE
:
vout_display_SendEventMouseMoved
(
vd
,
x
,
y
);
break
;
}
}
}
modules/video_output/android/utils.h
View file @
3b671854
...
@@ -20,9 +20,16 @@
...
@@ -20,9 +20,16 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <android/native_window.h>
#include <android/native_window.h>
#include <jni.h>
#include <jni.h>
#include <android/native_window_jni.h>
#include <android/native_window_jni.h>
#include <android/input.h>
#include <vlc_vout_display.h>
typedef
ANativeWindow
*
(
*
ptr_ANativeWindow_fromSurface
)(
JNIEnv
*
,
jobject
);
typedef
ANativeWindow
*
(
*
ptr_ANativeWindow_fromSurface
)(
JNIEnv
*
,
jobject
);
typedef
void
(
*
ptr_ANativeWindow_release
)(
ANativeWindow
*
);
typedef
void
(
*
ptr_ANativeWindow_release
)(
ANativeWindow
*
);
...
@@ -40,3 +47,4 @@ typedef struct
...
@@ -40,3 +47,4 @@ typedef struct
/* Fill the structure passed as parameter and return a library handle
/* Fill the structure passed as parameter and return a library handle
that should be destroyed with dlclose. */
that should be destroyed with dlclose. */
void
*
LoadNativeWindowAPI
(
native_window_api_t
*
native
);
void
*
LoadNativeWindowAPI
(
native_window_api_t
*
native
);
void
Manage
(
vout_display_t
*
);
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