diff options
author | der richter <der.richter@gmx.de> | 2024-03-26 23:32:22 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-03-29 14:20:40 +0100 |
commit | ceaabb7b9831c43412e75e40055cf899ca37fbab (patch) | |
tree | 212df91e05a8bf374a125e31904e3d9bb3cf93e6 /video/out | |
parent | e7df95b10d76d62e3feb40b0b38469b3b1d20461 (diff) | |
download | mpv-ceaabb7b9831c43412e75e40055cf899ca37fbab.tar.bz2 mpv-ceaabb7b9831c43412e75e40055cf899ca37fbab.tar.xz |
mac: use LogHelper directly instead of mp_log
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/cocoa_cb_common.swift | 6 | ||||
-rw-r--r-- | video/out/mac/common.swift | 6 | ||||
-rw-r--r-- | video/out/mac_common.swift | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index 1e207b253d..3953a65e21 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -31,10 +31,10 @@ class CocoaCB: Common, EventSubscriber { var backendState: State = .uninitialized init(_ mpv: OpaquePointer) { - let newlog = mp_log_new(UnsafeMutablePointer(mpv), mp_client_get_log(mpv), "cocoacb") + let log = LogHelper(mp_log_new(UnsafeMutablePointer(mpv), mp_client_get_log(mpv), "cocoacb")) let option = OptionHelper(UnsafeMutablePointer(mpv), mp_client_get_global(mpv)) - libmpv = LibmpvHelper(mpv, newlog) - super.init(option, newlog) + libmpv = LibmpvHelper(mpv, log) + super.init(option, log) layer = GLLayer(cocoaCB: self) AppHub.shared.event?.subscribe(self, event: .init(name: "MPV_EVENT_SHUTDOWN")) } diff --git a/video/out/mac/common.swift b/video/out/mac/common.swift index c848bef53d..60bf38d470 100644 --- a/video/out/mac/common.swift +++ b/video/out/mac/common.swift @@ -48,9 +48,9 @@ class Common: NSObject { didSet { if let window = window { window.title = title } } } - init(_ opt: OptionHelper, _ mpLog: OpaquePointer?) { - option = opt - log = LogHelper(mpLog) + init(_ option: OptionHelper, _ log: LogHelper) { + self.option = option + self.log = log } func initMisc(_ vo: UnsafeMutablePointer<vo>) { diff --git a/video/out/mac_common.swift b/video/out/mac_common.swift index 25a1fe00d3..8905be8232 100644 --- a/video/out/mac_common.swift +++ b/video/out/mac_common.swift @@ -25,9 +25,9 @@ class MacCommon: Common { let swapLock: NSCondition = NSCondition() @objc init(_ vo: UnsafeMutablePointer<vo>) { - let newlog = mp_log_new(vo, vo.pointee.log, "mac") + let log = LogHelper(mp_log_new(vo, vo.pointee.log, "mac")) let option = OptionHelper(vo, vo.pointee.global) - super.init(option, newlog) + super.init(option, log) self.vo = vo input = InputHelper(vo.pointee.input_ctx, option) timer = PreciseTimer(common: self) |