Using GstVideoOverlay on Mac

Sebastian Dröge sebastian at centricular.com
Fri Jan 8 05:37:20 PST 2016


On Mi, 2016-01-06 at 17:33 +0000, Andy Robinson wrote:
> Mac OS 10.10
> GStreamer 1.6.1
> Xcode 6.4
> 
> Hello, can anyone point me to any sample code (C/C++) showing how to 
> display video on the Mac, in a window owned by the application
> (rather  than GStreamer creating a window for the video)?
> 
> I have written code (using wxWidgets as it happens) which works fine
> on  Linux/GTK and on Windows.
> 
> I have a top-level window containing a child control in which I want
> the video to appear. I get a handle like this:
> 
> #ifdef __WXMAC__
>     NSView *nsv = GetPeer()->GetWXWidget();
>     m_video_window_handle = (gulong)nsv;
> #endif
> 
> The wxWidgets people assure me that this will obtain a NSView* on
> Mac.
> 
> Then in the bus_sync_callback I do:
>     GstVideoOverlay *overlay =
> GST_VIDEO_OVERLAY(GST_MESSAGE_SRC(msg));
>     gst_video_overlay_set_window_handle(overlay,
> m_video_window_handle);
> 
> As I say, this works on Windows & Linux. But on Mac the place where
> the video should be, is blank.

This seems all correct, assuming the NSView can accept a child view
that contains the actual video.

Can you try without wxWidgets in a plain OSX application if you have
the same problem?


Also which video sink is actually used here?

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160108/67414405/attachment.sig>


More information about the gstreamer-devel mailing list