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

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

Issue 1917193008: Adding getParameters/setParameters APIs to RtpReceiver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: objc compile errors Created 4 years, 7 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 | « webrtc/sdk/BUILD.gn ('k') | webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver.mm » ('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
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 "RTCMediaConstraints+Private.h" 17 #import "RTCMediaConstraints+Private.h"
18 #import "RTCMediaStream+Private.h" 18 #import "RTCMediaStream+Private.h"
19 #import "RTCPeerConnectionFactory+Private.h" 19 #import "RTCPeerConnectionFactory+Private.h"
20 #import "RTCRtpReceiver+Private.h"
20 #import "RTCRtpSender+Private.h" 21 #import "RTCRtpSender+Private.h"
21 #import "RTCSessionDescription+Private.h" 22 #import "RTCSessionDescription+Private.h"
22 #import "RTCStatsReport+Private.h" 23 #import "RTCStatsReport+Private.h"
23 #import "WebRTC/RTCLogging.h" 24 #import "WebRTC/RTCLogging.h"
24 25
25 #include <memory> 26 #include <memory>
26 27
27 #include "webrtc/base/checks.h" 28 #include "webrtc/base/checks.h"
28 29
29 NSString * const kRTCPeerConnectionErrorDomain = 30 NSString * const kRTCPeerConnectionErrorDomain =
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 _peerConnection->GetSenders()); 336 _peerConnection->GetSenders());
336 NSMutableArray *senders = [[NSMutableArray alloc] init]; 337 NSMutableArray *senders = [[NSMutableArray alloc] init];
337 for (const auto &nativeSender : nativeSenders) { 338 for (const auto &nativeSender : nativeSenders) {
338 RTCRtpSender *sender = 339 RTCRtpSender *sender =
339 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender]; 340 [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender];
340 [senders addObject:sender]; 341 [senders addObject:sender];
341 } 342 }
342 return senders; 343 return senders;
343 } 344 }
344 345
346 - (NSArray<RTCRtpReceiver *> *)receivers {
347 std::vector<rtc::scoped_refptr<webrtc::RtpReceiverInterface>> nativeReceivers(
348 _peerConnection->GetReceivers());
349 NSMutableArray *receivers = [[NSMutableArray alloc] init];
350 for (const auto &nativeReceiver : nativeReceivers) {
351 RTCRtpReceiver *receiver =
352 [[RTCRtpReceiver alloc] initWithNativeRtpReceiver:nativeReceiver];
353 [receivers addObject:receiver];
354 }
355 return receivers;
356 }
357
345 #pragma mark - Private 358 #pragma mark - Private
346 359
347 + (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState: 360 + (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
348 (RTCSignalingState)state { 361 (RTCSignalingState)state {
349 switch (state) { 362 switch (state) {
350 case RTCSignalingStateStable: 363 case RTCSignalingStateStable:
351 return webrtc::PeerConnectionInterface::kStable; 364 return webrtc::PeerConnectionInterface::kStable;
352 case RTCSignalingStateHaveLocalOffer: 365 case RTCSignalingStateHaveLocalOffer:
353 return webrtc::PeerConnectionInterface::kHaveLocalOffer; 366 return webrtc::PeerConnectionInterface::kHaveLocalOffer;
354 case RTCSignalingStateHaveLocalPrAnswer: 367 case RTCSignalingStateHaveLocalPrAnswer:
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 case RTCStatsOutputLevelDebug: 518 case RTCStatsOutputLevelDebug:
506 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug; 519 return webrtc::PeerConnectionInterface::kStatsOutputLevelDebug;
507 } 520 }
508 } 521 }
509 522
510 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection { 523 - (rtc::scoped_refptr<webrtc::PeerConnectionInterface>)nativePeerConnection {
511 return _peerConnection; 524 return _peerConnection;
512 } 525 }
513 526
514 @end 527 @end
OLDNEW
« no previous file with comments | « webrtc/sdk/BUILD.gn ('k') | webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698