Fails to build on Mac OS 10.14, where OpenGL and lockFocusIfCanDraw are deprecated
Symptom 1:
./cocoawindow.h:35:24: error: 'NSOpenGLView' is deprecated: first deprecated in macOS 10.14 - Please use MTKView instead. [-Werror,-Wdeprecated-declarations]
make[3]: *** [libgstosxvideo_la-osxvideosink.lo] Error 1
Usual workaround is to define GL_SILENCE_DEPRECATION.
Symptom 2:
cocoawindow.m:565:13: error: 'lockFocusIfCanDraw' is deprecated: first deprecated in macOS 10.14 - To draw, subclass NSView and implement -drawRect:; AppKit's automatic deferred
display mechanism will call -drawRect: as necessary to display the view. [-Werror,-Wdeprecated-declarations]
if ([self lockFocusIfCanDraw]) {
^
/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:237:1: note: 'lockFocusIfCanDraw' has been explicitly marked deprecated here
That's also a deprecation, but doesn't have a nice macro to disable it, so until it's fixed, have to turn them off globally (for mac os 10.14, anyway).
Edited by Dan Kegel