[Bug 745633] New: glimagesink: X11: Race where it creates an external window even if the XID was set

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 4 11:03:10 PST 2015


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

            Bug ID: 745633
           Summary: glimagesink: X11: Race where it creates an external
                    window even if the XID was set
    Classification: Platform
           Product: GStreamer
           Version: 1.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: tsaunier at gnome.org
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 298569
  --> https://bugzilla.gnome.org/attachment.cgi?id=298569&action=edit
GST_DEBUG=*gl*:7 debug logs

In pitivi we do the following:

Set XID and then pause the pipeline. Usually the sink get embedded properly but
in some cases I observe the following:

T0: the XiD is set, gst_glimage_sink_set_window_handle is called,
new_window_xid is set

T1: Caps negotiation happens
  -> We create the context
    -> The GL thread is started

T2(glthread): The XWindow is created as part of the creation of the GL thread
(in what is called context->choose_format). At that point the XID is not
actually set on the GstGLX11Window.

T1: gst_gl_window_set_window_handle is called, still in the process of creating
the negotitation in the _ensure_gl_setup function.

T1: In gst_gl_window_x11_set_window_handle we see that the GL mainloop is not
running yet (as T2 it is between the call to ->choose_format vmethod and
gst_gl_window_run). In that method there is a comment stating:

/* The loop may not exist yet because it's created in GstGLWindow::open         
 * which is only called when going from READY to PAUSED state.                  
 * If no loop then the parent is directly set in CreateWindow                   
 */ 

but in our case the loop is not running yet but we already have the XWindow
created with an internal XID.

So we end up never setting the proper Xid to the XWindow and thuse we get an
external window poping up.

-- 
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