Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 2268253002: UMA stats for browser/renderer audio rendering buffer size mismatch. (Closed)

Created:
4 years, 4 months ago by o1ka
Modified:
4 years, 3 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

UMA stats for browser/renderer audio rendering buffer size mismatch. In case AudioOutputDevice buffer size is not the same as hardware buffer size, AudioOutputResampler on browser side does rebuffering (fifo-based). It means that AudioOuputDevice::Render() calles are NOT issued with a constant interval based on output buffer size duration. For example, for WebRTC it means Voice Engine can receive 2+ calls one by one without 10 ms interval, or a call can be skipped from time to time. It may result in a missed deadline on Browser/Renderer edge, which causes audio glitch. And it may create problems for echo cancellation. Addind a UMA stat to reflect the affected popluation of audio rendering sessions. BUG=538152 Committed: https://crrev.com/5cdf58442f79d5e681ada5b9e0aaa7564b1574f1 Cr-Commit-Position: refs/heads/master@{#415418}

Patch Set 1 #

Patch Set 2 : passing latency info to browser #

Total comments: 8

Patch Set 3 : cleanup, updated histograms.xml #

Patch Set 4 : build fix #

Total comments: 11

Patch Set 5 : UMA fixes #

Total comments: 3

Patch Set 6 : fixing tests and nits #

Patch Set 7 : new version of UMA histogram #

Total comments: 14

Patch Set 8 : comments addressed #

Patch Set 9 : merge conflict resolved #

Patch Set 10 : histogram rename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -29 lines) Patch
M content/renderer/media/audio_device_factory.h View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M content/renderer/media/audio_device_factory.cc View 1 3 chunks +21 lines, -22 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.cc View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M content/renderer/media/track_audio_renderer.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_renderer.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M media/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/audio_output_resampler.cc View 1 2 3 4 5 6 7 8 9 3 chunks +54 lines, -1 line 0 comments Download
M media/base/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M media/base/audio_parameters.h View 1 2 3 4 5 3 chunks +10 lines, -0 lines 0 comments Download
M media/base/audio_parameters.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M media/base/ipc/media_param_traits.cc View 1 5 chunks +7 lines, -1 line 0 comments Download
M media/base/ipc/media_param_traits_macros.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 2 chunks +28 lines, -0 lines 0 comments Download

Messages

