summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/cocoa
diff options
context:
space:
mode:
authorJulien Isorce <j.isorce@samsung.com>2015-02-22 10:03:54 +0000
committerJulien Isorce <j.isorce@samsung.com>2015-02-22 10:37:39 +0000
commit4c4eec61e667359ff263ab73ae28ff9724c183a3 (patch)
treea4e15bebdcd3f9e18198b655504aed7fbdd7a987 /gst-libs/gst/gl/cocoa
parent5fa05950464a0132769da54fceb508a32f8144a6 (diff)
downloadgstreamer-plugins-bad-4c4eec61e667359ff263ab73ae28ff9724c183a3.tar.gz
gl/cocoa: reduce custom main loop latency
This fix a very slow rendering rate regression that only happens when using gst-launch, i.e. in the case where the main thread does not run any NSApp loop. Git bisect reported it has been introduced by the commit e10d2417e2fe7aa4733c076984339b0d61caa169: "move to CGL and CAOpenGLLayer for rendering". Then the commit 7d463576271e5a4cc1070780ba1a69c971e8be1d: "gstglwindow_cocoa: fix slow render rate" attempted to fix the slow rendering rate problem when using gst-launch. At least for me it does not work. I tried several combinations, for example to flush CA transactions in the custom app loop, as mentioned in the doc, but the only solution that fixes the slow rendering is by reducing the loop latency. From what I tested, no need to put less than 60ms, even if the framerate has an interval much lower (16.6ms for 60 fps).
Diffstat (limited to 'gst-libs/gst/gl/cocoa')
-rw-r--r--gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
index e7c57229c..3e6b9d346 100644
--- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
+++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
@@ -304,7 +304,7 @@ gst_gl_context_cocoa_create_context (GstGLContext *context, GstGLAPI gl_api,
pool = [[NSAutoreleasePool alloc] init];
#ifndef GSTREAMER_GLIB_COCOA_NSAPPLICATION
- priv->source_id = g_timeout_add (200, gst_gl_window_cocoa_nsapp_iteration, NULL);
+ priv->source_id = g_timeout_add (60, gst_gl_window_cocoa_nsapp_iteration, NULL);
#endif
priv->gl_context = nil;