blob: 8ceb66c99d6012098ddae05beb78a9f12af23ba8 [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. */
Mirko Bonadeie8d57242018-09-17 10:22:56 +020019RTC_OBJC_EXPORT
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020020@protocol RTCYUVPlanarBuffer <RTCVideoFrameBuffer>
21
22@property(nonatomic, readonly) int chromaWidth;
23@property(nonatomic, readonly) int chromaHeight;
24@property(nonatomic, readonly) const uint8_t *dataY;
25@property(nonatomic, readonly) const uint8_t *dataU;
26@property(nonatomic, readonly) const uint8_t *dataV;
27@property(nonatomic, readonly) int strideY;
28@property(nonatomic, readonly) int strideU;
29@property(nonatomic, readonly) int strideV;
30
31- (instancetype)initWithWidth:(int)width
32 height:(int)height
33 dataY:(const uint8_t *)dataY
34 dataU:(const uint8_t *)dataU
35 dataV:(const uint8_t *)dataV;
36- (instancetype)initWithWidth:(int)width height:(int)height;
37- (instancetype)initWithWidth:(int)width
38 height:(int)height
39 strideY:(int)strideY
40 strideU:(int)strideU
41 strideV:(int)strideV;
42
43@end
44
45NS_ASSUME_NONNULL_END