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

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

Issue 2996643002: BWE allocation strategy
Patch Set: BWE allocation strategy 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
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
11 #import "RTCPeerConnection+Private.h" 11 #import "RTCPeerConnection+Private.h"
12 12
13 #import "NSString+StdString.h" 13 #import "NSString+StdString.h"
14 #import "RTCConfiguration+Private.h" 14 #import "RTCConfiguration+Private.h"
15 #import "RTCDataChannel+Private.h" 15 #import "RTCDataChannel+Private.h"
16 #import "RTCIceCandidate+Private.h" 16 #import "RTCIceCandidate+Private.h"
17 #import "RTCLegacyStatsReport+Private.h" 17 #import "RTCLegacyStatsReport+Private.h"
18 #import "RTCMediaConstraints+Private.h" 18 #import "RTCMediaConstraints+Private.h"
19 #import "RTCMediaStream+Private.h" 19 #import "RTCMediaStream+Private.h"
20 #import "RTCPeerConnectionFactory+Private.h" 20 #import "RTCPeerConnectionFactory+Private.h"
21 #import "RTCRtpReceiver+Private.h" 21 #import "RTCRtpReceiver+Private.h"
22 #import "RTCRtpSender+Private.h" 22 #import "RTCRtpSender+Private.h"
23 #import "RTCSessionDescription+Private.h" 23 #import "RTCSessionDescription+Private.h"
24 #import "WebRTC/RTCBitrateAllocationStrategy.h"
24 #import "WebRTC/RTCLogging.h" 25 #import "WebRTC/RTCLogging.h"
25 26
26 #include <memory> 27 #include <memory>
27 28
28 #include "webrtc/api/jsepicecandidate.h" 29 #include "webrtc/api/jsepicecandidate.h"
29 #include "webrtc/rtc_base/checks.h" 30 #include "webrtc/rtc_base/checks.h"
30 31
31 NSString * const kRTCPeerConnectionErrorDomain = 32 NSString * const kRTCPeerConnectionErrorDomain =
32 @"org.webrtc.RTCPeerConnection"; 33 @"org.webrtc.RTCPeerConnection";
33 int const kRTCPeerConnnectionSessionDescriptionError = -1; 34 int const kRTCPeerConnnectionSessionDescriptionError = -1;
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 _hasStartedRtcEventLog = 404 _hasStartedRtcEventLog =
404 _peerConnection->StartRtcEventLog(fd, maxSizeInBytes); 405 _peerConnection->StartRtcEventLog(fd, maxSizeInBytes);
405 return _hasStartedRtcEventLog; 406 return _hasStartedRtcEventLog;
406 } 407 }
407 408
408 - (void)stopRtcEventLog { 409 - (void)stopRtcEventLog {
409 _peerConnection->StopRtcEventLog(); 410 _peerConnection->StopRtcEventLog();
410 _hasStartedRtcEventLog = NO; 411 _hasStartedRtcEventLog = NO;
411 } 412 }
412 413
414 - (void)setBitrateAllocationStrategy:(RTCBitrateAllocationStrategy *)bitrateAllo cationStrategy {
415 _peerConnection->SetBitrateAllocationStrategy(bitrateAllocationStrategy.strate gy);
416 }
417
413 - (RTCRtpSender *)senderWithKind:(NSString *)kind 418 - (RTCRtpSender *)senderWithKind:(NSString *)kind
414 streamId:(NSString *)streamId { 419 streamId:(NSString *)streamId {
415 std::string nativeKind = [NSString stdStringForString:kind]; 420 std::string nativeKind = [NSString stdStringForString:kind];
416 std::string nativeStreamId = [NSString stdStringForString:streamId]; 421 std::string nativeStreamId = [NSString stdStringForString:streamId];
417 rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeSender( 422 rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeSender(
418 _peerConnection->CreateSender(nativeKind, nativeStreamId)); 423 _peerConnection->CreateSender(nativeKind, nativeStreamId));
419 return nativeSender ? 424 return nativeSender ?
420 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender] 425 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender]
421 : nil; 426 : nil;
422 } 427 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 case RTCStatsOutputLevelDebug: 613 case RTCStatsOutputLevelDebug:
609 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; 614 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug;
610 } 615 }
611 } 616 }
612 617
613 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { 618 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection {
614 return _peerConnection; 619 return _peerConnection;
615 } 620 }
616 621
617 @end 622 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698