Adds logging of audio sessions status on the recording side in ADM for Android.
Goal is to be able to retrieve more details about possible microphone conflicts in cases where Init/Start of audio recording fails. Only supported on Android N and higher. Also adds new boolean UMA histogram called WebRTC.Audio.SourceMatchesRecordingSession. Its value is stored after the recording session has been stopped. Does not affect the media flow or functionality of the ADM. Time to start audio should not be affected either since the new check and logging takes place on a separate ExecutorService thread. See go/webrtc-adm-android for more details and examples. Bug: webrtc:10971 Change-Id: Ia80c1534e326907a1582824225d5f58caa016922 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150793 Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Alex Glaznev <glaznev@webrtc.org> Reviewed-by: Paulina Hensman <phensman@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29236}
This commit is contained in:
@ -158,6 +158,13 @@ int32_t AudioRecordJni::StopRecording() {
|
||||
if (!initialized_ || !recording_) {
|
||||
return 0;
|
||||
}
|
||||
const bool session_was_ok =
|
||||
Java_WebRtcAudioRecord_isAudioSourceMatchingRecordingSession(
|
||||
env_, j_audio_record_);
|
||||
RTC_HISTOGRAM_BOOLEAN("WebRTC.Audio.SourceMatchesRecordingSession",
|
||||
session_was_ok);
|
||||
RTC_LOG(INFO) << "HISTOGRAM(WebRTC.Audio.SourceMatchesRecordingSession): "
|
||||
<< session_was_ok;
|
||||
if (!Java_WebRtcAudioRecord_stopRecording(env_, j_audio_record_)) {
|
||||
RTC_LOG(LS_ERROR) << "StopRecording failed";
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user