Format the rest of /sdk folder

I already submitted separate CLs for /objc, here I'm
doing the rest of this folder

Formatting done via:

git ls-files | grep -E '^sdk\/.*\.(h|cc|mm)' | grep -Ev '^sdk\/objc.*' | xargs clang-format -i

Bug: webrtc:42225392
Change-Id: Ib2c2bf1d882c4e916a5787c2205818e2e4dcc22d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373902
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43684}
This commit is contained in:
Boris Tsirkin 2025-01-08 05:58:03 -08:00 committed by WebRTC LUCI CQ
parent 6b6ebf3689
commit d4937d3336
9 changed files with 20 additions and 23 deletions

View File

@ -217,16 +217,16 @@ rtc::scoped_refptr<AudioDeviceModule> CreateAndroidAudioDeviceModule(
// Java audio for input and OpenSL ES for output audio (i.e. mixed APIs).
// This combination provides low-latency output audio and at the same
// time support for HW AEC using the AudioRecord Java API.
return CreateJavaInputAndOpenSLESOutputAudioDeviceModule(
env, j_context.obj());
return CreateJavaInputAndOpenSLESOutputAudioDeviceModule(env,
j_context.obj());
#if defined(WEBRTC_AUDIO_DEVICE_INCLUDE_ANDROID_AAUDIO)
case AudioDeviceModule::kAndroidAAudioAudio:
// AAudio based audio for both input and output.
return CreateAAudioAudioDeviceModule(env, j_context.obj());
case AudioDeviceModule::kAndroidJavaInputAndAAudioOutputAudio:
// Java audio for input and AAudio for output audio (i.e. mixed APIs).
return CreateJavaInputAndAAudioOutputAudioDeviceModule(
env, j_context.obj());
return CreateJavaInputAndAAudioOutputAudioDeviceModule(env,
j_context.obj());
#endif
default:
return nullptr;

View File

@ -32,13 +32,11 @@ rtc::scoped_refptr<AudioDeviceModule> CreateOpenSLESAudioDeviceModule(
jobject application_context);
rtc::scoped_refptr<AudioDeviceModule>
CreateJavaInputAndOpenSLESOutputAudioDeviceModule(
JNIEnv* env,
CreateJavaInputAndOpenSLESOutputAudioDeviceModule(JNIEnv* env,
jobject application_context);
rtc::scoped_refptr<AudioDeviceModule>
CreateJavaInputAndAAudioOutputAudioDeviceModule(
JNIEnv* env,
CreateJavaInputAndAAudioOutputAudioDeviceModule(JNIEnv* env,
jobject application_context);
rtc::scoped_refptr<AudioDeviceModule> CreateAndroidAudioDeviceModule(

View File

@ -335,8 +335,7 @@ ScopedJavaLocalRef<jobjectArray> NativeToJavaStringArray(
}
JavaListBuilder::JavaListBuilder(JNIEnv* env)
: env_(env), j_list_(JNI_ArrayList::Java_ArrayList_Constructor(env)) {
}
: env_(env), j_list_(JNI_ArrayList::Java_ArrayList_Constructor(env)) {}
JavaListBuilder::~JavaListBuilder() = default;
@ -346,8 +345,7 @@ void JavaListBuilder::add(const jni_zero::JavaRef<jobject>& element) {
JavaMapBuilder::JavaMapBuilder(JNIEnv* env)
: env_(env),
j_map_(JNI_LinkedHashMap::Java_LinkedHashMap_Constructor(env)) {
}
j_map_(JNI_LinkedHashMap::Java_LinkedHashMap_Constructor(env)) {}
JavaMapBuilder::~JavaMapBuilder() = default;

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef SDK_ANDROID_NATIVE_API_JNI_JNI_INT_WRAPPER_H_
#define SDK_ANDROID_NATIVE_API_JNI_JNI_INT_WRAPPER_H_

View File

@ -424,8 +424,7 @@ void AndroidNetworkMonitor::OnNetworkConnected_n(
if (iter != network_info_by_handle_.end()) {
// Remove old if_name for this handle if they don't match.
if (network_info.interface_name != iter->second.interface_name) {
RTC_LOG(LS_INFO) << "Network"
<< " handle " << network_info.handle
RTC_LOG(LS_INFO) << "Network" << " handle " << network_info.handle
<< " change if_name from: "
<< iter->second.interface_name
<< " to: " << network_info.interface_name;

View File

@ -639,11 +639,13 @@ void GetAudioParameters(JNIEnv* env,
RTC_CHECK(output_parameters->is_valid());
}
bool IsLowLatencyInputSupported(JNIEnv* env, const JavaRef<jobject>& j_context) {
bool IsLowLatencyInputSupported(JNIEnv* env,
const JavaRef<jobject>& j_context) {
return Java_WebRtcAudioManager_isLowLatencyInputSupported(env, j_context);
}
bool IsLowLatencyOutputSupported(JNIEnv* env, const JavaRef<jobject>& j_context) {
bool IsLowLatencyOutputSupported(JNIEnv* env,
const JavaRef<jobject>& j_context) {
return Java_WebRtcAudioManager_isLowLatencyOutputSupported(env, j_context);
}

View File

@ -91,7 +91,8 @@ void GetAudioParameters(JNIEnv* env,
bool IsLowLatencyInputSupported(JNIEnv* env, const JavaRef<jobject>& j_context);
bool IsLowLatencyOutputSupported(JNIEnv* env, const JavaRef<jobject>& j_context);
bool IsLowLatencyOutputSupported(JNIEnv* env,
const JavaRef<jobject>& j_context);
// Glue together an audio input and audio output to get an AudioDeviceModule.
rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceModuleFromInputAndOutput(