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

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

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 side-by-side diff with in-line comments
Download patch
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..2b6ccad8e15c8d80ec9fd82e1dcc25baf94995af 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"
@@ -532,8 +533,14 @@ static int const kKbpsMultiplier = 1000;
_peerConnection = [_factory peerConnectionWithConfiguration:config
constraints:constraints
delegate:self];
+
+ // Create bitrate allocation strategy
+ [ARDBitrateAllocationStrategy setAudioPriorityStrategy:_peerConnection
+ audioTrackId:kARDAudioTrackId];
+
// Create AV senders.
[self createMediaSenders];
+
if (_isInitiator) {
// Send offer.
__weak ARDAppClient *weakSelf = self;
@@ -687,7 +694,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];

Powered by Google App Engine
This is Rietveld 408576698