iOS: Add maxFramerate to RtpEncodingParameters.
iOS counterpart of https://webrtc-review.googlesource.com/c/src/+/91440.
Bug: webrtc:9597
Change-Id: Iba426dc3b8acec3c90996ffa012d5dfc833c16f5
Reviewed-on: https://webrtc-review.googlesource.com/102260
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24857}
diff --git a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h
index 0634791..0ac8ad9 100644
--- a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h
+++ b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h
@@ -27,11 +27,14 @@
/** The minimum bitrate to use for the encoding, or nil if there is no
* limit.
- *
- * Not implemented.
*/
@property(nonatomic, copy, nullable) NSNumber *minBitrateBps;
+/** The maximum framerate to use for the encoding, or nil if there is no
+ * limit.
+ */
+@property(nonatomic, copy, nullable) NSNumber *maxFramerate;
+
/** The SSRC being used by this encoding. */
@property(nonatomic, readonly, nullable) NSNumber *ssrc;
diff --git a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.mm b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.mm
index 299e318..3246371 100644
--- a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.mm
+++ b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.mm
@@ -15,6 +15,7 @@
@synthesize isActive = _isActive;
@synthesize maxBitrateBps = _maxBitrateBps;
@synthesize minBitrateBps = _minBitrateBps;
+@synthesize maxFramerate = _maxFramerate;
@synthesize ssrc = _ssrc;
- (instancetype)init {
@@ -33,6 +34,9 @@
_minBitrateBps =
[NSNumber numberWithInt:*nativeParameters.min_bitrate_bps];
}
+ if (nativeParameters.max_framerate) {
+ _maxFramerate = [NSNumber numberWithInt:*nativeParameters.max_framerate];
+ }
if (nativeParameters.ssrc) {
_ssrc = [NSNumber numberWithUnsignedLong:*nativeParameters.ssrc];
}
@@ -49,6 +53,9 @@
if (_minBitrateBps != nil) {
parameters.min_bitrate_bps = absl::optional<int>(_minBitrateBps.intValue);
}
+ if (_maxFramerate != nil) {
+ parameters.max_framerate = absl::optional<int>(_maxFramerate.intValue);
+ }
if (_ssrc != nil) {
parameters.ssrc = absl::optional<uint32_t>(_ssrc.unsignedLongValue);
}