]> git.sesse.net Git - vlc/commitdiff
native_window: add setBuffersGeometry
authorThomas Guillem <thomas@gllm.fr>
Fri, 14 Nov 2014 16:09:52 +0000 (17:09 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 15 Nov 2014 11:22:49 +0000 (12:22 +0100)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/video_output/android/utils.c
modules/video_output/android/utils.h

index ed3b905e7b02e4f2e707d6f73ca2fe76127496ca..8d39f3b7f91ba38315d3cd7439a2f8976c43090a 100644 (file)
@@ -36,14 +36,18 @@ void *LoadNativeWindowAPI(native_window_api_t *native)
         (ptr_ANativeWindow_lock)(dlsym(p_library, "ANativeWindow_lock"));
     native->unlockAndPost =
         (ptr_ANativeWindow_unlockAndPost)(dlsym(p_library, "ANativeWindow_unlockAndPost"));
+    native->setBuffersGeometry =
+        (ptr_ANativeWindow_setBuffersGeometry)(dlsym(p_library, "ANativeWindow_setBuffersGeometry"));
 
-    if (native->winFromSurface && native->winRelease && native->winLock && native->unlockAndPost)
+    if (native->winFromSurface && native->winRelease && native->winLock
+        && native->unlockAndPost && native->setBuffersGeometry)
         return p_library;
 
     native->winFromSurface = NULL;
     native->winRelease = NULL;
     native->winLock = NULL;
     native->unlockAndPost = NULL;
+    native->setBuffersGeometry = NULL;
 
     dlclose(p_library);
     return NULL;
index e78c68899b5e81a518c60c0a3def3af673a17508..b0df281672176cfef4d3bc9001e2d262967986c4 100644 (file)
@@ -35,6 +35,7 @@ typedef ANativeWindow* (*ptr_ANativeWindow_fromSurface)(JNIEnv*, jobject);
 typedef void (*ptr_ANativeWindow_release)(ANativeWindow*);
 typedef int32_t (*ptr_ANativeWindow_lock)(ANativeWindow*, ANativeWindow_Buffer*, ARect*);
 typedef void (*ptr_ANativeWindow_unlockAndPost)(ANativeWindow*);
+typedef int32_t (*ptr_ANativeWindow_setBuffersGeometry)(ANativeWindow*, int32_t, int32_t, int32_t);
 
 typedef struct
 {
@@ -42,6 +43,7 @@ typedef struct
     ptr_ANativeWindow_release winRelease;
     ptr_ANativeWindow_lock winLock;
     ptr_ANativeWindow_unlockAndPost unlockAndPost;
+    ptr_ANativeWindow_setBuffersGeometry setBuffersGeometry;
 } native_window_api_t;
 
 /* Fill the structure passed as parameter and return a library handle