mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 15:08:48 +00:00
playback/player: android: Fix video rendering after GstPlayerVideoRenderer refactoring
This commit is contained in:
parent
80e4c1abff
commit
c581233464
1 changed files with 6 additions and 3 deletions
|
@ -37,6 +37,7 @@ typedef struct _Player
|
||||||
{
|
{
|
||||||
jobject java_player;
|
jobject java_player;
|
||||||
GstPlayer *player;
|
GstPlayer *player;
|
||||||
|
GstPlayerVideoRenderer *renderer;
|
||||||
ANativeWindow *native_window;
|
ANativeWindow *native_window;
|
||||||
} Player;
|
} Player;
|
||||||
|
|
||||||
|
@ -197,7 +198,8 @@ native_new (JNIEnv * env, jobject thiz)
|
||||||
{
|
{
|
||||||
Player *player = g_new0 (Player, 1);
|
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);
|
SET_CUSTOM_DATA (env, thiz, native_player_field_id, player);
|
||||||
player->java_player = (*env)->NewGlobalRef (env, thiz);
|
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;
|
player->native_window = new_native_window;
|
||||||
g_object_set (player->player, "window-handle", (gpointer) new_native_window,
|
gst_player_video_overlay_video_renderer_set_window_handle
|
||||||
NULL);
|
(GST_PLAYER_VIDEO_OVERLAY_VIDEO_RENDERER (player->renderer),
|
||||||
|
(gpointer) new_native_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue