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. */
33 RTC_OBJC_EXPORT
34 @interface RTC_OBJC_TYPE (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, strong) NSNumber *qp;
48 @property(nonatomic, assign) RTCVideoContentType contentType;
49 
50 @end
51 
52 NS_ASSUME_NONNULL_END
53