mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
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 commite10d2417e2
: "move to CGL and CAOpenGLLayer for rendering". Then the commit7d46357627
: "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).
This commit is contained in:
parent
5fa0595046
commit
4c4eec61e6
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue