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 30 matching lines...) Expand all Loading... |
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/nio/ByteBuffer"); | 48 LoadClass(jni, "java/nio/ByteBuffer"); |
49 LoadClass(jni, "java/util/ArrayList"); | 49 LoadClass(jni, "java/util/ArrayList"); |
50 LoadClass(jni, "org/webrtc/AudioTrack"); | 50 LoadClass(jni, "org/webrtc/AudioTrack"); |
51 LoadClass(jni, "org/webrtc/CameraEnumerator"); | 51 LoadClass(jni, "org/webrtc/Camera1Enumerator"); |
52 LoadClass(jni, "org/webrtc/Camera2Enumerator"); | 52 LoadClass(jni, "org/webrtc/Camera2Enumerator"); |
53 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); | 53 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); |
54 LoadClass(jni, "org/webrtc/DataChannel"); | 54 LoadClass(jni, "org/webrtc/DataChannel"); |
55 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); | 55 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); |
56 LoadClass(jni, "org/webrtc/DataChannel$Init"); | 56 LoadClass(jni, "org/webrtc/DataChannel$Init"); |
57 LoadClass(jni, "org/webrtc/DataChannel$State"); | 57 LoadClass(jni, "org/webrtc/DataChannel$State"); |
58 LoadClass(jni, "org/webrtc/EglBase"); | 58 LoadClass(jni, "org/webrtc/EglBase"); |
59 LoadClass(jni, "org/webrtc/EglBase$Context"); | 59 LoadClass(jni, "org/webrtc/EglBase$Context"); |
60 LoadClass(jni, "org/webrtc/EglBase14$Context"); | 60 LoadClass(jni, "org/webrtc/EglBase14$Context"); |
61 LoadClass(jni, "org/webrtc/IceCandidate"); | 61 LoadClass(jni, "org/webrtc/IceCandidate"); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 128 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
129 } | 129 } |
130 | 130 |
131 // 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 |
132 // process. | 132 // process. |
133 jclass FindClass(JNIEnv* jni, const char* name) { | 133 jclass FindClass(JNIEnv* jni, const char* name) { |
134 return g_class_reference_holder->GetClass(name); | 134 return g_class_reference_holder->GetClass(name); |
135 } | 135 } |
136 | 136 |
137 } // namespace webrtc_jni | 137 } // namespace webrtc_jni |
OLD | NEW |