| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 LoadClass(jni, "org/webrtc/CameraEnumerator"); | 74 LoadClass(jni, "org/webrtc/CameraEnumerator"); |
| 75 LoadClass(jni, "org/webrtc/Camera2Enumerator"); | 75 LoadClass(jni, "org/webrtc/Camera2Enumerator"); |
| 76 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); | 76 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); |
| 77 LoadClass(jni, "org/webrtc/VideoCapturerAndroid"); | 77 LoadClass(jni, "org/webrtc/VideoCapturerAndroid"); |
| 78 LoadClass(jni, "org/webrtc/VideoCapturerAndroid$NativeObserver"); | 78 LoadClass(jni, "org/webrtc/VideoCapturerAndroid$NativeObserver"); |
| 79 LoadClass(jni, "org/webrtc/EglBase"); | 79 LoadClass(jni, "org/webrtc/EglBase"); |
| 80 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder"); | 80 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder"); |
| 81 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); | 81 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); |
| 82 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$VideoCodecType"); | 82 LoadClass(jni, "org/webrtc/MediaCodecVideoEncoder$VideoCodecType"); |
| 83 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder"); | 83 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder"); |
| 84 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecoderOutputBufferInfo"); | 84 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedTextureBuffer"); |
| 85 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$DecodedByteBuffer"); |
| 85 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$VideoCodecType"); | 86 LoadClass(jni, "org/webrtc/MediaCodecVideoDecoder$VideoCodecType"); |
| 86 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); | 87 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); |
| 87 jclass j_egl_base_class = GetClass("org/webrtc/EglBase"); | 88 jclass j_egl_base_class = GetClass("org/webrtc/EglBase"); |
| 88 jmethodID j_is_egl14_supported_method = jni->GetStaticMethodID( | 89 jmethodID j_is_egl14_supported_method = jni->GetStaticMethodID( |
| 89 j_egl_base_class, "isEGL14Supported", "()Z"); | 90 j_egl_base_class, "isEGL14Supported", "()Z"); |
| 90 bool is_egl14_supported = jni->CallStaticBooleanMethod( | 91 bool is_egl14_supported = jni->CallStaticBooleanMethod( |
| 91 j_egl_base_class, j_is_egl14_supported_method); | 92 j_egl_base_class, j_is_egl14_supported_method); |
| 92 CHECK_EXCEPTION(jni); | 93 CHECK_EXCEPTION(jni); |
| 93 if (is_egl14_supported) { | 94 if (is_egl14_supported) { |
| 94 LoadClass(jni, "android/opengl/EGLContext"); | 95 LoadClass(jni, "android/opengl/EGLContext"); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 145 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
| 145 } | 146 } |
| 146 | 147 |
| 147 // Returns a global reference guaranteed to be valid for the lifetime of the | 148 // Returns a global reference guaranteed to be valid for the lifetime of the |
| 148 // process. | 149 // process. |
| 149 jclass FindClass(JNIEnv* jni, const char* name) { | 150 jclass FindClass(JNIEnv* jni, const char* name) { |
| 150 return g_class_reference_holder->GetClass(name); | 151 return g_class_reference_holder->GetClass(name); |
| 151 } | 152 } |
| 152 | 153 |
| 153 } // namespace webrtc_jni | 154 } // namespace webrtc_jni |
| OLD | NEW |