From ef2bc9b21f7666835237105bff2b949b3e77821a Mon Sep 17 00:00:00 2001 From: Yuqing Zhu Date: Thu, 22 Dec 2016 18:26:41 +0800 Subject: [PATCH] gstreamer1.0-plugins-bad: Workaround for no frame when imxplayer using glimagesink Workaround: Change parent window of internal_window in window_show function. Signed-off-by: Yuqing Zhu Signed-off-by: Otavio Salvador --- ...ound-for-no-frame-when-imxplayer-use.patch | 62 +++++++++++++++++++ .../gstreamer1.0-plugins-bad_1.10.%.bbappend | 1 + 2 files changed, 63 insertions(+) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glwindow-work-around-for-no-frame-when-imxplayer-use.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glwindow-work-around-for-no-frame-when-imxplayer-use.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glwindow-work-around-for-no-frame-when-imxplayer-use.patch new file mode 100644 index 00000000..787f3cbd --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-glwindow-work-around-for-no-frame-when-imxplayer-use.patch @@ -0,0 +1,62 @@ +From 99b8b8f92e3785ff05f30c9c1e4a722593dfc492 Mon Sep 17 00:00:00 2001 +From: Haihua Hu +Date: Wed, 9 Mar 2016 13:00:39 +0800 +Subject: [PATCH 17/26] glwindow: work around for no frame when imxplayer use + glimagesink + +change parent window of internal_window in window_show function. + +Upstream Status: Inappropriate [i.MX specific] + +Signed-off-by: Haihua Hu +--- + gst-libs/gst/gl/x11/gstglwindow_x11.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/gst-libs/gst/gl/x11/gstglwindow_x11.c b/gst-libs/gst/gl/x11/gstglwindow_x11.c +index d08b757..bc7b9c0 100644 +--- a/gst-libs/gst/gl/x11/gstglwindow_x11.c ++++ b/gst-libs/gst/gl/x11/gstglwindow_x11.c +@@ -322,13 +322,13 @@ gst_gl_window_x11_set_window_handle (GstGLWindow * window, guintptr id) + g_main_context_get_thread_default ()); + } + +- XGetWindowAttributes (window_x11->device, window_x11->parent_win, &attr); ++ /*XGetWindowAttributes (window_x11->device, window_x11->parent_win, &attr); + + XResizeWindow (window_x11->device, window_x11->internal_win_id, + attr.width, attr.height); + + XReparentWindow (window_x11->device, window_x11->internal_win_id, +- window_x11->parent_win, 0, 0); ++ window_x11->parent_win, 0, 0);*/ + + XSync (window_x11->device, FALSE); + } +@@ -359,7 +359,7 @@ _show_window (GstGLWindow * window) + GstGLWindowX11 *window_x11 = GST_GL_WINDOW_X11 (window); + guint width = window_x11->priv->preferred_width; + guint height = window_x11->priv->preferred_height; +- XWindowAttributes attr; ++ XWindowAttributes attr, parent_attr; + + XGetWindowAttributes (window_x11->device, window_x11->internal_win_id, &attr); + +@@ -371,6 +371,14 @@ _show_window (GstGLWindow * window) + XResizeWindow (window_x11->device, window_x11->internal_win_id, + attr.width, attr.height); + XSync (window_x11->device, FALSE); ++ }else{ ++ XGetWindowAttributes (window_x11->device, window_x11->parent_win, &parent_attr); ++ ++ XResizeWindow (window_x11->device, window_x11->internal_win_id, ++ parent_attr.width, parent_attr.height); ++ ++ XReparentWindow (window_x11->device, window_x11->internal_win_id, ++ window_x11->parent_win, 0, 0); + } + + XMapWindow (window_x11->device, window_x11->internal_win_id); +-- +1.9.1 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend index 6ae6badc..73b93303 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend @@ -13,6 +13,7 @@ SRC_URI_append_imxgpu2d = " \ file://0003-Add-directviv-to-glimagesink-to-improve-playback-per.patch \ file://0004-MMFMWK-6930-glplugin-Accelerate-gldownload-with.patch \ file://0005-glcolorconvert-convert-YUV-to-RGB-use-directviv.patch \ + file://0006-glwindow-work-around-for-no-frame-when-imxplayer-use.patch \ " -- 2.40.1