diff --git a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h index 0634791b39..0ac8ad94ac 100644 --- a/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h +++ b/sdk/objc/api/peerconnection/RTCRtpEncodingParameters.h @@ -27,11 +27,14 @@ RTC_OBJC_EXPORT /** 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 299e318bdc..3246371c23 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(_minBitrateBps.intValue); } + if (_maxFramerate != nil) { + parameters.max_framerate = absl::optional(_maxFramerate.intValue); + } if (_ssrc != nil) { parameters.ssrc = absl::optional(_ssrc.unsignedLongValue); }