OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
12 | 12 |
13 #import <WebRTC/RTCMacros.h> | 13 #import <WebRTC/RTCMacros.h> |
14 | 14 #import <WebRTC/RTCVideoFrame.h> |
15 @class RTCVideoFrame; | |
16 | 15 |
17 NS_ASSUME_NONNULL_BEGIN | 16 NS_ASSUME_NONNULL_BEGIN |
18 | 17 |
19 /** Represents an encoded frame's type. */ | 18 /** Represents an encoded frame's type. */ |
20 typedef NS_ENUM(NSUInteger, RTCFrameType) { | 19 typedef NS_ENUM(NSUInteger, RTCFrameType) { |
21 RTCFrameTypeEmptyFrame = 0, | 20 RTCFrameTypeEmptyFrame = 0, |
22 RTCFrameTypeAudioFrameSpeech = 1, | 21 RTCFrameTypeAudioFrameSpeech = 1, |
23 RTCFrameTypeAudioFrameCN = 2, | 22 RTCFrameTypeAudioFrameCN = 2, |
24 RTCFrameTypeVideoFrameKey = 3, | 23 RTCFrameTypeVideoFrameKey = 3, |
25 RTCFrameTypeVideoFrameDelta = 4, | 24 RTCFrameTypeVideoFrameDelta = 4, |
26 }; | 25 }; |
27 | 26 |
28 typedef NS_ENUM(NSUInteger, RTCVideoContentType) { | 27 typedef NS_ENUM(NSUInteger, RTCVideoContentType) { |
29 RTCVideoContentTypeUnspecified, | 28 RTCVideoContentTypeUnspecified, |
30 RTCVideoContentTypeScreenshare, | 29 RTCVideoContentTypeScreenshare, |
31 }; | 30 }; |
32 | 31 |
33 /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ | 32 /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */ |
34 RTC_EXPORT | 33 RTC_EXPORT |
35 @interface RTCEncodedImage : NSObject | 34 @interface RTCEncodedImage : NSObject |
36 | 35 |
37 @property(nonatomic, strong) NSData *buffer; | 36 @property(nonatomic, strong) NSData *buffer; |
38 @property(nonatomic, assign) int encodedWidth; | 37 @property(nonatomic, assign) int32_t encodedWidth; |
39 @property(nonatomic, assign) int encodedHeight; | 38 @property(nonatomic, assign) int32_t encodedHeight; |
40 @property(nonatomic, assign) uint32_t timeStamp; | 39 @property(nonatomic, assign) uint32_t timeStamp; |
41 @property(nonatomic, assign) long captureTimeMs; | 40 @property(nonatomic, assign) int64_t captureTimeMs; |
42 @property(nonatomic, assign) long ntpTimeMs; | 41 @property(nonatomic, assign) int64_t ntpTimeMs; |
43 @property(nonatomic, assign) uint8_t flags; | 42 @property(nonatomic, assign) uint8_t flags; |
44 @property(nonatomic, assign) long encodeStartMs; | 43 @property(nonatomic, assign) int64_t encodeStartMs; |
45 @property(nonatomic, assign) long encodeFinishMs; | 44 @property(nonatomic, assign) int64_t encodeFinishMs; |
46 @property(nonatomic, assign) RTCFrameType frameType; | 45 @property(nonatomic, assign) RTCFrameType frameType; |
47 @property(nonatomic, assign) int rotation; | 46 @property(nonatomic, assign) RTCVideoRotation rotation; |
48 @property(nonatomic, assign) BOOL completeFrame; | 47 @property(nonatomic, assign) BOOL completeFrame; |
49 @property(nonatomic, strong) NSNumber *qp; | 48 @property(nonatomic, strong) NSNumber *qp; |
50 @property(nonatomic, assign) RTCVideoContentType contentType; | 49 @property(nonatomic, assign) RTCVideoContentType contentType; |
51 | 50 |
52 @end | 51 @end |
53 | 52 |
54 /** Information for header. Corresponds to webrtc::RTPFragmentationHeader. */ | 53 /** Information for header. Corresponds to webrtc::RTPFragmentationHeader. */ |
55 RTC_EXPORT | 54 RTC_EXPORT |
56 @interface RTCRtpFragmentationHeader : NSObject | 55 @interface RTCRtpFragmentationHeader : NSObject |
57 | 56 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 - (NSInteger)decode:(RTCEncodedImage *)encodedImage | 175 - (NSInteger)decode:(RTCEncodedImage *)encodedImage |
177 missingFrames:(BOOL)missingFrames | 176 missingFrames:(BOOL)missingFrames |
178 fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader | 177 fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader |
179 codecSpecificInfo:(__nullable id<RTCCodecSpecificInfo>)info | 178 codecSpecificInfo:(__nullable id<RTCCodecSpecificInfo>)info |
180 renderTimeMs:(int64_t)renderTimeMs; | 179 renderTimeMs:(int64_t)renderTimeMs; |
181 - (NSString *)implementationName; | 180 - (NSString *)implementationName; |
182 | 181 |
183 @end | 182 @end |
184 | 183 |
185 NS_ASSUME_NONNULL_END | 184 NS_ASSUME_NONNULL_END |
OLD | NEW |