Using GstVideoOverlay on Mac

Andy Robinson andy at seventhstring.com
Mon Mar 7 08:09:13 UTC 2016


On 07/03/16 01:37, doon wrote:
> Andy Robinson wrote
>> On 19/01/16 15:03, Sebastian Dröge wrote:
>>> You have to compile the sample without ARC (automatic reference
>>> counting). It's using explicit reference counting.
>>
>> And it works, using GstVideoOverlay. Also when I create a subview
>> occupying just part of the window it works. So it's a mystery to me why
>> it didn't work, doing the same thing in the context of a wxWidgets app.
>> But anyway, the caopengllayersink & CALayer method does work in
>> wxWidgets so that seems to be the solution. Thanks again for your help.
>>
>> Regards,
>> Andy Robinson, Seventh String Software, www.seventhstring.com
>> _______________________________________________
>> gstreamer-devel mailing list
>
>> gstreamer-devel at .freedesktop
>
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> Hi, Andy.
> Could you share the include part of your code? And how do you installed GDK
> on OS X? Because I can't find <gdk/gdkx.h> and I can't find how to install
> GDK on OS X.
> Thanks!
>

Hi Doon,

I didn't install GDK... here is the message I posted to the wxWidgets 
group about how to do it:

It seems that if you want to use GStreamer to display video on Mac (in a 
wxWidgets window) then GstVideoOverlay is *not* the way to do it. Instead:

See:
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/avsamplesink
which should work as it is. Then switch it from avsamplebufferlayersink 
to caopengllayersink (Sebastian recommends this choice) and it should 
work the same.

You can then get the same effect in your wxWidgets app like this, using 
caopengllayersink (this happens within a subclass of wxControl, which is 
positioned at the place in the window where we want the video to appear):
    CALayer *layer;
    g_object_get(m_videosink, "layer", &layer, NULL);
    NSView *nsv = GetPeer()->GetWXWidget();
    [nsv setWantsLayer:YES];
    [nsv setLayer:layer];

Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com


More information about the gstreamer-devel mailing list