| Index: webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| diff --git a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| index c23e0d59cd234e962fe00c1fa6dfc86789f6fd9b..d8ee1413f3a52ce83f966313e7bb184eaebc02d2 100644
|
| --- a/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| +++ b/webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m
|
| @@ -221,10 +221,12 @@ - (void)setupViews {
|
| // If not we're providing sensible default.
|
| #pragma clang diagnostic push
|
| #pragma clang diagnostic ignored "-Wpartial-availability"
|
| - if ([RTCMTLNSVideoView class]) {
|
| + if ([RTCMTLNSVideoView class] && [RTCMTLNSVideoView isMetalAvailable]) {
|
| _remoteVideoView = [[RTCMTLNSVideoView alloc] initWithFrame:NSZeroRect];
|
| _localVideoView = [[RTCMTLNSVideoView alloc] initWithFrame:NSZeroRect];
|
| - } else {
|
| + }
|
| +#pragma clang diagnostic pop
|
| + if (_remoteVideoView == nil) {
|
| NSOpenGLPixelFormatAttribute attributes[] = {
|
| NSOpenGLPFADoubleBuffer,
|
| NSOpenGLPFADepthSize, 24,
|
| @@ -245,7 +247,6 @@ - (void)setupViews {
|
| local.delegate = self;
|
| _localVideoView = local;
|
| }
|
| -#pragma clang diagnostic pop
|
|
|
| [_remoteVideoView setTranslatesAutoresizingMaskIntoConstraints:NO];
|
| [self addSubview:_remoteVideoView];
|
|
|