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

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

Issue 1696673003: Tweaks for new Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Don't use object subscripting Created 4 years, 10 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/RTCSessionDescription.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 f75d6636fa8b81e87d431f8bab01c022d9bc493e..35ac07aeb78582e7f27102429ca690334b153533 100644
--- a/webrtc/api/objc/RTCPeerConnection.mm
+++ b/webrtc/api/objc/RTCPeerConnection.mm
@@ -199,11 +199,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
webrtc::PeerConnectionInterface::RTCConfiguration config =
configuration.nativeConfiguration;
- webrtc::MediaConstraints *nativeConstraints =
- constraints.nativeConstraints.get();
+ rtc::scoped_ptr<webrtc::MediaConstraints> nativeConstraints =
+ constraints.nativeConstraints;
_peerConnection =
factory.nativeFactory->CreatePeerConnection(config,
- nativeConstraints,
+ nativeConstraints.get(),
nullptr,
nullptr,
_observer.get());
@@ -259,7 +259,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
}
- (void)addStream:(RTCMediaStream *)stream {
- if (_peerConnection->AddStream(stream.nativeMediaStream)) {
+ if (!_peerConnection->AddStream(stream.nativeMediaStream)) {
RTCLogError(@"Failed to add stream: %@", stream);
return;
}
« no previous file with comments | « webrtc/api/objc/RTCPeerConnection.h ('k') | webrtc/api/objc/RTCSessionDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698