Some locations in the WebRTC codebase RTC_LOG the value of the
__FUNCTION__ macro which probably is useful in debug mode. Moving
these instances to RTC_DLOG saves ~10 KiB on arm64.
Bug: webrtc:11986
Change-Id: I5d81cc459d2850657a712b9aed80c187edf49a3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203981
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33086}
Since it is a WebRTC-only macro, let's prefix it with WEBRTC_.
Bug: None
Change-Id: I309666858ea898dc7cd1a68c21be190f98c87b11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/129935
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27327}
Use rtc::scoped_refptr instead of std::unique_ptr to hold the instance
of OpenSLEngineManager; this makes it safe to share it between
OpenSLESRecorder and OpenSLESPlayer.
Bug: webrtc:10436
Change-Id: Ibd0717e5410020c89a40bfdb05953a02378a6a4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128651
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27253}
We may sometimes want to override only input or only output, or
override them with different values. This change allows setting the
overrides separately.
Change-Id: Ib0c44cb7a3cfa834f997fb6cd54f7cad68705f41
Bug: webrtc:10441
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128763
Commit-Queue: Paulina Hensman <phensman@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27236}
This CL removes the use of the @JNINamespace annotation and instead
sets the correct JNI namespace in the build file.
Bug: webrtc:8278
Change-Id: Ia4490399e45a97d56b02c260fd80df4edfa092bf
Reviewed-on: https://webrtc-review.googlesource.com/76440
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23299}
The new ADM code removed some redundancies, which led to a decrease in
log output. This especially affected NS and AEC logs. This change
reintroduces these log messages, making debugging easier. "Acoustic
Echo Canceler" has been changed to AEC for easier grepping.
Some new logging is also added.
Bug: webrtc:7452
Change-Id: I9bfb91895931d73d92f3187c8c7c5b7524ac05ba
Reviewed-on: https://webrtc-review.googlesource.com/71401
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23003}
This CL introduces sdk/android/api/org/webrtc/audio/AudioDeviceModule.java,
which is the new interface for audio device modules on Android.
This CL also refactors the main AudioDeviceModule implementation, which
is sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java and makes
it conform to the new interface. The old code used global static methods
to configure the audio device code. This CL gets rid of all that and uses
a builder pattern in JavaAudioDeviceModule instead. The only two dynamic
methods left in the interface are setSpeakerMute() and setMicrophoneMute().
Removing the global static methods allowed a significant cleanup, and e.g.
the file sdk/android/src/jni/audio_device/audio_manager.cc has been
completely removed.
The PeerConnectionFactory interface is also updated to allow passing in
an external AudioDeviceModule. The current built-in ADM is encapsulated
under LegacyAudioDeviceModule.java, which is the default for now to
ensure backwards compatibility.
Bug: webrtc:7452
Change-Id: I64d5f4dba9a004da001f1acb2bd0c1b1f2b64f21
Reviewed-on: https://webrtc-review.googlesource.com/65360
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22765}
The OpenSLES engine is currently managed by the AudioManager which is
a generic class shared between different kinds of audio input/output.
This CL moves the responsibility of the OpenSLES engine to the actual
OpenSLES implementations.
Bug: webrtc:7452
Change-Id: Iecccb03ec5cd12ce2f3fdc44daaedae27aecf88b
Reviewed-on: https://webrtc-review.googlesource.com/64520
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22661}
This CL performs some simplifications and cleanups of the moved audio code.
* All JNI interaction now goes from the C++ audio manager calling into
the Java audio manager. The calls back from the Java code to the C++
audio manager are removed (this was related to caching audio parameters).
It's simpler this way because the Java code is now unaware of the C++
layer and it will be easier to make this into a Java interface.
* A bunch of state was removed that was related to caching the audio parameters.
* Some unused functions from audio manager was removed.
* The Java audio manager no longer depends on ContextUtils, and the context has
to be passed in externally instead. This is done because we want to get rid of
ContextUtils eventually.
* The selection of what AudioDeviceModule to create (AAudio, OpenSLES
input/output is now exposed in the interface. The reason is that client should
decide and create what they need explicitly instead of setting blacklists
in static global WebRTC classes. This will be more modular long term.
* Selection of what audio device module to create (OpenSLES combinations) no
longer requires instantiating a C++ AudioManager and is done with static
enumeration methods instead.
Bug: webrtc:7452
Change-Id: Iba29cf7447a1f6063abd9544d7315e10095167c8
Reviewed-on: https://webrtc-review.googlesource.com/63760
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22542}
This CL adds a stand-alone Android AudioDeviceModule in the
sdk/android folder. It's forked from modules/audio_device/android/
and then simplified for the Android case. The stand-alone Android
ADM is available both in the native_api and also under a field trial
in the Java API.
Bug: webrtc:7452
Change-Id: If6e558026bd0ccb52f56d78ac833339a5789d300
Reviewed-on: https://webrtc-review.googlesource.com/60541
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22517}