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 |