[gst-devel] embedding sdlvideosink

David Schleef ds at schleef.org
Wed Sep 25 16:24:02 CEST 2002


On Thu, Sep 26, 2002 at 12:05:06AM +0200, Ronald Bultje wrote:
> Hi Steve,
> 
> On Wed, 2002-09-25 at 23:25, Steve Baker wrote:
> > I haven't found a way to "get" the X window of an existing sdl display
> > so I think the only way of knowing the xid of a sdl display is to create
> > your own x window and tell sdl to use it with the setenv("SDL_WINDOWID",
> > SDL_hack, 1); hacklet.

You should get the window ID as part of the SDL_SYSWMEVENT event.

> Indeed. sdlvideosink also has the 'xid' property, which does the same
> thing... Then, you can create a window in the application and just send
> the video-widget's XID to sdlvideosink and it'll do the evil hack for
> you (makes you feel better ;-) ).

Is this the case?  (A cursory view of the source says yes)  In
xvideosink, it is the opposite -- the element creates an X window
and sends a "have-xid" signal.  It is the application's job to
reparent it into the correct parent window.

I'm not sure which method is more flexible, but I would guess the
xvideosink method.

> SDL always uses X, as far as I know...

SDL also works with the framebuffer and Windows, IIRC.



dave...





More information about the gstreamer-devel mailing list