[vlc-commits] android_window: move AndroidWindow_SetSurface up
Thomas Guillem
git at videolan.org
Fri Apr 10 12:24:34 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Apr 10 09:39:37 2015 +0200| [429baf94ff377ec33cf54e9701437577dbefd277] | committer: Thomas Guillem
android_window: move AndroidWindow_SetSurface up
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=429baf94ff377ec33cf54e9701437577dbefd277
---
modules/video_output/android/android_window.c | 62 ++++++++++++-------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index 406058f..312e02e 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -284,6 +284,37 @@ static void SetupPictureYV12(picture_t *p_picture, uint32_t i_in_stride)
}
}
+static int AndroidWindow_SetSurface(vout_display_sys_t *sys,
+ android_window *p_window,
+ jobject jsurf)
+{
+ if (jsurf != p_window->jsurf) {
+ if (p_window->p_handle_priv) {
+ sys->anwp.disconnect(p_window->p_handle_priv);
+ p_window->p_handle_priv = NULL;
+ }
+ if (p_window->p_handle) {
+ sys->anw.winRelease(p_window->p_handle);
+ p_window->p_handle = NULL;
+ }
+ }
+
+ p_window->jsurf = jsurf;
+ if (!p_window->jsurf )
+ return -1;
+ if (!p_window->p_handle && !p_window->b_opaque) {
+ JNIEnv *p_env;
+
+ if (!(p_env = jni_get_env(THREAD_NAME)))
+ return -1;
+ p_window->p_handle = sys->anw.winFromSurface(p_env, p_window->jsurf);
+ if (!p_window->p_handle)
+ return -1;
+ }
+
+ return 0;
+}
+
static android_window *AndroidWindow_New(vout_display_sys_t *sys,
video_format_t *p_fmt,
bool b_use_priv)
@@ -326,37 +357,6 @@ static android_window *AndroidWindow_New(vout_display_sys_t *sys,
return p_window;
}
-static int AndroidWindow_SetSurface(vout_display_sys_t *sys,
- android_window *p_window,
- jobject jsurf)
-{
- if (jsurf != p_window->jsurf) {
- if (p_window->p_handle_priv) {
- sys->anwp.disconnect(p_window->p_handle_priv);
- p_window->p_handle_priv = NULL;
- }
- if (p_window->p_handle) {
- sys->anw.winRelease(p_window->p_handle);
- p_window->p_handle = NULL;
- }
- }
-
- p_window->jsurf = jsurf;
- if (!p_window->jsurf )
- return -1;
- if (!p_window->p_handle && !p_window->b_opaque) {
- JNIEnv *p_env;
-
- if (!(p_env = jni_get_env(THREAD_NAME)))
- return -1;
- p_window->p_handle = sys->anw.winFromSurface(p_env, p_window->jsurf);
- if (!p_window->p_handle)
- return -1;
- }
-
- return 0;
-}
-
static void AndroidWindow_Destroy(vout_display_sys_t *sys,
android_window *p_window)
{
More information about the vlc-commits
mailing list