Skip to content

Commit

Permalink
Add min_bitrate_bps to RTCRtpEncodingParameters.
Browse files Browse the repository at this point in the history
This is an ObjC followup to https://webrtc-review.googlesource.com/c/src/+/78741.

This CL only adds the field to the API, but does not wire it up.

Bug: webrtc:9341
Change-Id: Id6b1ac681324120bc90158029da7a80bf99aa512
Reviewed-on: https://webrtc-review.googlesource.com/81182
Reviewed-by: Åsa Persson <[email protected]>
Reviewed-by: Anders Carlsson <[email protected]>
Commit-Queue: Rasmus Brandt <[email protected]>
Cr-Commit-Position: refs/heads/master@{#23524}
  • Loading branch information
rasmusbrandt authored and Commit Bot committed Jun 7, 2018
1 parent 1659e97 commit a3e69e6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ @implementation RTCRtpEncodingParameters

@synthesize isActive = _isActive;
@synthesize maxBitrateBps = _maxBitrateBps;
@synthesize minBitrateBps = _minBitrateBps;
@synthesize ssrc = _ssrc;

- (instancetype)init {
Expand All @@ -28,6 +29,10 @@ - (instancetype)initWithNativeParameters:
_maxBitrateBps =
[NSNumber numberWithInt:*nativeParameters.max_bitrate_bps];
}
if (nativeParameters.min_bitrate_bps) {
_minBitrateBps =
[NSNumber numberWithInt:*nativeParameters.min_bitrate_bps];
}
if (nativeParameters.ssrc) {
_ssrc = [NSNumber numberWithUnsignedLong:*nativeParameters.ssrc];
}
Expand All @@ -41,6 +46,9 @@ - (instancetype)initWithNativeParameters:
if (_maxBitrateBps != nil) {
parameters.max_bitrate_bps = rtc::Optional<int>(_maxBitrateBps.intValue);
}
if (_minBitrateBps != nil) {
parameters.min_bitrate_bps = rtc::Optional<int>(_minBitrateBps.intValue);
}
if (_ssrc != nil) {
parameters.ssrc = rtc::Optional<uint32_t>(_ssrc.unsignedLongValue);
}
Expand Down
7 changes: 7 additions & 0 deletions sdk/objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ RTC_EXPORT
*/
@property(nonatomic, copy, nullable) NSNumber *maxBitrateBps;

/** The minimum bitrate to use for the encoding, or nil if there is no
* limit.
*
* Not implemented.
*/
@property(nonatomic, copy, nullable) NSNumber *minBitrateBps;

/** The SSRC being used by this encoding. */
@property(nonatomic, readonly, nullable) NSNumber *ssrc;

Expand Down

0 comments on commit a3e69e6

Please sign in to comment.