OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #import "RTCMediaStream+Private.h" |
| 12 #import "RTCPeerConnection+Private.h" |
| 13 |
| 14 namespace webrtc { |
| 15 |
| 16 void PeerConnectionDelegateAdapter::OnAddStream(rtc::scoped_refptr<MediaStreamIn
terface> stream) { |
| 17 #if defined(HAVE_RTC_AUDIO) || defined(HAVE_RTC_VIDEO) |
| 18 RTCMediaStream* mediaStream = [[RTCMediaStream alloc] initWithNativeMediaStrea
m:stream]; |
| 19 RTCPeerConnection* peer_connection = peer_connection_; |
| 20 [peer_connection.delegate peerConnection:peer_connection didAddStream:mediaStr
eam]; |
| 21 #endif |
| 22 } |
| 23 |
| 24 void PeerConnectionDelegateAdapter::OnRemoveStream( |
| 25 rtc::scoped_refptr<MediaStreamInterface> stream) { |
| 26 #if defined(HAVE_RTC_AUDIO) || defined(HAVE_RTC_VIDEO) |
| 27 RTCMediaStream* mediaStream = [[RTCMediaStream alloc] initWithNativeMediaStrea
m:stream]; |
| 28 RTCPeerConnection* peer_connection = peer_connection_; |
| 29 [peer_connection.delegate peerConnection:peer_connection didRemoveStream:media
Stream]; |
| 30 #endif |
| 31 } |
| 32 |
| 33 } // namespace webrtc |
OLD | NEW |