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 "WebRTC/RTCMTLVideoView.h" |
| 12 |
| 13 #import <Metal/Metal.h> |
| 14 |
| 15 #import "RTCNV12Renderer.h" |
| 16 |
| 17 @interface RTCMTLVideoView () |
| 18 @property(nonatomic) id<RTCMTLRenderer> renderer; |
| 19 @end |
| 20 |
| 21 @implementation RTCMTLVideoView { |
| 22 id<RTCMTLRenderer> _renderer; |
| 23 } |
| 24 |
| 25 @synthesize renderer = _renderer; |
| 26 |
| 27 - (instancetype)initWithFrame:(CGRect)frameRect device:(nullable id<MTLDevice>)d
evice { |
| 28 self = [super initWithFrame:frameRect device:device]; |
| 29 if (self) { |
| 30 _renderer = [[RTCNV12Renderer alloc] initWithView:self]; |
| 31 } |
| 32 return self; |
| 33 } |
| 34 |
| 35 - (BOOL)setupRenderer { |
| 36 return [_renderer setup]; |
| 37 } |
| 38 |
| 39 @end |
OLD | NEW |