blob: c9ee986f88d06bdf83c7a2c2e6c923dd190f0433 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
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
11#import <Foundation/Foundation.h>
12
13#if !TARGET_OS_IPHONE
14
15#import <AppKit/NSOpenGLView.h>
16
Anders Carlsson37bbf792018-09-05 16:29:27 +020017#import "RTCVideoRenderer.h"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020018#import "RTCVideoViewShading.h"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020019
20NS_ASSUME_NONNULL_BEGIN
21
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020022@class RTC_OBJC_TYPE(RTCNSGLVideoView);
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020023
Mirko Bonadeie8d57242018-09-17 10:22:56 +020024RTC_OBJC_EXPORT
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020025@protocol RTC_OBJC_TYPE
26(RTCNSGLVideoViewDelegate)<RTC_OBJC_TYPE(RTCVideoViewDelegate)> @end
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020027
Mirko Bonadeie8d57242018-09-17 10:22:56 +020028RTC_OBJC_EXPORT
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020029@interface RTC_OBJC_TYPE (RTCNSGLVideoView) : NSOpenGLView <RTC_OBJC_TYPE(RTCVideoRenderer)>
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020030
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020031@property(nonatomic, weak) id<RTC_OBJC_TYPE(RTCVideoViewDelegate)> delegate;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020032
33- (instancetype)initWithFrame:(NSRect)frameRect
34 pixelFormat:(NSOpenGLPixelFormat *)format
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020035 shader:(id<RTC_OBJC_TYPE(RTCVideoViewShading)>)shader
36 NS_DESIGNATED_INITIALIZER;
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020037
38@end
39
40NS_ASSUME_NONNULL_END
41
42#endif