blob: 226c62a6a177fafd38fffc0fb34471bf15d66ce0 [file] [log] [blame]
denicija070d5e32017-02-26 11:44:13 -08001/*
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
kthelgasona2fb30c2017-03-09 03:34:27 -080015// Check if metal is supported in WebRTC.
16// NOTE: Currently arm64 == Metal.
17#if defined(__aarch64__)
18#define RTC_SUPPORTS_METAL
19#endif
20
denicija070d5e32017-02-26 11:44:13 -080021NS_ASSUME_NONNULL_BEGIN
denicija070d5e32017-02-26 11:44:13 -080022
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.
denicijad2088152017-04-28 02:14:54 -070028 * NOTE: always check if metal is available on the running device via
29 * RTC_SUPPORTS_METAL macro before initializing this class.
denicija070d5e32017-02-26 11:44:13 -080030 */
31NS_CLASS_AVAILABLE_IOS(9)
kthelgasona2fb30c2017-03-09 03:34:27 -080032
33RTC_EXPORT
denicija070d5e32017-02-26 11:44:13 -080034@interface RTCMTLVideoView : UIView <RTCVideoRenderer>
35
36@end
37NS_ASSUME_NONNULL_END