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

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, 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 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/base/checks.h" 30 #include "webrtc/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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 _hasStartedRtcEventLog = 388 _hasStartedRtcEventLog =
388 _peerConnection->StartRtcEventLog(fd, maxSizeInBytes); 389 _peerConnection->StartRtcEventLog(fd, maxSizeInBytes);
389 return _hasStartedRtcEventLog; 390 return _hasStartedRtcEventLog;
390 } 391 }
391 392
392 - (void)stopRtcEventLog { 393 - (void)stopRtcEventLog {
393 _peerConnection->StopRtcEventLog(); 394 _peerConnection->StopRtcEventLog();
394 _hasStartedRtcEventLog = NO; 395 _hasStartedRtcEventLog = NO;
395 } 396 }
396 397
398 - (void)setBitrateAllocationStrategy:(RTCBitrateAllocationStrategy *)bitrateAllo cationStrategy {
399 _peerConnection->SetBitrateAllocationStrategy(bitrateAllocationStrategy.strate gy);
400 }
401
397 - (RTCRtpSender *)senderWithKind:(NSString *)kind 402 - (RTCRtpSender *)senderWithKind:(NSString *)kind
398 streamId:(NSString *)streamId { 403 streamId:(NSString *)streamId {
399 std::string nativeKind = [NSString stdStringForString:kind]; 404 std::string nativeKind = [NSString stdStringForString:kind];
400 std::string nativeStreamId = [NSString stdStringForString:streamId]; 405 std::string nativeStreamId = [NSString stdStringForString:streamId];
401 rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeSender( 406 rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeSender(
402 _peerConnection->CreateSender(nativeKind, nativeStreamId)); 407 _peerConnection->CreateSender(nativeKind, nativeStreamId));
403 return nativeSender ? 408 return nativeSender ?
404 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender] 409 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender]
405 : nil; 410 : nil;
406 } 411 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 case RTCStatsOutputLevelDebug: 597 case RTCStatsOutputLevelDebug:
593 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; 598 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug;
594 } 599 }
595 } 600 }
596 601
597 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { 602 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection {
598 return _peerConnection; 603 return _peerConnection;
599 } 604 }
600 605
601 @end 606 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698