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

Unified Diff: webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.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.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
index 311e0dd886e49a37d33ea0d3dbfe30e93868600e..2ea487ba30b8e2d2d7972710218e419225273a7b 100644
--- a/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnection.mm
@@ -125,24 +125,6 @@ void PeerConnectionDelegateAdapter::OnSignalingChange(
didChangeSignalingState:state];
}
-void PeerConnectionDelegateAdapter::OnAddStream(
- rtc::scoped_refptr<MediaStreamInterface> stream) {
- RTCMediaStream *mediaStream =
- [[RTCMediaStream alloc] initWithNativeMediaStream:stream];
- RTCPeerConnection *peer_connection = peer_connection_;
- [peer_connection.delegate peerConnection:peer_connection
- didAddStream:mediaStream];
-}
-
-void PeerConnectionDelegateAdapter::OnRemoveStream(
- rtc::scoped_refptr<MediaStreamInterface> stream) {
- RTCMediaStream *mediaStream =
- [[RTCMediaStream alloc] initWithNativeMediaStream:stream];
- RTCPeerConnection *peer_connection = peer_connection_;
- [peer_connection.delegate peerConnection:peer_connection
- didRemoveStream:mediaStream];
-}
-
void PeerConnectionDelegateAdapter::OnDataChannel(
rtc::scoped_refptr<DataChannelInterface> data_channel) {
RTCDataChannel *dataChannel =
@@ -400,9 +382,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
std::string nativeStreamId = [NSString stdStringForString:streamId];
rtc::scoped_refptr<webrtc::RtpSenderInterface> nativeSender(
_peerConnection->CreateSender(nativeKind, nativeStreamId));
- return nativeSender ?
- [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender]
- : nil;
+ return nativeSender ? [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender] : nil;
}
- (NSArray<RTCRtpSender *> *)senders {
@@ -410,8 +390,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
_peerConnection->GetSenders());
NSMutableArray *senders = [[NSMutableArray alloc] init];
for (const auto &nativeSender : nativeSenders) {
- RTCRtpSender *sender =
- [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender];
+ RTCRtpSender *sender = [[RTCRtpSender alloc] initWithNativeRtpSender:nativeSender];
[senders addObject:sender];
}
return senders;
@@ -422,8 +401,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidatesRemoved(
_peerConnection->GetReceivers());
NSMutableArray *receivers = [[NSMutableArray alloc] init];
for (const auto &nativeReceiver : nativeReceivers) {
- RTCRtpReceiver *receiver =
- [[RTCRtpReceiver alloc] initWithNativeRtpReceiver:nativeReceiver];
+ RTCRtpReceiver *receiver = [[RTCRtpReceiver alloc] initWithNativeRtpReceiver:nativeReceiver];
[receivers addObject:receiver];
}
return receivers;

Powered by Google App Engine
This is Rietveld 408576698