Chromium Code Reviews| 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: |