summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_application_objc.h
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2024-02-25 23:59:11 +0100
committerder richter <der.richter@gmx.de>2024-02-27 14:01:38 +0100
commita7c4a113b82dc57641c08e1da5c3df9acb704be4 (patch)
tree7c2937343e2345a9050a320c868195c85f5ed437 /osdep/macosx_application_objc.h
parent3dcc661de7e884e147965615749965df5f80a443 (diff)
downloadmpv-a7c4a113b82dc57641c08e1da5c3df9acb704be4.tar.bz2
mpv-a7c4a113b82dc57641c08e1da5c3df9acb704be4.tar.xz
cocoa-cb: remove pre-allocation and initialise only when used
cocoa-cb was always pre-allocated in the Application itself because libmpv needs to be set up before usage, an opengl context has to be set and because it was decided mac specific code should be kept out of libmpv. this means that a completely working libmpv and opengl renderer was set up even if it wasn't used. leading to unnecessary log message, resources being used or reserved on the system that might not be used, triggering of dedicated GPU unnecessarily and many other things. even if not optimal, this wasn't the biggest problem since we only had that one working vo on macOS. though now that we have a vulkan gpu(-next) backend on macOS that was made the default, we always have that dangling cocoa-cb instance, which is completely unnecessary. move the cocoa-cb initialisation into libmpv preinit function and only init cocoa-cb when we are a standalone App and cocoa-cb support is build into.
Diffstat (limited to 'osdep/macosx_application_objc.h')
-rw-r--r--osdep/macosx_application_objc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/macosx_application_objc.h b/osdep/macosx_application_objc.h
index fab968dba8..da8c73268b 100644
--- a/osdep/macosx_application_objc.h
+++ b/osdep/macosx_application_objc.h
@@ -30,7 +30,7 @@ struct mpv_handle;
- (void)queueCommand:(char *)cmd;
- (void)stopMPV:(char *)cmd;
- (void)openFiles:(NSArray *)filenames;
-- (void)setMpvHandle:(struct mpv_handle *)ctx;
+- (void)initCocoaCb:(struct mpv_handle *)ctx;
+ (const struct m_sub_options *)getMacOSConf;
+ (const struct m_sub_options *)getVoSubConf;