 Chromium Code Reviews
 Chromium Code Reviews Issue 2513063003:
  Add the OnAddTrack callback for Objective-C wrapper.
    
  
    Issue 2513063003:
  Add the OnAddTrack callback for Objective-C wrapper. 
  | OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 
| 3 * | 3 * | 
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found | 
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may | 
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. | 
| 9 */ | 9 */ | 
| 10 | 10 | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 didGenerateIceCandidate:(RTCIceCandidate *)candidate; | 99 didGenerateIceCandidate:(RTCIceCandidate *)candidate; | 
| 100 | 100 | 
| 101 /** Called when a group of local Ice candidates have been removed. */ | 101 /** Called when a group of local Ice candidates have been removed. */ | 
| 102 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 102 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 
| 103 didRemoveIceCandidates:(NSArray<RTCIceCandidate *> *)candidates; | 103 didRemoveIceCandidates:(NSArray<RTCIceCandidate *> *)candidates; | 
| 104 | 104 | 
| 105 /** New data channel has been opened. */ | 105 /** New data channel has been opened. */ | 
| 106 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 106 - (void)peerConnection:(RTCPeerConnection *)peerConnection | 
| 107 didOpenDataChannel:(RTCDataChannel *)dataChannel; | 107 didOpenDataChannel:(RTCDataChannel *)dataChannel; | 
| 108 | 108 | 
| 109 @optional | |
| 
tkchin_webrtc
2017/02/15 23:43:48
either all these methods should be optional or non
 
Zhi Huang
2017/02/21 04:55:50
I thought there would be at least some warnings if
 | |
| 110 /** Called when a new track is signaled from remote peer. The new track is | |
| 111 * attached to the RtpReceiver. */ | |
| 112 - (void)peerConnection:(RTCPeerConnection *)peerConnection | |
| 113 didAddTrack:(RTCRtpReceiver *)rtpReceiver | |
| 114 attachedStreams:(NSArray<RTCMediaStream *> *)mediaStreams; | |
| 115 | |
| 109 @end | 116 @end | 
| 110 | 117 | 
| 111 RTC_EXPORT | 118 RTC_EXPORT | 
| 112 @interface RTCPeerConnection : NSObject | 119 @interface RTCPeerConnection : NSObject | 
| 113 | 120 | 
| 114 /** The object that will be notifed about events such as state changes and | 121 /** The object that will be notifed about events such as state changes and | 
| 115 * streams being added or removed. | 122 * streams being added or removed. | 
| 116 */ | 123 */ | 
| 117 @property(nonatomic, weak, nullable) id<RTCPeerConnectionDelegate> delegate; | 124 @property(nonatomic, weak, nullable) id<RTCPeerConnectionDelegate> delegate; | 
| 118 @property(nonatomic, readonly) NSArray<RTCMediaStream *> *localStreams; | 125 @property(nonatomic, readonly) NSArray<RTCMediaStream *> *localStreams; | 
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 */ | 222 */ | 
| 216 - (void)statsForTrack: | 223 - (void)statsForTrack: | 
| 217 (nullable RTCMediaStreamTrack *)mediaStreamTrack | 224 (nullable RTCMediaStreamTrack *)mediaStreamTrack | 
| 218 statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel | 225 statsOutputLevel:(RTCStatsOutputLevel)statsOutputLevel | 
| 219 completionHandler: | 226 completionHandler: | 
| 220 (nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler ; | 227 (nullable void (^)(NSArray<RTCLegacyStatsReport *> *stats))completionHandler ; | 
| 221 | 228 | 
| 222 @end | 229 @end | 
| 223 | 230 | 
| 224 NS_ASSUME_NONNULL_END | 231 NS_ASSUME_NONNULL_END | 
| OLD | NEW |