OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright 2017 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 <MetalKit/MetalKit.h> | |
13 #import "WebRTC/RTCVideoRenderer.h" | |
14 | |
15 NS_ASSUME_NONNULL_BEGIN | |
16 RTC_EXPORT | |
17 | |
18 /** | |
19 * RTCMTLVideoView is thin wrapper around MTKView. | |
20 * | |
21 * It has id<RTCVideoRenderer> property that renders video frames in the view's | |
22 * bounds using Metal. | |
23 */ | |
24 @interface RTCMTLVideoView : MTKView | |
tkchin_webrtc
2017/02/10 23:32:10
I think it is better to subclass UIView here inste
daniela-webrtc
2017/02/13 12:32:07
You are right. I'm already working on a follow up
tkchin_webrtc
2017/02/14 00:23:56
I would prefer that headers that are checked into
| |
25 | |
26 /** | |
27 * Renderer class that can render RTCVideoTrack. | |
28 */ | |
29 @property(nonatomic, readonly) id<RTCVideoRenderer> renderer; | |
30 | |
31 /** | |
32 * Sets up the renderer. | |
33 * | |
34 * If the method returns NO it signifies the renderer is unable to perform prope r setup and | |
35 * it's responsibility of the caller to perform all necessary clean up after thi s point. | |
36 * Unexpected behavior can happen if the cleanup doesn't happen. | |
37 */ | |
38 - (BOOL)setupRenderer; | |
39 | |
40 #pragma mark - Unavailable | |
tkchin_webrtc
2017/02/10 23:32:10
nit: don't need this pragma
| |
41 - (instancetype)init NS_UNAVAILABLE; | |
42 + (instancetype) new NS_UNAVAILABLE; | |
tkchin_webrtc
2017/02/10 23:32:10
nit: remove space
also, ooc why is new explicitly
daniela-webrtc
2017/02/13 12:32:07
Initially it was there because I did the renderer
| |
43 @end | |
44 NS_ASSUME_NONNULL_END | |
OLD | NEW |