denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 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 | |
| 13 | #import "WebRTC/RTCVideoRenderer.h" |
| 14 | |
kthelgason | a2fb30c | 2017-03-09 03:34:27 -0800 | [diff] [blame] | 15 | // Check if metal is supported in WebRTC. |
| 16 | // NOTE: Currently arm64 == Metal. |
| 17 | #if defined(__aarch64__) |
| 18 | #define RTC_SUPPORTS_METAL |
| 19 | #endif |
| 20 | |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 21 | NS_ASSUME_NONNULL_BEGIN |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * RTCMTLVideoView is thin wrapper around MTKView. |
| 25 | * |
| 26 | * It has id<RTCVideoRenderer> property that renders video frames in the view's |
| 27 | * bounds using Metal. |
denicija | d208815 | 2017-04-28 02:14:54 -0700 | [diff] [blame] | 28 | * NOTE: always check if metal is available on the running device via |
| 29 | * RTC_SUPPORTS_METAL macro before initializing this class. |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 30 | */ |
| 31 | NS_CLASS_AVAILABLE_IOS(9) |
kthelgason | a2fb30c | 2017-03-09 03:34:27 -0800 | [diff] [blame] | 32 | |
| 33 | RTC_EXPORT |
denicija | 070d5e3 | 2017-02-26 11:44:13 -0800 | [diff] [blame] | 34 | @interface RTCMTLVideoView : UIView <RTCVideoRenderer> |
| 35 | |
| 36 | @end |
| 37 | NS_ASSUME_NONNULL_END |