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

Unified Diff: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m

Issue 2996643002: BWE allocation strategy
Patch Set: Comments handling 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/examples/BUILD.gn ('k') | webrtc/examples/objc/AppRTCMobile/ARDBitrateAllocationStrategy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
index 0492733b8726e8420a45cb53f393c43361896abe..2eeabd113484ed3251e220872bc682999ec1abd2 100644
--- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
+++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m
@@ -25,6 +25,7 @@
#import "WebRTC/RTCVideoTrack.h"
#import "ARDAppEngineClient.h"
+#import "ARDBitrateAllocationStrategy.h"
#import "ARDJoinResponse.h"
#import "ARDMessageResponse.h"
#import "ARDSDPUtils.h"
@@ -103,6 +104,7 @@ static int const kKbpsMultiplier = 1000;
ARDTimerProxy *_statsTimer;
ARDSettingsModel *_settings;
RTCVideoTrack *_localVideoTrack;
+ ARDBitrateAllocationStrategy *_bitrateAllocationStrategy;
}
@synthesize shouldGetStats = _shouldGetStats;
@@ -300,6 +302,8 @@ static int const kKbpsMultiplier = 1000;
_hasReceivedSdp = NO;
_messageQueue = [NSMutableArray array];
_localVideoTrack = nil;
+ _bitrateAllocationStrategy = nil;
+
#if defined(WEBRTC_IOS)
[_factory stopAecDump];
[_peerConnection stopRtcEventLog];
@@ -532,8 +536,15 @@ static int const kKbpsMultiplier = 1000;
_peerConnection = [_factory peerConnectionWithConfiguration:config
constraints:constraints
delegate:self];
+
+ // Create bitrate allocation strategy
+ _bitrateAllocationStrategy = [ARDBitrateAllocationStrategy new];
+ [_bitrateAllocationStrategy setAudioPriorityStrategy:_peerConnection
+ audioTrackId:kARDAudioTrackId];
+
// Create AV senders.
[self createMediaSenders];
+
if (_isInitiator) {
// Send offer.
__weak ARDAppClient *weakSelf = self;
@@ -687,7 +698,7 @@ static int const kKbpsMultiplier = 1000;
RTCMediaStream *stream = [_factory mediaStreamWithStreamId:kARDMediaStreamId];
[stream addAudioTrack:track];
_localVideoTrack = [self createLocalVideoTrack];
- if(_localVideoTrack) {
+ if (_localVideoTrack) {
[stream addVideoTrack:_localVideoTrack];
}
[_peerConnection addStream:stream];
« no previous file with comments | « webrtc/examples/BUILD.gn ('k') | webrtc/examples/objc/AppRTCMobile/ARDBitrateAllocationStrategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698