avoiding prepare-xwindow-id and gdk threads

Dan danmbox at gmail.com
Fri Nov 29 02:42:47 PST 2013


I've been using the pygst Playbin tutorial
(http://pygstdocs.berlios.de/pygst-tutorial/playbin.html) as a base
for my video player.

Now I'm curious if I can get rid of gdk threading. In particular, can
the imagesink be given a proper xwindow_id:

	def on_sync_message(self, bus, message):
		if message.structure is None:
			return
		message_name = message.structure.get_name()
		if message_name == "prepare-xwindow-id":
			imagesink = message.src
			imagesink.set_property("force-aspect-ratio", True)
			gtk.gdk.threads_enter()
			imagesink.set_xwindow_id(self.movie_window.window.xid)
			gtk.gdk.threads_leave()

without requiring gdk threading? E.g. before the pipeline moves? Or
later, in a glib idle callback?


More information about the gstreamer-devel mailing list