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

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

Issue 3011013002: Improve the style of the objc wrapper for PeerConnectionInterface::SetBitrate. (Closed)
Patch Set: Fix comment style. Created 3 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 362 }
363 363
364 - (void)setRemoteDescription:(RTCSessionDescription *)sdp 364 - (void)setRemoteDescription:(RTCSessionDescription *)sdp
365 completionHandler:(void (^)(NSError *error))completionHandler { 365 completionHandler:(void (^)(NSError *error))completionHandler {
366 rtc::scoped_refptr<webrtc::SetSessionDescriptionObserverAdapter> observer( 366 rtc::scoped_refptr<webrtc::SetSessionDescriptionObserverAdapter> observer(
367 new rtc::RefCountedObject<webrtc::SetSessionDescriptionObserverAdapter>( 367 new rtc::RefCountedObject<webrtc::SetSessionDescriptionObserverAdapter>(
368 completionHandler)); 368 completionHandler));
369 _peerConnection->SetRemoteDescription(observer, sdp.nativeDescription); 369 _peerConnection->SetRemoteDescription(observer, sdp.nativeDescription);
370 } 370 }
371 371
372 - (BOOL)setBitrateToMin:(NSNumber *_Nullable)minBitrateBps 372 - (BOOL)setBweMinBitrateBps:(nullable NSNumber *)minBitrateBps
373 toCurrent:(NSNumber *_Nullable)currentBitrateBps 373 currentBitrateBps:(nullable NSNumber *)currentBitrateBps
374 toMax:(NSNumber *_Nullable)maxBitrateBps { 374 maxBitrateBps:(nullable NSNumber *)maxBitrateBps {
375 webrtc::PeerConnectionInterface::BitrateParameters params; 375 webrtc::PeerConnectionInterface::BitrateParameters params;
376 if (minBitrateBps != nil) { 376 if (minBitrateBps != nil) {
377 params.min_bitrate_bps = rtc::Optional<int>(minBitrateBps.intValue); 377 params.min_bitrate_bps = rtc::Optional<int>(minBitrateBps.intValue);
378 } 378 }
379 if (currentBitrateBps != nil) { 379 if (currentBitrateBps != nil) {
380 params.current_bitrate_bps = rtc::Optional<int>(currentBitrateBps.intValue); 380 params.current_bitrate_bps = rtc::Optional<int>(currentBitrateBps.intValue);
381 } 381 }
382 if (maxBitrateBps != nil) { 382 if (maxBitrateBps != nil) {
383 params.max_bitrate_bps = rtc::Optional<int>(maxBitrateBps.intValue); 383 params.max_bitrate_bps = rtc::Optional<int>(maxBitrateBps.intValue);
384 } 384 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 case RTCStatsOutputLevelDebug: 608 case RTCStatsOutputLevelDebug:
609 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; 609 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug;
610 } 610 }
611 } 611 }
612 612
613 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { 613 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection {
614 return _peerConnection; 614 return _peerConnection;
615 } 615 }
616 616
617 @end 617 @end
OLDNEW
« no previous file with comments | « no previous file | webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698