From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cybertec.at (ns.km31432.keymachine.de [87.118.86.135]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 43540E009C4 for ; Thu, 3 Apr 2014 03:28:56 -0700 (PDT) Received: from localhost.localdomain (unknown [87.242.12.103]) by mail.cybertec.at (Postfix) with ESMTPSA id 3A8C73900C8A for ; Thu, 3 Apr 2014 10:28:51 +0000 (UTC) Message-ID: <533D37E3.9070109@pr.hu> Date: Thu, 03 Apr 2014 12:28:51 +0200 From: Boszormenyi Zoltan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: "meta-freescale@yoctoproject.org" Subject: Sync to V-blank X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 10:28:59 -0000 X-Groupsio-MsgNum: 7997 Content-Type: multipart/mixed; boundary="------------070404000908050907090201" --------------070404000908050907090201 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit Hi, is there a way to enable double buffering in X on the I would like to achieve tearing-free/flicker-free video. I have just tried "gst-launch-1.0 playbin uri=file://..." on a couple of 720p and 1080p test videos and there is visible tearing when sideways movement or fast fading in or fading out happens on the screen. I found this thread: https://community.freescale.com/thread/303863 but "export FB_MULTI_BUFFER=2" doesn't seem to do anything. Indeed, the "FB_MULTI_BUFFER" string is not in any of the libraries in /usr/lib or /lib. Then I looked into the gstreamer1.0-plugins-imx sources and came up with the attached patch, rebuilt the package, removed from the board and installed it again. The flicker is still there. Do the Vivante drivers support sync-to-V-blank? Thanks in advance, Zoltán Böszörményi --------------070404000908050907090201 Content-Type: text/x-patch; name="set-eglswapinterval.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="set-eglswapinterval.patch" diff --git a/src/eglvivsink/egl_platform_fb.c b/src/eglvivsink/egl_platform_fb.c index eda6040..ad11a25 100644 --- a/src/eglvivsink/egl_platform_fb.c +++ b/src/eglvivsink/egl_platform_fb.c @@ -71,20 +71,25 @@ GstImxEglVivSinkEGLPlatform* gst_imx_egl_viv_sink_egl_platform_create(gchar cons return NULL; } if (!eglInitialize(platform->egl_display, &ver_major, &ver_minor)) { GST_ERROR("eglInitialize failed: %s", gst_imx_egl_viv_sink_egl_platform_get_last_error_string()); g_free(platform); return NULL; } + if (eglSwapInterval(platform->egl_display, 1) != EGL_TRUE) + { + GST_WARNING("eglSwapInterval failed, flicker possible!"); + } + GST_INFO("FB EGL platform initialized, using EGL %d.%d", ver_major, ver_minor); return platform; } void gst_imx_egl_viv_sink_egl_platform_destroy(GstImxEglVivSinkEGLPlatform *platform) { if (platform != NULL) { diff --git a/src/eglvivsink/egl_platform_x11.c b/src/eglvivsink/egl_platform_x11.c index 99ae600..ca7b33e 100644 --- a/src/eglvivsink/egl_platform_x11.c +++ b/src/eglvivsink/egl_platform_x11.c @@ -84,20 +84,25 @@ GstImxEglVivSinkEGLPlatform* gst_imx_egl_viv_sink_egl_platform_create(gchar cons } if (!eglInitialize(platform->egl_display, &ver_major, &ver_minor)) { GST_ERROR("eglInitialize failed: %s", gst_imx_egl_viv_sink_egl_platform_get_last_error_string()); XCloseDisplay(x11_display); g_free(platform); return NULL; } + if (eglSwapInterval(platform->egl_display, 1) != EGL_TRUE) + { + GST_WARNING("eglSwapInterval failed, flicker possible!"); + } + GST_INFO("X11 EGL platform initialized, using EGL %d.%d", ver_major, ver_minor); return platform; } void gst_imx_egl_viv_sink_egl_platform_destroy(GstImxEglVivSinkEGLPlatform *platform) { if (platform != NULL) { --------------070404000908050907090201--