Skip to content
Snippets Groups Projects
Commit 371695c6 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

macosx: added support for the CAOpenGLLayer vout

Note that this won't work if the video output is embedded in the main window

This is done mainly for debug purposes for now
parent 4aa3467d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,8 @@ libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices \
-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook \
-Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration \
-Wl,-framework,ScriptingBridge -F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit
-Wl,-framework,ScriptingBridge -F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit \
-Wl,-framework,QuartzCore
if HAVE_SPARKLE
libmacosx_plugin_la_LDFLAGS += -Wl,-framework,Sparkle
......
......@@ -37,6 +37,8 @@
#import "CoreInteraction.h"
#import "MainMenu.h"
#import <QuartzCore/QuartzCore.h>
#import <vlc_keys.h>
......@@ -79,6 +81,33 @@
return self;
}
- (void)addVoutLayer:(CALayer *)aLayer
{
if (self.layer == nil) {
[self setLayer:[CALayer layer]];
[self setWantsLayer:YES];
}
[CATransaction begin];
aLayer.opaque = 1.;
aLayer.hidden = NO;
aLayer.bounds = self.layer.bounds;
[self.layer addSublayer:aLayer];
[self setNeedsDisplay:YES];
[aLayer setNeedsDisplay];
CGRect frame = aLayer.bounds;
frame.origin.x = frame.origin.y = 0.;
aLayer.frame = frame;
[CATransaction commit];
}
- (void)removeVoutLayer:(CALayer *)aLayer
{
[CATransaction begin];
[aLayer removeFromSuperlayer];
[CATransaction commit];
}
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment