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}
This commit is contained in:
parent
02fed02c00
commit
3c7694137a
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user