blob: c8314ffbeddfd3820d8e080a0ee4a52516d631d6 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 09:30:29 +02001/*
2 * Copyright 2018 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 <AVFoundation/AVFoundation.h>
12
13#import "RTCMacros.h"
14#import "RTCVideoFrameBuffer.h"
15
16NS_ASSUME_NONNULL_BEGIN
17
18/** Protocol for RTCVideoFrameBuffers containing YUV planar data. */
19@protocol RTCYUVPlanarBuffer <RTCVideoFrameBuffer>
20
21@property(nonatomic, readonly) int chromaWidth;
22@property(nonatomic, readonly) int chromaHeight;
23@property(nonatomic, readonly) const uint8_t *dataY;
24@property(nonatomic, readonly) const uint8_t *dataU;
25@property(nonatomic, readonly) const uint8_t *dataV;
26@property(nonatomic, readonly) int strideY;
27@property(nonatomic, readonly) int strideU;
28@property(nonatomic, readonly) int strideV;
29
30- (instancetype)initWithWidth:(int)width
31 height:(int)height
32 dataY:(const uint8_t *)dataY
33 dataU:(const uint8_t *)dataU
34 dataV:(const uint8_t *)dataV;
35- (instancetype)initWithWidth:(int)width height:(int)height;
36- (instancetype)initWithWidth:(int)width
37 height:(int)height
38 strideY:(int)strideY
39 strideU:(int)strideU
40 strideV:(int)strideV;
41
42@end
43
44NS_ASSUME_NONNULL_END