summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa_cb_common.swift
diff options
context:
space:
mode:
authorAkemi <der.richter@gmx.de>2018-02-28 15:08:41 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-03-04 16:26:35 -0800
commitae2972557f555a11591082c213e653ac68a01f23 (patch)
tree5f4757e0b70ad8344158c433b9903c35970645b5 /video/out/cocoa_cb_common.swift
parentd7b6ebf64391327c60bdf50becd945f6237e5c9e (diff)
downloadmpv-ae2972557f555a11591082c213e653ac68a01f23.tar.bz2
mpv-ae2972557f555a11591082c213e653ac68a01f23.tar.xz
cocoa-cb: use new libmpv API instead of opengl-cb
a new replacement API was introduced with b037121 and the old one was deprecated. porting cocoa-cb to the new API.
Diffstat (limited to 'video/out/cocoa_cb_common.swift')
-rw-r--r--video/out/cocoa_cb_common.swift12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift
index c18bb29971..426181d13e 100644
--- a/video/out/cocoa_cb_common.swift
+++ b/video/out/cocoa_cb_common.swift
@@ -61,7 +61,7 @@ class CocoaCB: NSObject {
func setMpvHandle(_ ctx: OpaquePointer) {
mpv = MPVHelper(ctx)
- layer.setUpGLCB()
+ layer.setUpRender()
}
func preinit() {
@@ -113,7 +113,7 @@ class CocoaCB: NSObject {
NSApp.activate(ignoringOtherApps: true)
layer.setVideo(true)
- if self.mpv.getBoolProperty("fullscreen") {
+ if mpv.getBoolProperty("fullscreen") {
DispatchQueue.main.async {
self.window.toggleFullScreen(nil)
}
@@ -239,7 +239,7 @@ class CocoaCB: NSObject {
func updateICCProfile() {
if mpv.getBoolProperty("icc-profile-auto") {
- mpv.setGLCBICCProfile(window.screen!.colorSpace!)
+ mpv.setRenderICCProfile(window.screen!.colorSpace!)
}
layer.colorspace = window.screen!.colorSpace!.cgColorSpace!
}
@@ -273,7 +273,7 @@ class CocoaCB: NSObject {
var mean = (values[0] + values[1]) / 2
if ccb.lastLmu != mean {
ccb.lastLmu = mean
- ccb.mpv.setGLCBLux(ccb.lmuToLux(ccb.lastLmu))
+ ccb.mpv.setRenderLux(ccb.lmuToLux(ccb.lastLmu))
}
}
}
@@ -383,7 +383,7 @@ class CocoaCB: NSObject {
return ev
}
- var controlCallback: mpv_opengl_cb_control_fn = { ( ctx, events, request, data ) -> Int32 in
+ var controlCallback: mp_render_cb_control_fn = { ( ctx, events, request, data ) -> Int32 in
let ccb: CocoaCB = MPVHelper.bridge(ptr: ctx!)
switch mp_voctrl(request) {
@@ -466,7 +466,7 @@ class CocoaCB: NSObject {
stopDisplaylink()
uninitLightSensor()
removeDisplayReconfigureObserver()
- mpv.deinitGLCB()
+ mpv.deinitRender()
mpv.deinitMPV()
case MPV_EVENT_PROPERTY_CHANGE:
if backendState == .init {