| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 #include "webrtc/api/java/jni/classreferenceholder.h" | 10 #include "webrtc/api/java/jni/classreferenceholder.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 void FreeGlobalClassReferenceHolder() { | 40 void FreeGlobalClassReferenceHolder() { |
| 41 g_class_reference_holder->FreeReferences(AttachCurrentThreadIfNeeded()); | 41 g_class_reference_holder->FreeReferences(AttachCurrentThreadIfNeeded()); |
| 42 delete g_class_reference_holder; | 42 delete g_class_reference_holder; |
| 43 g_class_reference_holder = nullptr; | 43 g_class_reference_holder = nullptr; |
| 44 } | 44 } |
| 45 | 45 |
| 46 ClassReferenceHolder::ClassReferenceHolder(JNIEnv* jni) { | 46 ClassReferenceHolder::ClassReferenceHolder(JNIEnv* jni) { |
| 47 LoadClass(jni, "android/graphics/SurfaceTexture"); | 47 LoadClass(jni, "android/graphics/SurfaceTexture"); |
| 48 LoadClass(jni, "java/lang/Integer"); |
| 48 LoadClass(jni, "java/nio/ByteBuffer"); | 49 LoadClass(jni, "java/nio/ByteBuffer"); |
| 49 LoadClass(jni, "java/util/ArrayList"); | 50 LoadClass(jni, "java/util/ArrayList"); |
| 50 LoadClass(jni, "org/webrtc/AudioTrack"); | 51 LoadClass(jni, "org/webrtc/AudioTrack"); |
| 51 LoadClass(jni, "org/webrtc/CameraEnumerator"); | 52 LoadClass(jni, "org/webrtc/CameraEnumerator"); |
| 52 LoadClass(jni, "org/webrtc/Camera2Enumerator"); | 53 LoadClass(jni, "org/webrtc/Camera2Enumerator"); |
| 53 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); | 54 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); |
| 54 LoadClass(jni, "org/webrtc/DataChannel"); | 55 LoadClass(jni, "org/webrtc/DataChannel"); |
| 55 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); | 56 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); |
| 56 LoadClass(jni, "org/webrtc/DataChannel$Init"); | 57 LoadClass(jni, "org/webrtc/DataChannel$Init"); |
| 57 LoadClass(jni, "org/webrtc/DataChannel$State"); | 58 LoadClass(jni, "org/webrtc/DataChannel$State"); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 76 LoadClass(jni, "org/webrtc/PeerConnectionFactory"); | 77 LoadClass(jni, "org/webrtc/PeerConnectionFactory"); |
| 77 LoadClass(jni, "org/webrtc/PeerConnection$BundlePolicy"); | 78 LoadClass(jni, "org/webrtc/PeerConnection$BundlePolicy"); |
| 78 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy"); | 79 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy"); |
| 79 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy"); | 80 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy"); |
| 80 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState"); | 81 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState"); |
| 81 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState"); | 82 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState"); |
| 82 LoadClass(jni, "org/webrtc/PeerConnection$IceTransportsType"); | 83 LoadClass(jni, "org/webrtc/PeerConnection$IceTransportsType"); |
| 83 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy"); | 84 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy"); |
| 84 LoadClass(jni, "org/webrtc/PeerConnection$KeyType"); | 85 LoadClass(jni, "org/webrtc/PeerConnection$KeyType"); |
| 85 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState"); | 86 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState"); |
| 87 LoadClass(jni, "org/webrtc/RtpParameters"); |
| 88 LoadClass(jni, "org/webrtc/RtpParameters$RtpEncodingParameters"); |
| 86 LoadClass(jni, "org/webrtc/RtpReceiver"); | 89 LoadClass(jni, "org/webrtc/RtpReceiver"); |
| 87 LoadClass(jni, "org/webrtc/RtpSender"); | 90 LoadClass(jni, "org/webrtc/RtpSender"); |
| 88 LoadClass(jni, "org/webrtc/SessionDescription"); | 91 LoadClass(jni, "org/webrtc/SessionDescription"); |
| 89 LoadClass(jni, "org/webrtc/SessionDescription$Type"); | 92 LoadClass(jni, "org/webrtc/SessionDescription$Type"); |
| 90 LoadClass(jni, "org/webrtc/StatsReport"); | 93 LoadClass(jni, "org/webrtc/StatsReport"); |
| 91 LoadClass(jni, "org/webrtc/StatsReport$Value"); | 94 LoadClass(jni, "org/webrtc/StatsReport$Value"); |
| 92 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); | 95 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); |
| 93 LoadClass(jni, "org/webrtc/VideoCapturer"); | 96 LoadClass(jni, "org/webrtc/VideoCapturer"); |
| 94 LoadClass(jni, "org/webrtc/VideoCapturer$NativeObserver"); | 97 LoadClass(jni, "org/webrtc/VideoCapturer$NativeObserver"); |
| 95 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); | 98 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 125 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 128 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
| 126 } | 129 } |
| 127 | 130 |
| 128 // Returns a global reference guaranteed to be valid for the lifetime of the | 131 // Returns a global reference guaranteed to be valid for the lifetime of the |
| 129 // process. | 132 // process. |
| 130 jclass FindClass(JNIEnv* jni, const char* name) { | 133 jclass FindClass(JNIEnv* jni, const char* name) { |
| 131 return g_class_reference_holder->GetClass(name); | 134 return g_class_reference_holder->GetClass(name); |
| 132 } | 135 } |
| 133 | 136 |
| 134 } // namespace webrtc_jni | 137 } // namespace webrtc_jni |
| OLD | NEW |