OS X - VLCVideoView overlay

This forum is about all development around libVLC.
maximality23
New Cone
New Cone
Posts: 5
Joined: 18 Apr 2015 00:02

OS X - VLCVideoView overlay

Postby maximality23 » 21 Oct 2015 00:44

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.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: OS X - VLCVideoView overlay

Postby fkuehne » 18 Nov 2015 21:03

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

maximality23
New Cone
New Cone
Posts: 5
Joined: 18 Apr 2015 00:02

Re: OS X - VLCVideoView overlay

Postby maximality23 » 19 Nov 2015 13:12

- 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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 37 guests