| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 } | 844 } |
| 845 | 845 |
| 846 JOW(void, DataChannel_close)(JNIEnv* jni, jobject j_dc) { | 846 JOW(void, DataChannel_close)(JNIEnv* jni, jobject j_dc) { |
| 847 ExtractNativeDC(jni, j_dc)->Close(); | 847 ExtractNativeDC(jni, j_dc)->Close(); |
| 848 } | 848 } |
| 849 | 849 |
| 850 JOW(jboolean, DataChannel_sendNative)(JNIEnv* jni, jobject j_dc, | 850 JOW(jboolean, DataChannel_sendNative)(JNIEnv* jni, jobject j_dc, |
| 851 jbyteArray data, jboolean binary) { | 851 jbyteArray data, jboolean binary) { |
| 852 jbyte* bytes = jni->GetByteArrayElements(data, NULL); | 852 jbyte* bytes = jni->GetByteArrayElements(data, NULL); |
| 853 bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer( | 853 bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer( |
| 854 rtc::Buffer(bytes, jni->GetArrayLength(data)), | 854 rtc::CopyOnWriteBuffer(bytes, jni->GetArrayLength(data)), |
| 855 binary)); | 855 binary)); |
| 856 jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); | 856 jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); |
| 857 return ret; | 857 return ret; |
| 858 } | 858 } |
| 859 | 859 |
| 860 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { | 860 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { |
| 861 CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); | 861 CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); |
| 862 } | 862 } |
| 863 | 863 |
| 864 JOW(void, Logging_nativeEnableTracing)( | 864 JOW(void, Logging_nativeEnableTracing)( |
| (...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 return JavaStringFromStdString( | 2038 return JavaStringFromStdString( |
| 2039 jni, | 2039 jni, |
| 2040 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2040 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
| 2041 } | 2041 } |
| 2042 | 2042 |
| 2043 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2043 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
| 2044 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2044 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
| 2045 } | 2045 } |
| 2046 | 2046 |
| 2047 } // namespace webrtc_jni | 2047 } // namespace webrtc_jni |
| OLD | NEW |