[Bug 736035] glimagesink: Regression: Gtk+ cannot get glimagesink input

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 11 04:13:54 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=736035
  GStreamer | gst-plugins-bad | unspecified

--- Comment #3 from Matthew Waters <ystreet00 at gmail.com> 2014-09-11 11:13:49 UTC ---
(In reply to comment #2)
> Created an attachment (id=285893)
 View: https://bugzilla.gnome.org/attachment.cgi?id=285893
 Review: https://bugzilla.gnome.org/review?bug=736035&attachment=285893

> Implement gst_video_overlay_handle_events()
> 
> The X11 implementations of xvimagesink and glimagesink are slightly different.
> xvimagesink creates the X11 window with XCreateSimpleWindow. glimagesink needs
> to abstract window systems with the context. The context has also different
> windowing systems. In our case the GLX context creates a X11 window with
> classic XCreateWindow. I was not able to use XCreateSimpleWindow for GLX. I
> guess it needs the extra options.

The major difference between them is the parenting dance we do with the user
supplied window.  That is we create a window with its parent being the user
supplied window.  As a result, we steal all the input events that may need to
be propagated to the use supplied window.

> I removed the event handle options from the GLX X11 window initialization and
> added an option to set them later (heavily inspired by xvimagesink).
> 
> This option needs to be carried though all the abstraction layers to the sink.

I think not.  The sink can extract the window from the context just fine using
gst_gl_context_get_window().

> With this patch I can disable the event handling of the sink.
> Even with event handling disabled I set the following events for the window to
> work properly:
> 
> StructureNotifyMask | ExposureMask | VisibilityChangeMask
> 
> The patch shows different behavior than xvimagesink when event handling is
> active, as described in this Python example:
> 
> https://gist.github.com/lubosz/956002b007650915221a
> 
> Basically things are broken when event handling is turned on. I left it as
> default, but it maybe should not be set as default.

Another related option for fixing this bug is to remove the parenting logic and
just use the window handle the application provides without creating our own. 
This effectively removes our X event handling code from ever running when a
user window is supplied, is equivalent to the xvimagesink code and properly
solves bug #723529.  Then _handle_events() only has any real effect when there
is no application supplied window.  I have a patch that does that however I
need to finish testing it properly.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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