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/sdk/android/src/jni/classreferenceholder.h" | 10 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); | 106 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); |
107 LoadClass(jni, "org/webrtc/VideoCapturer"); | 107 LoadClass(jni, "org/webrtc/VideoCapturer"); |
108 LoadClass(jni, "org/webrtc/VideoCodecStatus"); | 108 LoadClass(jni, "org/webrtc/VideoCodecStatus"); |
109 LoadClass(jni, "org/webrtc/VideoDecoder$Settings"); | 109 LoadClass(jni, "org/webrtc/VideoDecoder$Settings"); |
110 LoadClass(jni, "org/webrtc/VideoDecoderWrapperCallback"); | 110 LoadClass(jni, "org/webrtc/VideoDecoderWrapperCallback"); |
111 LoadClass(jni, "org/webrtc/VideoFrame"); | 111 LoadClass(jni, "org/webrtc/VideoFrame"); |
112 LoadClass(jni, "org/webrtc/VideoFrame$Buffer"); | 112 LoadClass(jni, "org/webrtc/VideoFrame$Buffer"); |
113 LoadClass(jni, "org/webrtc/VideoFrame$I420Buffer"); | 113 LoadClass(jni, "org/webrtc/VideoFrame$I420Buffer"); |
114 LoadClass(jni, "org/webrtc/VideoFrame$TextureBuffer"); | 114 LoadClass(jni, "org/webrtc/VideoFrame$TextureBuffer"); |
115 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); | 115 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); |
| 116 LoadClass(jni, "org/webrtc/VideoSink"); |
116 LoadClass(jni, "org/webrtc/VideoTrack"); | 117 LoadClass(jni, "org/webrtc/VideoTrack"); |
117 LoadClass(jni, "org/webrtc/WrappedNativeI420Buffer"); | 118 LoadClass(jni, "org/webrtc/WrappedNativeI420Buffer"); |
118 } | 119 } |
119 | 120 |
120 ClassReferenceHolder::~ClassReferenceHolder() { | 121 ClassReferenceHolder::~ClassReferenceHolder() { |
121 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!"; | 122 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!"; |
122 } | 123 } |
123 | 124 |
124 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) { | 125 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) { |
125 for (std::map<std::string, jclass>::const_iterator it = classes_.begin(); | 126 for (std::map<std::string, jclass>::const_iterator it = classes_.begin(); |
(...skipping 20 matching lines...) Expand all Loading... |
146 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 147 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
147 } | 148 } |
148 | 149 |
149 // Returns a global reference guaranteed to be valid for the lifetime of the | 150 // Returns a global reference guaranteed to be valid for the lifetime of the |
150 // process. | 151 // process. |
151 jclass FindClass(JNIEnv* jni, const char* name) { | 152 jclass FindClass(JNIEnv* jni, const char* name) { |
152 return g_class_reference_holder->GetClass(name); | 153 return g_class_reference_holder->GetClass(name); |
153 } | 154 } |
154 | 155 |
155 } // namespace webrtc_jni | 156 } // namespace webrtc_jni |
OLD | NEW |