[gst-devel] xvideosink vs videosink

Baker, Steve SBaker at CHELLO.com
Tue Jun 11 06:32:01 CEST 2002


gst-player currently uses videosink to display video. This works ok except
that videosink is not threadsafe, thus it must run in the same thread as the
ui. This means that the following pipeline must be used (with audio removed
for clarity)

{ filesrc ! spider } ! queue ! colorspace ! videosink
This pipeline is a bit convoluted and I would much rather be doing something
like:
{ filesrc ! spider ! { queue ! colorspace ! videosink } }

Since Xv shares the same X connection as the ui, any Xv flakiness could
bring down the whole app.

The motivation for writing videosink in the first place was because
gtk_socket_steal was deprecated in favour of the xembed protocol as
implemented by gtkplugin:
http://www.freedesktop.org/standards/xembed/html/index.html

However gtkplugin can't be used by a threaded videosink because it uses the
single gdk context. So another potential solution is to implement xembed
directly into the existing xvideosink.

Wim looked into this and it turns out that there is nothing in xembed that
actually needs to be implemented since the embedded side only deals with
keyboard/focus/accelerator stuff. xvideosink is already threadsafe as it
uses a seperate X connection.

So it seems that we can safely use gtk_socket_add_id with xvideosink and
have a video sink which is threadsafe and isolated from the ui.

Basically I'd like to replace videosink with xvideosink in gst-player, and I
wanted a general discussion and a blessing from the orginal authors (ie,
Company).

cheers




More information about the gstreamer-devel mailing list