diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-08-18 13:20:15 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-08-18 13:20:15 +0300 |
commit | 5ddeb762ecce20485221dd867f850c5c44aad46c (patch) | |
tree | 74a27d3c3ee7a8e195e8cc226d17612de9c2f20a /android | |
parent | 29c5e5dfaaaa568c2715e397edf32924cdad893b (diff) |
android: Fix video rendering after GstPlayerVideoRenderer refactoring
Diffstat (limited to 'android')
-rw-r--r-- | android/app/src/main/jni/player.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/android/app/src/main/jni/player.c b/android/app/src/main/jni/player.c index 882c230..133d970 100644 --- a/android/app/src/main/jni/player.c +++ b/android/app/src/main/jni/player.c @@ -37,6 +37,7 @@ typedef struct _Player { jobject java_player; GstPlayer *player; + GstPlayerVideoRenderer *renderer; ANativeWindow *native_window; } Player; @@ -197,7 +198,8 @@ native_new (JNIEnv * env, jobject thiz) { Player *player = g_new0 (Player, 1); - player->player = gst_player_new (); + player->renderer = gst_player_video_overlay_video_renderer_new (NULL); + player->player = gst_player_new_full (player->renderer, NULL); SET_CUSTOM_DATA (env, thiz, native_player_field_id, player); player->java_player = (*env)->NewGlobalRef (env, thiz); @@ -402,8 +404,9 @@ native_set_surface (JNIEnv * env, jobject thiz, jobject surface) } player->native_window = new_native_window; - g_object_set (player->player, "window-handle", (gpointer) new_native_window, - NULL); + gst_player_video_overlay_video_renderer_set_window_handle + (GST_PLAYER_VIDEO_OVERLAY_VIDEO_RENDERER (player->renderer), + (gpointer) new_native_window); } static void |