Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 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 | |
magjed | bf08452 | 2017-01-13 07:10:16 -0800 | [diff] [blame] | 11 | #import <Foundation/Foundation.h> |
| 12 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 13 | #if !TARGET_OS_IPHONE |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 14 | |
| 15 | #import <AppKit/NSOpenGLView.h> |
| 16 | |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 17 | #import <WebRTC/RTCVideoRenderer.h> |
magjed | 1394191 | 2017-05-30 06:11:58 -0700 | [diff] [blame] | 18 | #import <WebRTC/RTCVideoViewShading.h> |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 19 | |
| 20 | NS_ASSUME_NONNULL_BEGIN |
| 21 | |
| 22 | @class RTCNSGLVideoView; |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 23 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame^] | 24 | @protocol RTCNSGLVideoViewDelegate <RTCVideoViewDelegate> |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 25 | @end |
| 26 | |
| 27 | @interface RTCNSGLVideoView : NSOpenGLView <RTCVideoRenderer> |
| 28 | |
Kári Tristan Helgason | 06d094f | 2018-04-19 17:38:05 +0200 | [diff] [blame] | 29 | @property(nonatomic, weak) id<RTCVideoViewDelegate> delegate; |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 30 | |
magjed | 1394191 | 2017-05-30 06:11:58 -0700 | [diff] [blame] | 31 | - (instancetype)initWithFrame:(NSRect)frameRect |
| 32 | pixelFormat:(NSOpenGLPixelFormat *)format |
| 33 | shader:(id<RTCVideoViewShading>)shader NS_DESIGNATED_INITIALIZER; |
| 34 | |
Jon Hjelle | e799bad | 2016-01-11 13:47:11 -0800 | [diff] [blame] | 35 | @end |
| 36 | |
| 37 | NS_ASSUME_NONNULL_END |
tkchin | 9eeb624 | 2016-04-27 01:54:20 -0700 | [diff] [blame] | 38 | |
| 39 | #endif |