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

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)
 	{
-- 
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to