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 <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 #if TARGET_OS_IPHONE | 12 #if TARGET_OS_IPHONE |
13 #import <GLKit/GLKit.h> | 13 #import <GLKit/GLKit.h> |
14 #else | 14 #else |
15 #import <AppKit/NSOpenGL.h> | 15 #import <AppKit/NSOpenGL.h> |
16 #endif | 16 #endif |
17 | 17 |
| 18 #import "webrtc/base/objc/RTCMacros.h" |
| 19 |
18 NS_ASSUME_NONNULL_BEGIN | 20 NS_ASSUME_NONNULL_BEGIN |
19 | 21 |
20 @class RTCVideoFrame; | 22 @class RTCVideoFrame; |
21 | 23 |
22 // RTCOpenGLVideoRenderer issues appropriate OpenGL commands to draw a frame to | 24 // RTCOpenGLVideoRenderer issues appropriate OpenGL commands to draw a frame to |
23 // the currently bound framebuffer. Supports OpenGL 3.2 and OpenGLES 2.0. OpenGL | 25 // the currently bound framebuffer. Supports OpenGL 3.2 and OpenGLES 2.0. OpenGL |
24 // framebuffer creation and management should be handled elsewhere using the | 26 // framebuffer creation and management should be handled elsewhere using the |
25 // same context used to initialize this class. | 27 // same context used to initialize this class. |
| 28 RTC_EXPORT |
26 @interface RTCOpenGLVideoRenderer : NSObject | 29 @interface RTCOpenGLVideoRenderer : NSObject |
27 | 30 |
28 // The last successfully drawn frame. Used to avoid drawing frames unnecessarily | 31 // The last successfully drawn frame. Used to avoid drawing frames unnecessarily |
29 // hence saving battery life by reducing load. | 32 // hence saving battery life by reducing load. |
30 @property(nonatomic, readonly) RTCVideoFrame *lastDrawnFrame; | 33 @property(nonatomic, readonly) RTCVideoFrame *lastDrawnFrame; |
31 | 34 |
32 #if TARGET_OS_IPHONE | 35 #if TARGET_OS_IPHONE |
33 - (instancetype)initWithContext:(EAGLContext *)context | 36 - (instancetype)initWithContext:(EAGLContext *)context |
34 NS_DESIGNATED_INITIALIZER; | 37 NS_DESIGNATED_INITIALIZER; |
35 #else | 38 #else |
(...skipping 13 matching lines...) Expand all Loading... |
49 // Sets up the OpenGL state needed for rendering. | 52 // Sets up the OpenGL state needed for rendering. |
50 - (void)setupGL; | 53 - (void)setupGL; |
51 // Tears down the OpenGL state created by |setupGL|. | 54 // Tears down the OpenGL state created by |setupGL|. |
52 - (void)teardownGL; | 55 - (void)teardownGL; |
53 | 56 |
54 - (instancetype)init NS_UNAVAILABLE; | 57 - (instancetype)init NS_UNAVAILABLE; |
55 | 58 |
56 @end | 59 @end |
57 | 60 |
58 NS_ASSUME_NONNULL_END | 61 NS_ASSUME_NONNULL_END |
OLD | NEW |