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

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 11 02:18:42 PDT 2014


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

--- Comment #2 from Lubosz Sarnecki <lubosz at gmail.com> 2014-09-11 09:18:37 UTC ---
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.

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.

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.

Setting custom Gdk mouse cursors are broken with sink.handle_events (True).
Also the mouse motion event is only grabbed when dragging (a mouse button was
clicked), and the button event is set.

In the glimagesink _ensure_gl_setup needs to be called, so the context is
initialized before manipulating the event handling.

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