getting handle of Gstreamer DirectShow sink default window

dhoyt at hoytsoft.org dhoyt at hoytsoft.org
Wed Apr 18 14:10:28 PDT 2012


> ...There is parameter in mplayer such as -wid
> which allows mplayer to launch and playing wideo/audio in other window.

OSSBuild has an app that does this, actually. Examine gst-player:
http://code.google.com/p/ossbuild/source/browse/trunk/Main/GStreamer/Source/gstreamer/tools/gst-player.c

Start on line 2249 so you can see that the window handle is being passed
in on the command line. Then go to line 2464 where
gst_bus_set_sync_handler() is called with a reference to the
xoverlay_bus_sync_handler() function. Then go to line 1264 where it's
being used. Look at line 1256 in the same method to see where it's
looking for a specific "prepare-xwindow-id" message from the bus and if
it sees that, it calls gst_x_overlay_set_window_handle(). You'll need to
setup something similar to do what you want.




More information about the gstreamer-devel mailing list