SGPlayer icon indicating copy to clipboard operation
SGPlayer copied to clipboard

Add Mac Catalyst Support

Open tiagomartinho opened this issue 5 years ago • 4 comments

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.

tiagomartinho avatar Nov 27 '19 12:11 tiagomartinho

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.

steventroughtonsmith avatar Dec 11 '19 14:12 steventroughtonsmith

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!

tiagomartinho avatar Dec 12 '19 08:12 tiagomartinho

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?

AndreiVidrasco avatar Mar 08 '20 12:03 AndreiVidrasco

It still needs the following manual modification here in order to compile for Catalyst.

tiagomartinho avatar Mar 19 '20 11:03 tiagomartinho