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

Unified Diff: webrtc/api/objc/RTCPeerConnection.mm

Issue 1854393002: Objective C API to read and set RtpParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: CR feedback Created 4 years, 8 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/api/objc/RTCPeerConnection.h ('k') | webrtc/api/objc/RTCRtpEncodingParameters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/objc/RTCPeerConnection.mm
diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm
index 50d05f1bc699b1aceacd76a6d8740ef31f146aa2..657ba57e26a50f58b389c47d14b665580d639793 100644
--- a/webrtc/api/objc/RTCPeerConnection.mm
+++ b/webrtc/api/objc/RTCPeerConnection.mm
@@ -19,6 +19,7 @@
#import "webrtc/api/objc/RTCMediaConstraints+Private.h"
#import "webrtc/api/objc/RTCMediaStream+Private.h"
#import "webrtc/api/objc/RTCPeerConnectionFactory+Private.h"
+#import "webrtc/api/objc/RTCRtpSender+Private.h"
#import "webrtc/api/objc/RTCSessionDescription+Private.h"
#import "webrtc/api/objc/RTCStatsReport+Private.h"
#import "webrtc/base/objc/RTCLogging.h"
@@ -311,6 +312,18 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
_peerConnection->SetRemoteDescription(observer, sdp.nativeDescription);
}
+- (NSArray<RTCRtpSender *> *)senders {
+ std::vector<rtc::scoped_refptr<webrtc::RtpSenderInterface>> nativeSenders(
+ _peerConnection->GetSenders());
+ NSMutableArray *senders = [[NSMutableArray alloc] init];
+ for (const auto &nativeSender : nativeSenders) {
+ RTCRtpSender *sender =
+ [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender];
+ [senders addObject:sender];
+ }
+ return senders;
+}
+
#pragma mark - Private
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
« no previous file with comments | « webrtc/api/objc/RTCPeerConnection.h ('k') | webrtc/api/objc/RTCRtpEncodingParameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698