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

Unified Diff: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm

Issue 2877933004: objc wrapper for PeerConnection::SetBitrate (Closed)
Patch Set: Document return value of SetBitrate and rebase. Created 3 years, 4 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/Classes/PeerConnection/RTCPeerConnection.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
index 346f0ba6ee8cf7d9bd0f0698712cc3762a466264..1709047e2b1a8a937472eaae33c53de9a0fc1d9e 100644
--- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
@@ -369,6 +369,22 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
_peerConnection->SetRemoteDescription(observer, sdp.nativeDescription);
}
+- (BOOL)setBitrateToMin:(NSNumber *_Nullable)minBitrateBps
+ toCurrent:(NSNumber *_Nullable)currentBitrateBps
+ toMax:(NSNumber *_Nullable)maxBitrateBps {
+ webrtc::PeerConnectionInterface::BitrateParameters params;
+ if (minBitrateBps != nil) {
+ params.min_bitrate_bps = rtc::Optional<int>(minBitrateBps.intValue);
+ }
+ if (currentBitrateBps != nil) {
+ params.current_bitrate_bps = rtc::Optional<int>(currentBitrateBps.intValue);
+ }
+ if (maxBitrateBps != nil) {
+ params.max_bitrate_bps = rtc::Optional<int>(maxBitrateBps.intValue);
+ }
+ return _peerConnection->SetBitrate(params).ok();
+}
+
- (BOOL)startRtcEventLogWithFilePath:(NSString *)filePath
maxSizeInBytes:(int64_t)maxSizeInBytes {
RTC_DCHECK(filePath.length);

Powered by Google App Engine
This is Rietveld 408576698