summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-04-01 01:30:48 +0200
committerder richter <der.richter@gmx.de>2024-04-01 22:13:39 +0200
commitfe1de116f36be40d65b5a41674fa42667daf1f04 (patch)
tree4edc0e0e63bfaf08e25d593b6e98fbfaf4047e08
parent9c0fc83f4523a6d57a791a704a9710e7e72a634d (diff)
downloadmpv-fe1de116f36be40d65b5a41674fa42667daf1f04.tar.bz2
mpv-fe1de116f36be40d65b5a41674fa42667daf1f04.tar.xz
mac/app: add some verbose logging for app startup and file handling
-rw-r--r--osdep/mac/app_hub.swift7
-rw-r--r--osdep/mac/application.swift1
2 files changed, 8 insertions, 0 deletions
diff --git a/osdep/mac/app_hub.swift b/osdep/mac/app_hub.swift
index aba185cb2c..44373b17a6 100644
--- a/osdep/mac/app_hub.swift
+++ b/osdep/mac/app_hub.swift
@@ -47,6 +47,7 @@ class AppHub: NSObject {
#if HAVE_MACOS_MEDIA_PLAYER
remote = RemoteCommandCenter(self)
#endif
+ log.verbose("AppHub initialised")
}
@objc func initMpv(_ mpv: OpaquePointer) {
@@ -64,15 +65,18 @@ class AppHub: NSObject {
#if HAVE_MACOS_TOUCHBAR
touchBar = TouchBar(self)
#endif
+ log.verbose("AppHub functionality initialised")
}
@objc func initInput(_ input: OpaquePointer?) {
+ log.verbose("Initialising Input")
self.input.signal(input: input)
}
@objc func initCocoaCb() {
#if HAVE_MACOS_COCOA_CB
if !isApplication { return }
+ log.verbose("Initialising CocoaCB")
DispatchQueue.main.sync {
self.cocoaCb = self.cocoaCb ?? CocoaCB(mpv_create_client(mpv, "cocoacb"))
}
@@ -81,12 +85,14 @@ class AppHub: NSObject {
@objc func startRemote() {
#if HAVE_MACOS_MEDIA_PLAYER
+ log.verbose("Starting RemoteCommandCenter")
remote?.start()
#endif
}
@objc func stopRemote() {
#if HAVE_MACOS_MEDIA_PLAYER
+ log.verbose("Stoping RemoteCommandCenter")
remote?.stop()
#endif
}
@@ -100,6 +106,7 @@ class AppHub: NSObject {
}.sorted { (strL: String, strR: String) -> Bool in
return strL.localizedStandardCompare(strR) == .orderedAscending
}
+ log.verbose("Opening dropped files: \(files)")
input.open(files: files)
}
diff --git a/osdep/mac/application.swift b/osdep/mac/application.swift
index c66be61647..30f37a6f49 100644
--- a/osdep/mac/application.swift
+++ b/osdep/mac/application.swift
@@ -88,6 +88,7 @@ class Application: NSApplication, NSApplicationDelegate {
let path = (ProcessInfo.processInfo.environment["PATH"] ?? "") +
":/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin"
+ appHub.log.verbose("Setting Bundle $PATH to: \(path)")
_ = path.withCString { setenv("PATH", $0, 1) }
}