[vlc-commits] android: utils: move AWindowHandler after jfields

Alexandre Janniaux git at videolan.org
Thu Jan 14 09:41:02 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Jan 13 12:07:24 2021 +0100| [343b931362506dd4d6f82eee33dd7fc9eb201de7] | committer: Alexandre Janniaux

android: utils: move AWindowHandler after jfields

jfields will be used in AWindowHandler when loading the classes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=343b931362506dd4d6f82eee33dd7fc9eb201de7
---

 modules/video_output/android/utils.c | 54 ++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 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,6 +84,33 @@ struct ASurfaceTextureAPI
     ptr_ANativeWindow_toSurface pf_anwToSurface;
 };
 
+static struct
+{
+    struct {
+        jclass clazz;
+        jmethodID getVideoSurface;
+        jmethodID getSubtitlesSurface;
+        jmethodID registerNative;
+        jmethodID unregisterNative;
+        jmethodID setVideoLayout;
+    } AWindow;
+    struct {
+          jclass clazz;
+          jmethodID init_i;
+          jmethodID init_iz;
+          jmethodID init_z;
+          jmethodID updateTexImage;
+          jmethodID releaseTexImage;
+          jmethodID getTransformMatrix;
+          jmethodID detachFromGLContext;
+          jmethodID attachToGLContext;
+    } SurfaceTexture;
+    struct {
+        jclass clazz;
+        jmethodID init_st;
+    } Surface;
+} jfields;
+
 struct AWindowHandler
 {
     JavaVM *p_jvm;
@@ -114,33 +141,6 @@ struct AWindowHandler
     } stex;
 };
 
-static struct
-{
-    struct {
-        jclass clazz;
-        jmethodID getVideoSurface;
-        jmethodID getSubtitlesSurface;
-        jmethodID registerNative;
-        jmethodID unregisterNative;
-        jmethodID setVideoLayout;
-    } AWindow;
-    struct {
-          jclass clazz;
-          jmethodID init_i;
-          jmethodID init_iz;
-          jmethodID init_z;
-          jmethodID updateTexImage;
-          jmethodID releaseTexImage;
-          jmethodID getTransformMatrix;
-          jmethodID detachFromGLContext;
-          jmethodID attachToGLContext;
-    } SurfaceTexture;
-    struct {
-        jclass clazz;
-        jmethodID init_st;
-    } Surface;
-} jfields;
-
 #define JNI_CALL(what, obj, method, ...) \
     (*p_env)->what(p_env, obj, jfields.method, ##__VA_ARGS__)
 #define JNI_ANWCALL(what, method, ...) \



More information about the vlc-commits mailing list