[Bug 670795] xwindow run outside for a few tenth of a second

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Feb 26 07:57:27 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=670795
  GStreamer | don't know | 0.10.x

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |t.i.m at zen.co.uk
         Resolution|                            |INVALID
   Target Milestone|HEAD                        |NONE

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-02-26 15:57:20 UTC ---
This is a bug in your code.

Please read the documentation in

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html

in full, especially the section/example about Gtk/Gdk.

Here's the problem with your code. You handle the prepare-xwindow-id message
asynchronously via the normal message callback, in the application thread. By
then it's too late. You need to set up a *sync* message handler and handle the
message there (however, you need to obtain and save the window/widget XID from
the main thread before you start the pipeline, you can't reliably do that from
the other thread in the sync message handler).

However, if you know that your video sink is xvimagesink anyway (and not a
dynamic one like autovideosink or so), then you don't need to bother with the
prepare-xwindow-id messages at all.

Just set the xid/window_handle on the xvimagesink element directly before you
start up the pipeline (xvimagesink implements the GstXOverlay interface).

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