| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #import "RTCNSGLVideoView.h" | 11 #if !TARGET_OS_IPHONE |
| 12 |
| 13 #import "WebRTC/RTCNSGLVideoView.h" |
| 12 | 14 |
| 13 #import <CoreVideo/CVDisplayLink.h> | 15 #import <CoreVideo/CVDisplayLink.h> |
| 14 #import <OpenGL/gl3.h> | 16 #import <OpenGL/gl3.h> |
| 15 #import "RTCVideoFrame.h" | 17 |
| 18 #import "WebRTC/RTCVideoFrame.h" |
| 19 |
| 16 #import "RTCOpenGLVideoRenderer.h" | 20 #import "RTCOpenGLVideoRenderer.h" |
| 17 | 21 |
| 18 @interface RTCNSGLVideoView () | 22 @interface RTCNSGLVideoView () |
| 19 // |videoFrame| is set when we receive a frame from a worker thread and is read | 23 // |videoFrame| is set when we receive a frame from a worker thread and is read |
| 20 // from the display link callback so atomicity is required. | 24 // from the display link callback so atomicity is required. |
| 21 @property(atomic, strong) RTCVideoFrame *videoFrame; | 25 @property(atomic, strong) RTCVideoFrame *videoFrame; |
| 22 @property(atomic, strong) RTCOpenGLVideoRenderer *glRenderer; | 26 @property(atomic, strong) RTCOpenGLVideoRenderer *glRenderer; |
| 23 - (void)drawFrame; | 27 - (void)drawFrame; |
| 24 @end | 28 @end |
| 25 | 29 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 136 |
| 133 - (void)teardownDisplayLink { | 137 - (void)teardownDisplayLink { |
| 134 if (!_displayLink) { | 138 if (!_displayLink) { |
| 135 return; | 139 return; |
| 136 } | 140 } |
| 137 CVDisplayLinkRelease(_displayLink); | 141 CVDisplayLinkRelease(_displayLink); |
| 138 _displayLink = NULL; | 142 _displayLink = NULL; |
| 139 } | 143 } |
| 140 | 144 |
| 141 @end | 145 @end |
| 146 |
| 147 #endif // !TARGET_OS_IPHONE |
| OLD | NEW |