Page 1 of 1

OS X - VLCVideoView overlay

Posted: 21 Oct 2015 00:44
by maximality23
Hello.
I'm developing an OS X application using VLCKit. When i create VLCVideoView and try to add another NSView on top of it, it shows normally, but when i play video, VLCVideoView completely overlaps my NSView and it becomes invisible. How do i solve this problem?
P.S. If i set wantsLayer property to YES, VLCVideoView not overlapping NSView, but window resize breaks video aspect ratio.

Re: OS X - VLCVideoView overlay

Posted: 18 Nov 2015 21:03
by fkuehne
Sorry for the late reply. The problem you are running to here is because libvlc / VLCKit inserts an NSOpenGLView as a subview within VLCVideoVideo. This component dates back to the NExT days of OS X and does not support overlays within the same window.

Basically, you have 2 options:
- don't do the overlay in the same video as the video output
- use the OpenGLLayer video output instead of the default OS X vout, which provides the client app with a CALayer to ready to embed wherever the client wants

If you are interested in discovering the second option, let me know and I'll provide the necessary details. It's not difficult and there is virtually no performance impact.

Re: OS X - VLCVideoView overlay

Posted: 19 Nov 2015 13:12
by maximality23
- use the OpenGLLayer video output instead of the default OS X vout, which provides the client app with a CALayer to ready to embed wherever the client wants
Yes, please provide details of this way.