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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm

Issue 2603653002: Merge RTCConfiguration with RTCMediaConstraints in Java/Obj-C wrappers. (Closed)
Patch Set: . Created 4 years 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/sdk/android/src/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
index b4a873847de5bda226a1c72d23a48b7eff97f1bb..de7608c3b9941dd1acffc6b8e8dc0d5c52211379 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
@@ -207,6 +207,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
NSMutableArray<RTCMediaStream *> *_localStreams;
std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
+ std::unique_ptr<webrtc::MediaConstraints> _nativeConstraints;
tkchin_webrtc 2017/01/09 21:56:36 Is this safe? Does peerconnection take ownership o
Taylor Brandstetter 2017/01/09 22:03:45 Yes, it's safe, and n,o nothing else takes ownersh
tkchin_webrtc 2017/01/09 22:35:30 Ah, so it is. Thanks.
BOOL _hasStartedRtcEventLog;
}
@@ -224,11 +225,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
}
if (self = [super init]) {
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
- std::unique_ptr<webrtc::MediaConstraints> nativeConstraints =
- constraints.nativeConstraints;
+ _nativeConstraints = constraints.nativeConstraints;
+ CopyConstraintsIntoRtcConfiguration(_nativeConstraints.get(),
+ config.get());
_peerConnection =
factory.nativeFactory->CreatePeerConnection(*config,
- nativeConstraints.get(),
nullptr,
nullptr,
_observer.get());
@@ -282,6 +283,8 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
if (!config) {
return NO;
}
+ CopyConstraintsIntoRtcConfiguration(_nativeConstraints.get(),
+ config.get());
return _peerConnection->SetConfiguration(*config);
}
« no previous file with comments | « webrtc/sdk/android/src/jni/peerconnection_jni.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698