Total messages: 62 (36 generated)
o1ka
PTAL: PS1 adds the metric which is logged for all the audio streams. The problem ...
4 years, 4 months ago (2016-08-23 15:33:59 UTC) #2
Henrik Grunell
https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc#newcode147 media/audio/audio_output_resampler.cc:147: std::max(input_buffer_size, output_buffer_size); I believe you had it the other ...
4 years, 4 months ago (2016-08-23 15:53:19 UTC) #3
o1ka
https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc#newcode147 media/audio/audio_output_resampler.cc:147: std::max(input_buffer_size, output_buffer_size); On 2016/08/23 15:53:19, Henrik Grunell wrote: > ...
4 years, 4 months ago (2016-08-23 16:20:56 UTC) #4
o1ka
PTAL at the updated version. dalecurtis@ - friendly ping; isherman@ - PTAL at UMA.
4 years, 4 months ago (2016-08-24 12:27:30 UTC) #6
Henrik Grunell
https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc#newcode167 media/audio/audio_output_resampler.cc:167: UMA_HISTOGRAM_SPARSE_SLOWLY( On 2016/08/23 16:20:56, o1ka wrote: > On 2016/08/23 ...
4 years, 4 months ago (2016-08-24 12:47:15 UTC) #11
o1ka
On 2016/08/24 12:47:15, Henrik Grunell wrote: > https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc > File media/audio/audio_output_resampler.cc (right): > > https://codereview.chromium.org/2268253002/diff/20001/media/audio/audio_output_resampler.cc#newcode167 ...
4 years, 4 months ago (2016-08-24 12:52:00 UTC) #12
DaleCurtis
lgtm
4 years, 4 months ago (2016-08-24 17:19:18 UTC) #17
Ilya Sherman
From reading the CL description, it seems like you could simply record a tristate histogram: ...
4 years, 4 months ago (2016-08-24 22:20:23 UTC) #18
o1ka
On 2016/08/24 22:20:23, Ilya Sherman wrote: > From reading the CL description, it seems like ...
4 years, 3 months ago (2016-08-25 11:46:23 UTC) #19
o1ka
isherman@ - thanks for the comments, please see the answers + the updated PS. https://codereview.chromium.org/2268253002/diff/60001/media/audio/audio_output_resampler.cc ...
4 years, 3 months ago (2016-08-25 11:48:34 UTC) #20
o1ka
kenrb@ - PTAL at IPC change (adding a enum value to AudioParameters)
4 years, 3 months ago (2016-08-25 11:51:33 UTC) #24
o1ka
dalecurtis@ - just to double-check: does passing latency tag to browser as a member of ...
4 years, 3 months ago (2016-08-25 11:53:35 UTC) #25
Henrik Grunell
lgtm https://codereview.chromium.org/2268253002/diff/80001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/80001/media/audio/audio_output_resampler.cc#newcode144 media/audio/audio_output_resampler.cc:144: DCHECK(input_buffer_size); Nit: Consider DCHECK_NE(x, 0). Slightly more readable. ...
4 years, 3 months ago (2016-08-25 12:52:09 UTC) #28
Ilya Sherman
https://codereview.chromium.org/2268253002/diff/60001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/60001/media/audio/audio_output_resampler.cc#newcode147 media/audio/audio_output_resampler.cc:147: std::min(input_buffer_size, output_buffer_size); On 2016/08/25 11:48:34, o1ka wrote: > On ...
4 years, 3 months ago (2016-08-26 00:35:35 UTC) #33
kenrb
ipc lgtm
4 years, 3 months ago (2016-08-26 13:38:37 UTC) #34
o1ka
> OTOH, if you're not sure that you know the exact set of inputs, then ...
4 years, 3 months ago (2016-08-26 14:55:12 UTC) #35
Ilya Sherman
I continue to think that this might be easier to interpret as two separate histograms. ...
4 years, 3 months ago (2016-08-27 06:38:45 UTC) #36
Henrik Grunell
lgtm Fix nits is optional. https://codereview.chromium.org/2268253002/diff/120001/media/audio/audio_output_resampler.cc File media/audio/audio_output_resampler.cc (right): https://codereview.chromium.org/2268253002/diff/120001/media/audio/audio_output_resampler.cc#newcode153 media/audio/audio_output_resampler.cc:153: if (output_buffer_size % input_buffer_size) ...
4 years, 3 months ago (2016-08-29 15:26:16 UTC) #37
o1ka
>>I continue to think that this might be easier to interpret as two separate histograms. ...
4 years, 3 months ago (2016-08-29 15:52:17 UTC) #38
Ilya Sherman
On 2016/08/29 15:52:17, o1ka wrote: > >>I continue to think that this might be easier ...
4 years, 3 months ago (2016-08-29 19:45:40 UTC) #47
o1ka
> Sorry, I think we're misunderstanding each other somehow. Maybe it would make > sense ...
4 years, 3 months ago (2016-08-30 10:20:36 UTC) #48
Ilya Sherman
On 2016/08/30 10:20:36, o1ka wrote: > > Sorry, I think we're misunderstanding each other somehow. ...
4 years, 3 months ago (2016-08-30 20:34:45 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2268253002/180001
4 years, 3 months ago (2016-08-30 20:35:48 UTC) #57
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 3 months ago (2016-08-30 20:44:17 UTC) #59
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/5cdf58442f79d5e681ada5b9e0aaa7564b1574f1 Cr-Commit-Position: refs/heads/master@{#415418}
4 years, 3 months ago (2016-08-30 20:47:39 UTC) #61
o1ka
4 years, 3 months ago (2016-08-31 07:19:39 UTC) #62
Message was sent while issue was closed.
On 2016/08/30 20:34:45, Ilya Sherman wrote:
> On 2016/08/30 10:20:36, o1ka wrote:
> > > Sorry, I think we're misunderstanding each other somehow.  Maybe it would
> make
> > > sense to have a brief IM conversation or video conference?
> > 
> > Sure! Could you ping me today between 9:30-11 your time?
> 
> Whoops, sorry for missing this!  I ended up having a pretty full morning
today. 
> Hope you weren't too tethered to a work device waiting for me... :/

No problem at all :)

> Okay, it sounds like you've given this plenty of thought and prefer this
> histogram layout, so I'll go ahead and approve: LGTM.  I guess if this metric
> proves to be too confusing to make use of, you can always come back and
> reformulate it in the future =)
:)

Powered by Google App Engine
This is Rietveld 408576698