[vlc-devel] [PATCH 11/17] android: utils: move AWindowHandler after jfields

Alexandre Janniaux ajanni at videolabs.io
Wed Jan 13 11:07:24 UTC 2021


jfields will be used in AWindowHandler when loading the classes.
---
 modules/video_output/android/utils.c | 60 ++++++++++++++--------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/modules/video_output/android/utils.c b/modules/video_output/android/utils.c
index 2ad44bc922..78848f775b 100644
--- a/modules/video_output/android/utils.c
+++ b/modules/video_output/android/utils.c
@@ -84,36 +84,6 @@ struct ASurfaceTextureAPI
     ptr_ANativeWindow_toSurface pf_anwToSurface;
 };
 
-struct AWindowHandler
-{
-    JavaVM *p_jvm;
-    jobject jobj;
-    vout_window_t *wnd;
-
-    struct {
-        jobject jsurface;
-        ANativeWindow *p_anw;
-    } views[AWindow_Max];
-
-    void *p_anw_dl;
-    ptr_ANativeWindow_fromSurface pf_winFromSurface;
-    ptr_ANativeWindow_release pf_winRelease;
-    native_window_api_t anw_api;
-
-    struct ASurfaceTextureAPI ndk_ast_api;
-    bool b_has_ndk_ast_api;
-
-    struct {
-        awh_events_t cb;
-    } event;
-    bool b_has_video_layout_listener;
-
-    struct {
-        jfloatArray jtransform_mtx_array;
-        jfloat *jtransform_mtx;
-    } stex;
-};
-
 static struct
 {
     struct {
@@ -141,6 +111,36 @@ static struct
     } Surface;
 } jfields;
 
+struct AWindowHandler
+{
+    JavaVM *p_jvm;
+    jobject jobj;
+    vout_window_t *wnd;
+
+    struct {
+        jobject jsurface;
+        ANativeWindow *p_anw;
+    } views[AWindow_Max];
+
+    void *p_anw_dl;
+    ptr_ANativeWindow_fromSurface pf_winFromSurface;
+    ptr_ANativeWindow_release pf_winRelease;
+    native_window_api_t anw_api;
+
+    struct ASurfaceTextureAPI ndk_ast_api;
+    bool b_has_ndk_ast_api;
+
+    struct {
+        awh_events_t cb;
+    } event;
+    bool b_has_video_layout_listener;
+
+    struct {
+        jfloatArray jtransform_mtx_array;
+        jfloat *jtransform_mtx;
+    } stex;
+};
+
 #define JNI_CALL(what, obj, method, ...) \
     (*p_env)->what(p_env, obj, jfields.method, ##__VA_ARGS__)
 #define JNI_ANWCALL(what, method, ...) \
-- 
2.30.0



More information about the vlc-devel mailing list