SGPlayer
SGPlayer copied to clipboard
Add Mac Catalyst Support
This is work is an effort @steventroughtonsmith.
I just rebased the changes and made sure it worked.
It still needs the following manual modification here in order to compile for Catalyst.
I'm sorry I didn't leave my source tree in a better state, but I do hope it's of some use. Everything seems functional except for volume changing in Mac Catalyst, and that may just be a function of the audio unit setup. There are a bunch of Mac vs iOS ifdefs that are no longer totally accurate on Catalyst which I ran into for audio and Metal rendering.
Thanks a lot for your work @steventroughtonsmith it really help me!
Till now I only bumped into one problem trying to submit a Mac Catalyst App that uses the framework into the App Store, I opened an issue here. Any idea how to solve it?
Thanks again for the work!
I tried compiling for catalyst with Xcode 11.3 and I get this error
libavcodec/videotoolbox.c:699:45: error: 'kCVPixelBufferOpenGLESCompatibilityKey' is unavailable: not available on macCatalyst
CFDictionarySetValue(buffer_attributes, kCVPixelBufferOpenGLESCompatibilityKey, kCFBooleanTrue);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:163:40: note:
'kCVPixelBufferOpenGLESCompatibilityKey' has been explicitly marked unavailable here
CV_EXPORT const CFStringRef CV_NONNULL kCVPixelBufferOpenGLESCompatibilityKey API_AVAILABLE(ios(6.0), tvos(9.0)) API_UNAVAILABLE(macosx, macCatalyst) __WATCHOS_PROHIBITED; // CFBoolean
^
1 error generated.
make: *** [libavcodec/videotoolbox.o] Error 1
make: *** Waiting for unfinished jobs....
Any ideas?
It still needs the following manual modification here in order to compile for Catalyst.