[Bug 755251] gtksink: Rework threading around GtkWindow creation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Sep 24 02:17:14 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=755251

Matthew Waters <ystreet00 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #312012|reviewed                    |needs-work
             status|                            |

--- Comment #7 from Matthew Waters <ystreet00 at gmail.com> ---
Review of attachment 312012:
 --> (https://bugzilla.gnome.org/review?bug=755251&attachment=312012)

Like the idea

::: ext/gtk/gstgtkbasesink.c
@@ +90,3 @@
+
+static gboolean
+_invoke_func (struct invoke_context *info)

This stuff already exists in gtkgstglwidget so you will want to share with them

@@ +258,3 @@
+      g_value_set_object (value,
+          _invoke_on_main ((GThreadFunc) gst_gtk_base_sink_get_widget,
+              gtk_sink));

This would be extremely prone to deadlocks if called from a thread that blocks
the main thread in any way.

Also, performing a round trip to the main thread every g_object_get (obj,
"widget") is not a great idea.  Cache and locks please with an
_invoke_on_main() on a cache miss.

@@ +356,3 @@
+gst_gtk_base_sink_start (GstBaseSink * bsink)
+{
+  return ! !_invoke_on_main ((GThreadFunc) gst_gtk_base_sink_start_in_main,

stop - yes
show_window_cb - yes
set_caps - no
show_frame - no

set_caps and show_frame are designed to be called from the streaming thread
already.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list