Add UMA histogram for actual Android buffer size

Previously a histogram was added to track the requested buffer size,
this CL adds a histogram for the actually used buffer size.

Bug: b/157429867
Change-Id: I04016760982a4c43b8ba8f0e095fe1171b705258
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176227
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31385}
This commit is contained in:
Ivo Creusen
2020-05-28 13:54:49 +02:00
committed by Commit Bot
parent b940a7d97b
commit f1393e23a2
5 changed files with 59 additions and 8 deletions

View File

@ -423,6 +423,14 @@ class WebRtcAudioTrack {
}
}
@CalledByNative
private int getBufferSizeInFrames() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return audioTrack.getBufferSizeInFrames();
}
return -1;
}
private void logBufferCapacityInFrames() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Logging.d(TAG,