[vlc-devel] [PATCHv2 07/14] android: utils: load SurfaceTexture JNI API

Alexandre Janniaux ajanni at videolabs.io
Wed Jun 24 15:14:31 CEST 2020


The API will be used when NDK API is not available.
---
 modules/video_output/android/utils.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/modules/video_output/android/utils.c b/modules/video_output/android/utils.c
index 5ec872f2e8a..a9a51a90c77 100644
--- a/modules/video_output/android/utils.c
+++ b/modules/video_output/android/utils.c
@@ -132,6 +132,10 @@ static struct
           jmethodID init_i;
           jmethodID init_iz;
           jmethodID init_z;
+          jmethodID updateTexImage;
+          jmethodID getTransformMatrix;
+          jmethodID detachFromGLContext;
+          jmethodID attachToGLContext;
     } SurfaceTexture;
     struct {
         jclass clazz;
@@ -732,6 +736,19 @@ InitJNIFields(JNIEnv *env, vlc_object_t *p_obj, jobject *jobj)
     GET_METHOD(SurfaceTexture, init_iz, "<init>", "(IZ)V", false);
     GET_METHOD(SurfaceTexture, init_z, "<init>", "(Z)V", false);
 
+    GET_METHOD(SurfaceTexture, updateTexImage,
+               "updateTexImage", "()V", true);
+
+    GET_METHOD(SurfaceTexture, getTransformMatrix,
+               "getTransformMatrix", "([F)V", true);
+
+    GET_METHOD(SurfaceTexture, attachToGLContext,
+               "attachToGLContext", "(I)V", true);
+
+    GET_METHOD(SurfaceTexture, detachFromGLContext,
+               "detachFromGLContext", "()V", true);
+
+
     /* We cannot create any SurfaceTexture if we cannot load the SurfaceTexture
      * methods. */
     if (!jfields.SurfaceTexture.init_i &&
-- 
2.27.0



More information about the vlc-devel mailing list