OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #import <Foundation/Foundation.h> |
| 12 #import "WebRTC/RTCVideoRenderer.h" |
| 13 |
| 14 @class MTKView; |
| 15 @class RTCMTLRenderer; |
| 16 |
| 17 NS_ASSUME_NONNULL_BEGIN |
| 18 |
| 19 /** |
| 20 * Render class that uses Metal to render RTCVideoFrame in an instance of MTKVie
w. |
| 21 */ |
| 22 @interface RTCMTLRenderer : NSObject<RTCVideoRenderer> |
| 23 |
| 24 - (instancetype)initWithView:(__weak __kindof MTKView *)view; |
| 25 |
| 26 /** |
| 27 * Sets up the renderer. |
| 28 * |
| 29 * If the method returns NO it signifies the renderer is unable to perform prope
r setup and |
| 30 * it's responsibility of the caller to perform all necessary clean up after thi
s point. |
| 31 * Unexpexted behavior can happen if the cleanup doesn't happen and the renderer
continues |
| 32 * accepting RTCVideoRenderer callbacks. |
| 33 */ |
| 34 - (BOOL)setup; |
| 35 |
| 36 @end |
| 37 |
| 38 NS_ASSUME_NONNULL_END |
OLD | NEW |