Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(522)

Unified Diff: webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h

Issue 2978623002: Implement H264 codec in Objective-C classes. (Closed)
Patch Set: Fix test after rebase. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f093049faf8309a808732f729f7564bc4168a15f..5006065649d1f928cc8c86a178c2e58aa2c836c3 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) {
- EmptyFrame,
- VideoFrameKey,
- VideoFrameDelta,
+ EmptyFrame = 0,
+ AudioFrameSpeech = 1,
+ AudioFrameCN = 2,
+ VideoFrameKey = 3,
+ VideoFrameDelta = 4,
+};
+
+typedef NS_ENUM(NSUInteger, RTCVideoContentType) {
+ Unspecified,
+ Screenshare,
};
/** 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, retain) 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) {
+ RealtimeVideo,
+ Screensharing,
+};
+
/** Settings for encoder. Corresponds to webrtc::VideoCodec. */
RTC_EXPORT
@interface RTCVideoEncoderSettings : NSObject
@@ -87,6 +100,7 @@ RTC_EXPORT
@property(nonatomic, assign) uint32_t maxFramerate;
@property(nonatomic, assign) unsigned int qpMax;
+@property(nonatomic, assign) RTCVideoCodecMode mode;
@end
@@ -115,7 +129,7 @@ RTC_EXPORT
- (int)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;
@end

Powered by Google App Engine
This is Rietveld 408576698