| Index: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h
|
| diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h
|
| index a5214ea6c88de7614badc48fefbbdea7f3cfb0bc..86f6c62e7a0ee98c3579cf9680c2550d4871961e 100644
|
| --- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h
|
| +++ b/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h
|
| @@ -18,9 +18,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
| /** Represents an encoded frame's type. */
|
| typedef NS_ENUM(NSUInteger, RTCFrameType) {
|
| - RTCFrameTypeEmptyFrame,
|
| - RTCFrameTypeVideoFrameKey,
|
| - RTCFrameTypeVideoFrameDelta,
|
| + RTCFrameTypeEmptyFrame = 0,
|
| + RTCFrameTypeAudioFrameSpeech = 1,
|
| + RTCFrameTypeAudioFrameCN = 2,
|
| + RTCFrameTypeVideoFrameKey = 3,
|
| + RTCFrameTypeVideoFrameDelta = 4,
|
| +};
|
| +
|
| +typedef NS_ENUM(NSUInteger, RTCVideoContentType) {
|
| + RTCVideoContentTypeUnspecified,
|
| + RTCVideoContentTypeScreenshare,
|
| };
|
|
|
| /** Represents an encoded frame. Corresponds to webrtc::EncodedImage. */
|
| @@ -40,6 +47,7 @@ RTC_EXPORT
|
| @property(nonatomic, assign) int rotation;
|
| @property(nonatomic, assign) BOOL completeFrame;
|
| @property(nonatomic, strong) NSNumber *qp;
|
| +@property(nonatomic, assign) RTCVideoContentType contentType;
|
|
|
| @end
|
|
|
| @@ -63,13 +71,18 @@ RTC_EXPORT
|
| @end
|
|
|
| /** Callback block for encoder. */
|
| -typedef void (^RTCVideoEncoderCallback)(RTCEncodedImage *frame,
|
| +typedef BOOL (^RTCVideoEncoderCallback)(RTCEncodedImage *frame,
|
| id<RTCCodecSpecificInfo> info,
|
| RTCRtpFragmentationHeader *header);
|
|
|
| /** Callback block for decoder. */
|
| typedef void (^RTCVideoDecoderCallback)(RTCVideoFrame *frame);
|
|
|
| +typedef NS_ENUM(NSUInteger, RTCVideoCodecMode) {
|
| + RTCVideoCodecModeRealtimeVideo,
|
| + RTCVideoCodecModeScreensharing,
|
| +};
|
| +
|
| /** Holds information to identify a codec. Corresponds to cricket::VideoCodec. */
|
| RTC_EXPORT
|
| @interface RTCVideoCodecInfo : NSObject
|
| @@ -101,6 +114,7 @@ RTC_EXPORT
|
| @property(nonatomic, assign) uint32_t maxFramerate;
|
|
|
| @property(nonatomic, assign) unsigned int qpMax;
|
| +@property(nonatomic, assign) RTCVideoCodecMode mode;
|
|
|
| @end
|
|
|
| @@ -123,11 +137,10 @@ RTC_EXPORT
|
| - (NSInteger)startEncodeWithSettings:(RTCVideoEncoderSettings *)settings
|
| numberOfCores:(int)numberOfCores;
|
| - (NSInteger)releaseEncoder;
|
| -- (void)destroy;
|
| - (NSInteger)encode:(RTCVideoFrame *)frame
|
| codecSpecificInfo:(id<RTCCodecSpecificInfo>)info
|
| frameTypes:(NSArray<NSNumber *> *)frameTypes;
|
| -- (BOOL)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate;
|
| +- (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate;
|
| - (NSString *)implementationName;
|
|
|
| /** Returns QP scaling settings for encoder. The quality scaler adjusts the resolution in order to
|
| @@ -145,7 +158,6 @@ RTC_EXPORT
|
| - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
| numberOfCores:(int)numberOfCores;
|
| - (NSInteger)releaseDecoder;
|
| -- (void)destroy;
|
| - (NSInteger)decode:(RTCEncodedImage *)encodedImage
|
| missingFrames:(BOOL)missingFrames
|
| fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader
|
|
|