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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 } | 398 } |
399 localStreams.clear(); | 399 localStreams.clear(); |
400 for (RtpSender sender : senders) { | 400 for (RtpSender sender : senders) { |
401 sender.dispose(); | 401 sender.dispose(); |
402 } | 402 } |
403 senders.clear(); | 403 senders.clear(); |
404 for (RtpReceiver receiver : receivers) { | 404 for (RtpReceiver receiver : receivers) { |
405 receiver.dispose(); | 405 receiver.dispose(); |
406 } | 406 } |
407 receivers.clear(); | 407 receivers.clear(); |
408 freePeerConnection(nativePeerConnection); | 408 JniCommon.nativeReleaseRef(nativePeerConnection); |
409 freeObserver(nativeObserver); | 409 freeObserver(nativeObserver); |
410 } | 410 } |
411 | 411 |
412 private static native void freePeerConnection(long nativePeerConnection); | |
413 | |
414 private static native void freeObserver(long nativeObserver); | 412 private static native void freeObserver(long nativeObserver); |
415 | 413 |
416 public native boolean nativeSetConfiguration(RTCConfiguration config, long nat
iveObserver); | 414 public native boolean nativeSetConfiguration(RTCConfiguration config, long nat
iveObserver); |
417 | 415 |
418 private native boolean nativeAddIceCandidate( | 416 private native boolean nativeAddIceCandidate( |
419 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); | 417 String sdpMid, int sdpMLineIndex, String iceCandidateSdp); |
420 | 418 |
421 private native boolean nativeRemoveIceCandidates(final IceCandidate[] candidat
es); | 419 private native boolean nativeRemoveIceCandidates(final IceCandidate[] candidat
es); |
422 | 420 |
423 private native boolean nativeAddLocalStream(long nativeStream); | 421 private native boolean nativeAddLocalStream(long nativeStream); |
424 | 422 |
425 private native void nativeRemoveLocalStream(long nativeStream); | 423 private native void nativeRemoveLocalStream(long nativeStream); |
426 | 424 |
427 private native boolean nativeOldGetStats(StatsObserver observer, long nativeTr
ack); | 425 private native boolean nativeOldGetStats(StatsObserver observer, long nativeTr
ack); |
428 | 426 |
429 private native void nativeNewGetStats(RTCStatsCollectorCallback callback); | 427 private native void nativeNewGetStats(RTCStatsCollectorCallback callback); |
430 | 428 |
431 private native RtpSender nativeCreateSender(String kind, String stream_id); | 429 private native RtpSender nativeCreateSender(String kind, String stream_id); |
432 | 430 |
433 private native List<RtpSender> nativeGetSenders(); | 431 private native List<RtpSender> nativeGetSenders(); |
434 | 432 |
435 private native List<RtpReceiver> nativeGetReceivers(); | 433 private native List<RtpReceiver> nativeGetReceivers(); |
436 | 434 |
437 private native boolean nativeStartRtcEventLog(int file_descriptor, int max_siz
e_bytes); | 435 private native boolean nativeStartRtcEventLog(int file_descriptor, int max_siz
e_bytes); |
438 | 436 |
439 private native void nativeStopRtcEventLog(); | 437 private native void nativeStopRtcEventLog(); |
440 } | 438 } |
OLD | NEW |