Chromium Code Reviews

Side by Side Diff: webrtc/sdk/android/src/jni/classreferenceholder.cc

Issue 2710683009: Added support for changing the volume of AudioTrack as discussed in BUG=webrtc:6533 (Closed)
Patch Set: updated based on feedback from reviewers Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 78 matching lines...)
89 LoadClass(jni, "org/webrtc/RtpReceiver"); 89 LoadClass(jni, "org/webrtc/RtpReceiver");
90 LoadClass(jni, "org/webrtc/RtpSender"); 90 LoadClass(jni, "org/webrtc/RtpSender");
91 LoadClass(jni, "org/webrtc/SessionDescription"); 91 LoadClass(jni, "org/webrtc/SessionDescription");
92 LoadClass(jni, "org/webrtc/SessionDescription$Type"); 92 LoadClass(jni, "org/webrtc/SessionDescription$Type");
93 LoadClass(jni, "org/webrtc/StatsReport"); 93 LoadClass(jni, "org/webrtc/StatsReport");
94 LoadClass(jni, "org/webrtc/StatsReport$Value"); 94 LoadClass(jni, "org/webrtc/StatsReport$Value");
95 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); 95 LoadClass(jni, "org/webrtc/SurfaceTextureHelper");
96 LoadClass(jni, "org/webrtc/VideoCapturer"); 96 LoadClass(jni, "org/webrtc/VideoCapturer");
97 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); 97 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame");
98 LoadClass(jni, "org/webrtc/VideoTrack"); 98 LoadClass(jni, "org/webrtc/VideoTrack");
99 LoadClass(jni, "org/webrtc/AudioSource");
the sun 2017/03/17 20:31:39 alphabetical order, please
99 } 100 }
100 101
101 ClassReferenceHolder::~ClassReferenceHolder() { 102 ClassReferenceHolder::~ClassReferenceHolder() {
102 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!"; 103 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!";
103 } 104 }
104 105
105 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) { 106 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) {
106 for (std::map<std::string, jclass>::const_iterator it = classes_.begin(); 107 for (std::map<std::string, jclass>::const_iterator it = classes_.begin();
107 it != classes_.end(); ++it) { 108 it != classes_.end(); ++it) {
108 jni->DeleteGlobalRef(it->second); 109 jni->DeleteGlobalRef(it->second);
(...skipping 18 matching lines...)
127 RTC_CHECK(inserted) << "Duplicate class name: " << name; 128 RTC_CHECK(inserted) << "Duplicate class name: " << name;
128 } 129 }
129 130
130 // 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
131 // process. 132 // process.
132 jclass FindClass(JNIEnv* jni, const char* name) { 133 jclass FindClass(JNIEnv* jni, const char* name) {
133 return g_class_reference_holder->GetClass(name); 134 return g_class_reference_holder->GetClass(name);
134 } 135 }
135 136
136 } // namespace webrtc_jni 137 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/AudioTrack.java ('k') | webrtc/sdk/android/src/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine