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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 } | 886 } |
887 | 887 |
888 JOW(void, DataChannel_close)(JNIEnv* jni, jobject j_dc) { | 888 JOW(void, DataChannel_close)(JNIEnv* jni, jobject j_dc) { |
889 ExtractNativeDC(jni, j_dc)->Close(); | 889 ExtractNativeDC(jni, j_dc)->Close(); |
890 } | 890 } |
891 | 891 |
892 JOW(jboolean, DataChannel_sendNative)(JNIEnv* jni, jobject j_dc, | 892 JOW(jboolean, DataChannel_sendNative)(JNIEnv* jni, jobject j_dc, |
893 jbyteArray data, jboolean binary) { | 893 jbyteArray data, jboolean binary) { |
894 jbyte* bytes = jni->GetByteArrayElements(data, NULL); | 894 jbyte* bytes = jni->GetByteArrayElements(data, NULL); |
895 bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer( | 895 bool ret = ExtractNativeDC(jni, j_dc)->Send(DataBuffer( |
896 rtc::Buffer(bytes, jni->GetArrayLength(data)), | 896 rtc::CopyOnWriteBuffer(bytes, jni->GetArrayLength(data)), |
897 binary)); | 897 binary)); |
898 jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); | 898 jni->ReleaseByteArrayElements(data, bytes, JNI_ABORT); |
899 return ret; | 899 return ret; |
900 } | 900 } |
901 | 901 |
902 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { | 902 JOW(void, DataChannel_dispose)(JNIEnv* jni, jobject j_dc) { |
903 CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); | 903 CHECK_RELEASE(ExtractNativeDC(jni, j_dc)); |
904 } | 904 } |
905 | 905 |
906 JOW(void, Logging_nativeEnableTracing)( | 906 JOW(void, Logging_nativeEnableTracing)( |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 return JavaStringFromStdString( | 2104 return JavaStringFromStdString( |
2105 jni, | 2105 jni, |
2106 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2106 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
2107 } | 2107 } |
2108 | 2108 |
2109 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2109 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
2110 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2110 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
2111 } | 2111 } |
2112 | 2112 |
2113 } // namespace webrtc_jni | 2113 } // namespace webrtc_jni |
OLD | NEW |