[gst-devel] embedding sdlvideosink
rbultje at ronald.bitfreak.net
Wed Sep 25 15:06:02 CEST 2002
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.
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 ;-) ).
> I'm planning to just copy gstxwindow from xvideosink and use that to
> create the window that sdl gets embedded in. This implies that
> sdlvideosink will always be used with X11 and I'm not sure if that
> assumption is true. I suspect that for GStreamer at the moment it is.
> So whenever gst_sdlvideosink_create is called, a new X window is created
> and SDL is told to use it.
SDL always uses X, as far as I know... So that shouldn't be a problem.
You can make the window both on the application side as well as on the
plugin side... You could just make a gstvideowidget-lookalike and use
that XID (GDK_WINDOW_XWINDOWID(GdkWindow *window) or so), then you
wouldn't even have to change sdlvideosink...
More information about the gstreamer-devel