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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 jlong j_p = GetLongField(jni, j_pc, native_pc_id); | 55 jlong j_p = GetLongField(jni, j_pc, native_pc_id); |
56 return rtc::scoped_refptr<webrtc::PeerConnectionInterface>( | 56 return rtc::scoped_refptr<webrtc::PeerConnectionInterface>( |
57 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)); | 57 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)); |
58 } | 58 } |
59 | 59 |
60 JNI_FUNCTION_DECLARATION(void, | 60 JNI_FUNCTION_DECLARATION(void, |
61 PeerConnection_freePeerConnection, | 61 PeerConnection_freePeerConnection, |
62 JNIEnv*, | 62 JNIEnv*, |
63 jclass, | 63 jclass, |
64 jlong j_p) { | 64 jlong j_p) { |
65 CHECK_RELEASE(reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)); | 65 reinterpret_cast<webrtc::PeerConnectionInterface*>(j_p)->Release(); |
66 } | 66 } |
67 | 67 |
68 JNI_FUNCTION_DECLARATION(void, | 68 JNI_FUNCTION_DECLARATION(void, |
69 PeerConnection_freeObserver, | 69 PeerConnection_freeObserver, |
70 JNIEnv*, | 70 JNIEnv*, |
71 jclass, | 71 jclass, |
72 jlong j_p) { | 72 jlong j_p) { |
73 PeerConnectionObserverJni* p = | 73 PeerConnectionObserverJni* p = |
74 reinterpret_cast<PeerConnectionObserverJni*>(j_p); | 74 reinterpret_cast<PeerConnectionObserverJni*>(j_p); |
75 delete p; | 75 delete p; |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 425 |
426 JNI_FUNCTION_DECLARATION(void, | 426 JNI_FUNCTION_DECLARATION(void, |
427 PeerConnection_close, | 427 PeerConnection_close, |
428 JNIEnv* jni, | 428 JNIEnv* jni, |
429 jobject j_pc) { | 429 jobject j_pc) { |
430 ExtractNativePC(jni, j_pc)->Close(); | 430 ExtractNativePC(jni, j_pc)->Close(); |
431 return; | 431 return; |
432 } | 432 } |
433 | 433 |
434 } // namespace webrtc_jni | 434 } // namespace webrtc_jni |
OLD | NEW |