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

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: 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
Index: webrtc/api/objc/RTCPeerConnection.mm
diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm
index 50d05f1bc699b1aceacd76a6d8740ef31f146aa2..829131d91f812c1bbb5216a7c3d10463e2663a15 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 {
tkchin_webrtc 2016/04/05 18:48:15 ditto Sender *> *)
skvlad 2016/04/05 23:21:27 Done.
+ std::vector<rtc::scoped_refptr<webrtc::RtpSenderInterface>> nativeSenders(
tkchin_webrtc 2016/04/05 18:48:15 Clearly rusty on c++ -> compiler doesn't barf on >
skvlad 2016/04/05 23:21:27 Since C++ 11 it isn't supposed to, and the Chromiu
+ _peerConnection->GetSenders());
+ NSMutableArray* senders = [[NSMutableArray alloc] init];
tkchin_webrtc 2016/04/05 18:48:15 pointer style: NSMutableArray *senders =
skvlad 2016/04/05 23:21:27 Done.
+ for (auto nativeSender : nativeSenders) {
Taylor Brandstetter 2016/04/05 17:48:03 nit: I think this creates a copy of the scoped_ref
tkchin_webrtc 2016/04/05 18:48:15 Consider adding a category in webrtc/base/objc sim
skvlad 2016/04/05 23:21:27 Is there a way to define a generic NSArray to vect
skvlad 2016/04/05 23:21:27 Done.
+ RTCRtpSender* sender =
+ [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender];
+ [senders addObject:sender];
+ }
+ return senders;
+}
+
#pragma mark - Private
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:

Powered by Google App Engine
This is Rietveld 408576698