Using GstVideoOverlay on Mac

Andy Robinson andy at seventhstring.com
Sat Jan 16 06:11:50 PST 2016


On 15/01/16 21:51, Sebastian Dröge wrote:
> There's also this example:
> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/avsamplesink
>
> The CoreAnimation sink would be used the same way, you can find it
> in the "opengl" plugin as caopengllayersink.

Thanks for this, it's great. The example works as it is, then I switched 
it from avsamplebufferlayersink to caopengllayersink and it worked the 
same, then I put a smaller view within the window and put the layer 
there, still fine. So then I incorporated it into my wxWidgets app, 
using caopengllayersink:
    CALayer *layer;
    g_object_get(m_videosink, "layer", &layer, NULL);
    NSView *nsv = GetPeer()->GetWXWidget();
    [nsv setWantsLayer:YES];
    [nsv setLayer:layer];
and it works! Fantastic, thank you. Possibly the documentation for 
GstVideoOverlay should indicate that that's not really the way to do it 
on Mac these days.

> I just noticed that we also have a Cocoa example using GstVideoOverlay:
> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/tests/examples/gl/cocoa

I did look briefly at this but it wouldn't compile - various problems - 
and the copyright message in the file is 2009 so maybe it needs
updating (or dumping).

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


More information about the gstreamer-devel mailing list