[gst-devel] How to set window ID on Mac OSX

Michael Smith msmith at xiph.org
Thu Jun 26 00:26:37 CEST 2008


On Wed, Jun 25, 2008 at 3:16 PM, Andreas Schuler <andreas at neokast.com> wrote:
> Hi all,
>
> I am trying to get an application to run on a Max OSX 10.5.2. I have
> downloaded and built the latest tar balls and everything seems to be running
> fine when I use gst-launch.
>
> >From within my app, which also runs on Windows, I am doing the following to
> set the id of the window I want the video to be rendered on:
>
> - get_bus_set_sync_handler to setup my callback
> - The callback function looks as follows:

That looks good for Win32 and linux. On linux the 'window handle' will
need to be the XID for the window, but that's just a matter of
different platform-specific types, not a big problem.

On OSX, you're presumably using osxvideosink (well, you say you're
using autovideosink, but that'll be selecting osxvideosink
internally).

osxvideosink doesn't implement GstXOverlay, so you can't do this with
it. Because of this it won't ever even emit the prepare-xwindow-id
signal, which is what you're seeing.

osxvideosink has some other interface to set this up, but I don't know
the details of how it works. You may find looking at the output of
"gst-inspect-0.10 osxvideosink" to be helpful - it'll tell you what
signals exist, etc.

If possible, it would be best to make osxvideosink implement the
GstXOverlay interface - that would let people use more common code
across different platforms. Looking into whether that's possible is on
my TODO list, but pretty far down right now - I probably won't get to
it for a month or two. If you manage to do that sooner, that'd be
great - patches would be very welcome.

Mike




More information about the gstreamer-devel mailing list