Removes current_mic_level_, new_mic_level_ and clock_drift_, together
with APIs for accessing them.
Bug: webrtc:8598
Change-Id: I8e07396fcafd2a719e204730e2c7d26797bed762
Reviewed-on: https://webrtc-review.googlesource.com/39783
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21632}
Starting from Chromium Roll [1], WebRTC should start to use NDK r16
for Android builds. The roll cannot be completed because of three
compilation errors:
../../sdk/android/src/jni/pc/androidnetworkmonitor.cc:15:9: error: 'RTLD_NOLOAD' macro redefined [-Werror,-Wmacro-redefined]
^
../../third_party/android_tools/ndk/sysroot/usr/include/dlfcn.h:62:9: note: previous definition is here
../../modules/audio_device/android/audio_record_jni.cc:251:41: error: format specifies type 'long long' but the argument has type 'jlong' (aka 'long') [-Werror,-Wformat]
ALOGD("direct buffer capacity: %lld", capacity);
../../modules/audio_device/android/audio_track_jni.cc:229:41: error: format specifies type 'long long' but the argument has type 'jlong' (aka 'long') [-Werror,-Wformat]
ALOGD("direct buffer capacity: %lld", capacity);
This CL forward fixes these errors in order to fix the Chromium Roll
into WebRTC.
[1] - https://webrtc-review.googlesource.com/c/src/+/37540
Bug: webrtc:8710
Change-Id: I5bc64e73919eee7c9e965a442a386b5e1897b56a
Reviewed-on: https://webrtc-review.googlesource.com/37640
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21510}
WebRTC.Audio.InitRecordingDurationMs and
WebRTC.Audio.StartRecordingDurationMs UMA stats are added on Android
to measure the time consumed on these two methods where the main part
of the work is done in Java.
Bug: b/67854242
Change-Id: I2d5487511402db18009d66a39c66d3f10d98cdd6
Reviewed-on: https://webrtc-review.googlesource.com/37420
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21494}
This CL is part of merging the helper functions for audio and non-audio JNI code.
The GetThreadInfo() function is unrelated to JNI and I would prefer not to keep
it in a JNI helper file. Also, GetThreadInfo() is a very small function and inlining
it makes it simpler and more transparent IMO, as well as removing a lot of unnecessary
std::string creations.
Bug: webrtc:8689
Change-Id: I7d238fee826d310c0f5343d18b92d0dff864fd6a
Reviewed-on: https://webrtc-review.googlesource.com/36302
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21466}
This reverts commit e7a5567954.
Reason for revert: Causes crashes when no permissions are granted - b/71056584
TBR=henrika@webrtc.org
Original change's description:
> Now uses AudioRecord.Builder on Android again.
>
> I tried to land the same change by reverting https://webrtc-review.googlesource.com/c/src/+/34443
> but the revert failed and I therefore land it manually here instead.
>
> TBR=glaznev@webrtc.org
>
> Bug: b/32742417
> Change-Id: Ied8ed3e7c7d67c51f781e39cbea952a2303278d9
> Reviewed-on: https://webrtc-review.googlesource.com/34442
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21351}
TBR=henrika@webrtc.org,glaznev@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/32742417
Change-Id: I8fd27d4b8c7d5a04f24477fc0ddffae89f01d566
Reviewed-on: https://webrtc-review.googlesource.com/36463
Commit-Queue: Alex Glaznev <glaznev@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21456}
Trivial change. Adding Alex as TBR. Same log exists for playout already.
This change makes is easier to compare logs.
NOTRY=TRUE
TBR=glaznev
Bug: NONE
Change-Id: I5dd23a4435d7816d8c171a0769132ac9d2f7f5aa
Reviewed-on: https://webrtc-review.googlesource.com/34654
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21361}
Avoids hitting a DCHECK in AudioRecordJni::OnCacheDirectBufferAddress()
when first init attempt has failed and we try again.
Bug: b/69434512
Change-Id: I4396ba22981d9258d6d72188bad66104255f19cf
Reviewed-on: https://webrtc-review.googlesource.com/31842
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21218}
This type of check should instead be performed by the application/client.
If the app does not have mic permissions, construction of the AudioRecord
object will fail and the user will receive an error callback anyhow.
Bug: b/69434512
Change-Id: If1d7eff488f7c693697e048a567c17ed0c51f040
Reviewed-on: https://webrtc-review.googlesource.com/25261
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20839}
int32_t SetLoudspeakerStatus(bool enable)
int32_t GetLoudspeakerStatus(bool* enabled) const
These APIs are only implemented on iOS and they do not belong in the
native audio layer since the client can achieve the same functionality
by using the shared audio session in sdk/objc/Framework/Headers/WebRTC/RTCAudioSession.h.
It also gives the client a better flexibility in how the audio routing is done.
Bug: webrtc:7306
Change-Id: I853e2f57e0f5ae0a0f9fc4729ce961d81f92588b
Reviewed-on: https://webrtc-review.googlesource.com/23740
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20721}
In order to create a clean CL to switch to RTC_ prefixed LOG macros
this CL runs `git cl format --full` on the files with LOG macros in
the following directories:
- modules/audio_device
- modules/media_file
- modules/video_capture
This CL has been automatically generated with:
for m in PLOG \
LOG_TAG \
LOG_GLEM \
LOG_GLE_EX \
LOG_GLE \
LAST_SYSTEM_ERROR \
LOG_ERRNO_EX \
LOG_ERRNO \
LOG_ERR_EX \
LOG_ERR \
LOG_V \
LOG_F \
LOG_T_F \
LOG_E \
LOG_T \
LOG_CHECK_LEVEL_V \
LOG_CHECK_LEVEL \
LOG
do
for d in media_file video_capture audio_device; do
cd modules/$d
git grep -l $m | grep -E "\.(cc|h|m|mm)$" | xargs sed -i "1 s/$/ /"
cd ../..
done
done
git cl format --full
Bug: webrtc:8452
Change-Id: I2858b6928e6bd79957f2e5e0b07028eb68a304b2
Reviewed-on: https://webrtc-review.googlesource.com/21322
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20613}
In https://chromium-review.googlesource.com/c/chromium/src/+/750645
Chromium started to use an ErrorProne plugin to discourage synchronized
public methods (an encourage the usage of synchronized blocks).
In order to unblock the Chromium Roll we can suppress these warnings
and decide if we want to align with Chromium on this check or ask
them to make it optional.
More details in the bug.
TBR=magjed@webrtc.org
Bug: webrtc:8491
Change-Id: Ie77a324e54aab44a4f59853959549f1d21f884a0
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/20060
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20569}
Second attempt to land https://webrtc-review.googlesource.com/c/src/+/15481.
This time with an extra (dummy) interface to ensure that we don't
break downstream clients.
Improves native Android audio implementations.
Bug: webrtc:8453
Change-Id: I659a3013ae523a2588e4c41ca44b7d0d2d65efb7
Reviewed-on: https://webrtc-review.googlesource.com/16425
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20462}
Summary:
Adds AudioTrackStartErrorCode to separate different types of error
codes in combination with StartPlayout.
Harmonizes WebRtcAudioRecord and WebRtcAudioTrack implementations
to ensure that init/start/stop is performed identically.
Adds thread checking in WebRtcAudio track.
Bug: webrtc:8453
Change-Id: Ic913e888ff9493c9cc748a7b4dae43eb6b37fa85
Reviewed-on: https://webrtc-review.googlesource.com/15481
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20448}
Fixes the warning below:
WebRtcAudioTrack.java:364: warning: [StaticAccessedFromInstance] Static method getMaxVolume
should not be accessed from an object instance; instead use AudioTrack.getMaxVolume
+ "max gain: " + audioTrack.getMaxVolume());
Bug: NONE
Change-Id: I6247584b65ac972a6a3739fba718387873964f9f
Reviewed-on: https://webrtc-review.googlesource.com/14180
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20371}
This is a reland of 34cdd2d402
Original change's description:
> Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
>
> (Re-upload of https://codereview.webrtc.org/3020493002/)
>
> Bug: webrtc:4690, webrtc:7306
> Change-Id: I67fb9ebca1296aabc08eae8a292a5c69832dc35e
> Reviewed-on: https://webrtc-review.googlesource.com/5360
> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20083}
Bug: webrtc:4690, webrtc:7306
Change-Id: Ib019439fe6ab0e6b759819e1e9bd320ba1d983bd
Reviewed-on: https://webrtc-review.googlesource.com/6300
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20137}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}