OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 LoadClass(jni, "java/nio/ByteBuffer"); | 65 LoadClass(jni, "java/nio/ByteBuffer"); |
66 LoadClass(jni, "java/util/ArrayList"); | 66 LoadClass(jni, "java/util/ArrayList"); |
67 LoadClass(jni, "org/webrtc/AudioTrack"); | 67 LoadClass(jni, "org/webrtc/AudioTrack"); |
68 LoadClass(jni, "org/webrtc/DataChannel"); | 68 LoadClass(jni, "org/webrtc/DataChannel"); |
69 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); | 69 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); |
70 LoadClass(jni, "org/webrtc/DataChannel$Init"); | 70 LoadClass(jni, "org/webrtc/DataChannel$Init"); |
71 LoadClass(jni, "org/webrtc/DataChannel$State"); | 71 LoadClass(jni, "org/webrtc/DataChannel$State"); |
72 LoadClass(jni, "org/webrtc/IceCandidate"); | 72 LoadClass(jni, "org/webrtc/IceCandidate"); |
73 #if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD) | 73 #if defined(ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD) |
74 LoadClass(jni, "android/graphics/SurfaceTexture"); | 74 LoadClass(jni, "android/graphics/SurfaceTexture"); |
| 75 LoadClass(jni, "javax/microedition/khronos/egl/EGLContext"); |
75 LoadClass(jni, "org/webrtc/CameraEnumerator"); | 76 LoadClass(jni, "org/webrtc/CameraEnumerator"); |
76 LoadClass(jni, "org/webrtc/Camera2Enumerator"); | 77 LoadClass(jni, "org/webrtc/Camera2Enumerator"); |
77 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); | 78 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); |
78 LoadClass(jni, "org/webrtc/VideoCapturerAndroid"); | 79 LoadClass(jni, "org/webrtc/VideoCapturerAndroid"); |
79 LoadClass(jni, "org/webrtc/VideoCapturerAndroid$NativeObserver"); | 80 LoadClass(jni, "org/webrtc/VideoCapturerAndroid$NativeObserver"); |
80 LoadClass(jni, "org/webrtc/EglBase"); | 81 LoadClass(jni, "org/webrtc/EglBase"); |
81 LoadClass(jni, "org/webrtc/NetworkMonitor"); | 82 LoadClass(jni, "org/webrtc/NetworkMonitor"); |
82 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder"); | 83 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder"); |
83 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); | 84 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); |
84 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$VideoCodecType"); | 85 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$VideoCodecType"); |
85 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder"); | 86 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder"); |
86 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedTextureBuffer"); | 87 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedTextureBuffer"); |
87 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedByteBuffer"); | 88 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedByteBuffer"); |
88 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$VideoCodecType"); | 89 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$VideoCodecType"); |
89 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); | 90 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); |
90 jclass j_egl_base_class = GetClass("org/webrtc/EglBase"); | |
91 jmethodID j_is_egl14_supported_method = jni->GetStaticMethodID( | |
92 j_egl_base_class, "isEGL14Supported", "()Z"); | |
93 bool is_egl14_supported = jni->CallStaticBooleanMethod( | |
94 j_egl_base_class, j_is_egl14_supported_method); | |
95 CHECK_EXCEPTION(jni); | |
96 if (is_egl14_supported) { | |
97 LoadClass(jni, "android/opengl/EGLContext"); | |
98 } | |
99 #endif | 91 #endif |
100 LoadClass(jni, "org/webrtc/MediaSource$State"); | 92 LoadClass(jni, "org/webrtc/MediaSource$State"); |
101 LoadClass(jni, "org/webrtc/MediaStream"); | 93 LoadClass(jni, "org/webrtc/MediaStream"); |
102 LoadClass(jni, "org/webrtc/MediaStreamTrack$State"); | 94 LoadClass(jni, "org/webrtc/MediaStreamTrack$State"); |
103 LoadClass(jni, "org/webrtc/PeerConnectionFactory"); | 95 LoadClass(jni, "org/webrtc/PeerConnectionFactory"); |
104 LoadClass(jni, "org/webrtc/PeerConnection$BundlePolicy"); | 96 LoadClass(jni, "org/webrtc/PeerConnection$BundlePolicy"); |
105 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy"); | 97 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy"); |
106 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy"); | 98 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy"); |
107 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState"); | 99 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState"); |
108 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState"); | 100 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState"); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 142 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
151 } | 143 } |
152 | 144 |
153 // Returns a global reference guaranteed to be valid for the lifetime of the | 145 // Returns a global reference guaranteed to be valid for the lifetime of the |
154 // process. | 146 // process. |
155 jclass FindClass(JNIEnv* jni, const char* name) { | 147 jclass FindClass(JNIEnv* jni, const char* name) { |
156 return g_class_reference_holder->GetClass(name); | 148 return g_class_reference_holder->GetClass(name); |
157 } | 149 } |
158 | 150 |
159 } // namespace webrtc_jni | 151 } // namespace webrtc_jni |
OLD | NEW |