| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 /** Triggered when the ICE connection receiving status changes. */ | 52 /** Triggered when the ICE connection receiving status changes. */ |
| 53 public void onIceConnectionReceivingChange(boolean receiving); | 53 public void onIceConnectionReceivingChange(boolean receiving); |
| 54 | 54 |
| 55 /** Triggered when the IceGatheringState changes. */ | 55 /** Triggered when the IceGatheringState changes. */ |
| 56 public void onIceGatheringChange(IceGatheringState newState); | 56 public void onIceGatheringChange(IceGatheringState newState); |
| 57 | 57 |
| 58 /** Triggered when a new ICE candidate has been found. */ | 58 /** Triggered when a new ICE candidate has been found. */ |
| 59 public void onIceCandidate(IceCandidate candidate); | 59 public void onIceCandidate(IceCandidate candidate); |
| 60 | 60 |
| 61 /** Triggered when some ICE candidates have been removed. */ |
| 62 public void onIceCandidatesRemoved(IceCandidate[] candidates); |
| 63 |
| 61 /** Triggered when media is received on a new stream from remote peer. */ | 64 /** Triggered when media is received on a new stream from remote peer. */ |
| 62 public void onAddStream(MediaStream stream); | 65 public void onAddStream(MediaStream stream); |
| 63 | 66 |
| 64 /** Triggered when a remote peer close a stream. */ | 67 /** Triggered when a remote peer close a stream. */ |
| 65 public void onRemoveStream(MediaStream stream); | 68 public void onRemoveStream(MediaStream stream); |
| 66 | 69 |
| 67 /** Triggered when a remote peer opens a DataChannel. */ | 70 /** Triggered when a remote peer opens a DataChannel. */ |
| 68 public void onDataChannel(DataChannel dataChannel); | 71 public void onDataChannel(DataChannel dataChannel); |
| 69 | 72 |
| 70 /** Triggered when renegotiation is necessary. */ | 73 /** Triggered when renegotiation is necessary. */ |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 public native void setRemoteDescription( | 189 public native void setRemoteDescription( |
| 187 SdpObserver observer, SessionDescription sdp); | 190 SdpObserver observer, SessionDescription sdp); |
| 188 | 191 |
| 189 public native boolean setConfiguration(RTCConfiguration config); | 192 public native boolean setConfiguration(RTCConfiguration config); |
| 190 | 193 |
| 191 public boolean addIceCandidate(IceCandidate candidate) { | 194 public boolean addIceCandidate(IceCandidate candidate) { |
| 192 return nativeAddIceCandidate( | 195 return nativeAddIceCandidate( |
| 193 candidate.sdpMid, candidate.sdpMLineIndex, candidate.sdp); | 196 candidate.sdpMid, candidate.sdpMLineIndex, candidate.sdp); |
| 194 } | 197 } |
| 195 | 198 |
| 199 public boolean removeIceCandidates(final IceCandidate[] candidates) { |
| 200 return nativeRemoveIceCandidates(candidates); |
| 201 } |
| 202 |
| 196 public boolean addStream(MediaStream stream) { | 203 public boolean addStream(MediaStream stream) { |
| 197 boolean ret = nativeAddLocalStream(stream.nativeStream); | 204 boolean ret = nativeAddLocalStream(stream.nativeStream); |
| 198 if (!ret) { | 205 if (!ret) { |
| 199 return false; | 206 return false; |
| 200 } | 207 } |
| 201 localStreams.add(stream); | 208 localStreams.add(stream); |
| 202 return true; | 209 return true; |
| 203 } | 210 } |
| 204 | 211 |
| 205 public void removeStream(MediaStream stream) { | 212 public void removeStream(MediaStream stream) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 freeObserver(nativeObserver); | 273 freeObserver(nativeObserver); |
| 267 } | 274 } |
| 268 | 275 |
| 269 private static native void freePeerConnection(long nativePeerConnection); | 276 private static native void freePeerConnection(long nativePeerConnection); |
| 270 | 277 |
| 271 private static native void freeObserver(long nativeObserver); | 278 private static native void freeObserver(long nativeObserver); |
| 272 | 279 |
| 273 private native boolean nativeAddIceCandidate( | 280 private native boolean nativeAddIceCandidate( |
| 274 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); | 281 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); |
| 275 | 282 |
| 283 private native boolean nativeRemoveIceCandidates(final IceCandidate[] candidat
es); |
| 284 |
| 276 private native boolean nativeAddLocalStream(long nativeStream); | 285 private native boolean nativeAddLocalStream(long nativeStream); |
| 277 | 286 |
| 278 private native void nativeRemoveLocalStream(long nativeStream); | 287 private native void nativeRemoveLocalStream(long nativeStream); |
| 279 | 288 |
| 280 private native boolean nativeGetStats( | 289 private native boolean nativeGetStats( |
| 281 StatsObserver observer, long nativeTrack); | 290 StatsObserver observer, long nativeTrack); |
| 282 | 291 |
| 283 private native RtpSender nativeCreateSender(String kind, String stream_id); | 292 private native RtpSender nativeCreateSender(String kind, String stream_id); |
| 284 | 293 |
| 285 private native List<RtpSender> nativeGetSenders(); | 294 private native List<RtpSender> nativeGetSenders(); |
| 286 | 295 |
| 287 private native List<RtpReceiver> nativeGetReceivers(); | 296 private native List<RtpReceiver> nativeGetReceivers(); |
| 288 } | 297 } |
| OLD | NEW |