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

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

Issue 2944643002: Support building WebRTC without audio and video for IOS (Closed)
Patch Set: Reponse to comments. Created 3 years, 6 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/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm
new file mode 100644
index 0000000000000000000000000000000000000000..de02fc507afe2c5224886242d5f984d2dcf4b619
--- /dev/null
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection+Media.mm
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2015 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "RTCMediaStream+Private.h"
+#import "RTCPeerConnection+Private.h"
+
+namespace webrtc {
+
tkchin_webrtc 2017/06/20 21:51:23 why does this need to be in its own file? this fi
+void PeerConnectionDelegateAdapter::OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) {
+#if defined(HAVE_RTC_AUDIO) || defined(HAVE_RTC_VIDEO)
+ RTCMediaStream* mediaStream = [[RTCMediaStream alloc] initWithNativeMediaStream:stream];
+ RTCPeerConnection* peer_connection = peer_connection_;
+ [peer_connection.delegate peerConnection:peer_connection didAddStream:mediaStream];
+#endif
+}
+
+void PeerConnectionDelegateAdapter::OnRemoveStream(
+ rtc::scoped_refptr<MediaStreamInterface> stream) {
+#if defined(HAVE_RTC_AUDIO) || defined(HAVE_RTC_VIDEO)
+ RTCMediaStream* mediaStream = [[RTCMediaStream alloc] initWithNativeMediaStream:stream];
+ RTCPeerConnection* peer_connection = peer_connection_;
+ [peer_connection.delegate peerConnection:peer_connection didRemoveStream:mediaStream];
+#endif
+}
+
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698