Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 1 | /* |
| 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 "RTCMacros.h" |
| 14 | #import "RTCVideoFrame.h" |
| 15 | |
| 16 | NS_ASSUME_NONNULL_BEGIN |
| 17 | |
| 18 | /** Represents an encoded frame's type. */ |
| 19 | typedef NS_ENUM(NSUInteger, RTCFrameType) { |
| 20 | RTCFrameTypeEmptyFrame = 0, |
| 21 | RTCFrameTypeAudioFrameSpeech = 1, |
| 22 | RTCFrameTypeAudioFrameCN = 2, |
| 23 | RTCFrameTypeVideoFrameKey = 3, |
| 24 | RTCFrameTypeVideoFrameDelta = 4, |
| 25 | }; |
| 26 | |
| 27 | typedef NS_ENUM(NSUInteger, RTCVideoContentType) { |
| 28 | RTCVideoContentTypeUnspecified, |
| 29 | RTCVideoContentTypeScreenshare, |
| 30 | }; |
| 31 | |
| 32 | /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ |
Mirko Bonadei | e8d5724 | 2018-09-17 10:22:56 +0200 | [diff] [blame] | 33 | RTC_OBJC_EXPORT |
Anders Carlsson | 7bca8ca | 2018-08-30 09:30:29 +0200 | [diff] [blame] | 34 | @interface RTCEncodedImage : NSObject |
| 35 | |
| 36 | @property(nonatomic, strong) NSData *buffer; |
| 37 | @property(nonatomic, assign) int32_t encodedWidth; |
| 38 | @property(nonatomic, assign) int32_t encodedHeight; |
| 39 | @property(nonatomic, assign) uint32_t timeStamp; |
| 40 | @property(nonatomic, assign) int64_t captureTimeMs; |
| 41 | @property(nonatomic, assign) int64_t ntpTimeMs; |
| 42 | @property(nonatomic, assign) uint8_t flags; |
| 43 | @property(nonatomic, assign) int64_t encodeStartMs; |
| 44 | @property(nonatomic, assign) int64_t encodeFinishMs; |
| 45 | @property(nonatomic, assign) RTCFrameType frameType; |
| 46 | @property(nonatomic, assign) RTCVideoRotation rotation; |
| 47 | @property(nonatomic, assign) BOOL completeFrame; |
| 48 | @property(nonatomic, strong) NSNumber *qp; |
| 49 | @property(nonatomic, assign) RTCVideoContentType contentType; |
| 50 | |
| 51 | @end |
| 52 | |
| 53 | NS_ASSUME_NONNULL_END |