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

Issue 2948613002: [AudioStreamMonitor] Adds API to collect frame-level audibility. (Closed)

Created:
3 years, 6 months ago by lpy
Modified:
3 years, 5 months ago
Reviewers:
chrisha, DaleCurtis, nasko, miu
CC:
chrisha, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, miu+watch_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[AudioStreamMonitor] Adds API to collect frame-level audibility. This patch creates API to collect frame-level audibility in order to do frame-level throttling and suspension, only sends audio changed state to RenderFrameHost when we don't have power level monitoring or the audible state of a stream changes, and defers to RenderFrameHost to send signals to RenderProcessHost about audio stream added/removed. BUG=731270 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2948613002 Cr-Commit-Position: refs/heads/master@{#483075} Committed: https://chromium.googlesource.com/chromium/src/+/5e9ff6090994e9e6b3e63e40436654eb4e968271

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed comments, fixed tests #

Total comments: 22

Patch Set 3 : Addressed comments #

Patch Set 4 : Correct comments in code #

Total comments: 6

Patch Set 5 : Removed public API, fixed tests #

Total comments: 21

Patch Set 6 : Addressed comments #

Total comments: 6

Patch Set 7 : Addressed comments and rebased #

Total comments: 14

Patch Set 8 : Addressed comments and rebased #

Patch Set 9 : Fix windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -59 lines) Patch
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/media/audio_stream_monitor.h View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -3 lines 0 comments Download
M content/browser/media/audio_stream_monitor.cc View 1 2 3 4 5 6 7 7 chunks +68 lines, -21 lines 0 comments Download
M content/browser/media/audio_stream_monitor_unittest.cc View 1 2 3 4 5 8 chunks +51 lines, -35 lines 0 comments Download

Messages

Total messages: 75 (55 generated)
lpy
dalecurtis@, miu@, ptal. nasko@, ptal as content owner. chrisha@, fyi
3 years, 6 months ago (2017-06-19 19:08:37 UTC) #5
miu
https://codereview.chromium.org/2948613002/diff/1/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/1/content/browser/media/audio_stream_monitor.cc#newcode149 content/browser/media/audio_stream_monitor.cc:149: // We should send audio-added signal to RenderProcessHost when ...
3 years, 6 months ago (2017-06-19 20:44:02 UTC) #8
lpy
Thanks for the feedback, I updated the patch. https://codereview.chromium.org/2948613002/diff/1/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/1/content/browser/media/audio_stream_monitor.cc#newcode149 content/browser/media/audio_stream_monitor.cc:149: // ...
3 years, 6 months ago (2017-06-20 00:19:21 UTC) #10
DaleCurtis
https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc#newcode179 content/browser/media/audio_stream_monitor.cc:179: if (it == poll_callbacks_.end()) { No need for {} ...
3 years, 6 months ago (2017-06-20 00:32:53 UTC) #12
chrisha
(drive by nit) https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.h File content/browser/media/audio_stream_monitor.h (right): https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.h#newcode153 content/browser/media/audio_stream_monitor.h:153: using StreamID = std::tuple<int, int, int>; ...
3 years, 6 months ago (2017-06-20 14:30:35 UTC) #16
nasko
https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc#newcode80 content/browser/media/audio_stream_monitor.cc:80: RenderProcessHost::FromID(render_process_id)) innermost if statement also requires {}, since it ...
3 years, 6 months ago (2017-06-20 16:17:45 UTC) #17
lpy
Thanks for the feedback, ptal https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/20001/content/browser/media/audio_stream_monitor.cc#newcode80 content/browser/media/audio_stream_monitor.cc:80: RenderProcessHost::FromID(render_process_id)) On 2017/06/20 16:17:45, ...
3 years, 6 months ago (2017-06-20 22:28:53 UTC) #19
nasko
https://codereview.chromium.org/2948613002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2948613002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode1000 content/browser/frame_host/render_frame_host_impl.cc:1000: if (IsAudible()) Why not use is_audible_? It is used ...
3 years, 6 months ago (2017-06-21 21:04:07 UTC) #30
lpy
Thanks, I uploaded another patch, ptal. https://codereview.chromium.org/2948613002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2948613002/diff/60001/content/browser/frame_host/render_frame_host_impl.cc#newcode1000 content/browser/frame_host/render_frame_host_impl.cc:1000: if (IsAudible()) On ...
3 years, 6 months ago (2017-06-21 22:28:18 UTC) #33
DaleCurtis
Just a bunch of nits, but overall lg2m modulo the question about the nullptr in ...
3 years, 6 months ago (2017-06-22 00:35:55 UTC) #36
lpy
Thanks, I updated the patch https://codereview.chromium.org/2948613002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2948613002/diff/80001/content/browser/frame_host/render_frame_host_impl.cc#newcode1194 content/browser/frame_host/render_frame_host_impl.cc:1194: if (is_audible != is_audible_) ...
3 years, 6 months ago (2017-06-22 02:28:52 UTC) #39
DaleCurtis
media/ lgtm % nits. Thanks for your patience! https://codereview.chromium.org/2948613002/diff/80001/content/browser/media/audio_stream_monitor.cc File content/browser/media/audio_stream_monitor.cc (right): https://codereview.chromium.org/2948613002/diff/80001/content/browser/media/audio_stream_monitor.cc#newcode209 content/browser/media/audio_stream_monitor.cc:209: // ...
3 years, 6 months ago (2017-06-22 03:15:40 UTC) #40
miu
Sorry for the delay. I will be out Thu. Will take another look first thing ...
3 years, 6 months ago (2017-06-22 04:18:00 UTC) #43
nasko
LGTM with an optional nit, assuming all other reviewer nits are also addressed. https://codereview.chromium.org/2948613002/diff/100001/content/browser/media/audio_stream_monitor.cc File ...
3 years, 6 months ago (2017-06-22 15:38:06 UTC) #44
lpy
Thanks for the comments, I updated the patch. https://codereview.chromium.org/2948613002/diff/100001/content/browser/frame_host/render_frame_host_impl.h File content/browser/frame_host/render_frame_host_impl.h (right): https://codereview.chromium.org/2948613002/diff/100001/content/browser/frame_host/render_frame_host_impl.h#newcode251 content/browser/frame_host/render_frame_host_impl.h:251: bool ...
3 years, 6 months ago (2017-06-22 20:14:05 UTC) #47
lpy
miu@, gentle ping for review.
3 years, 6 months ago (2017-06-23 17:32:32 UTC) #50
miu
Comments on PS7: https://codereview.chromium.org/2948613002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2948613002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc#newcode1193 content/browser/frame_host/render_frame_host_impl.cc:1193: GetProcess()->OnAudioStreamAdded(); The OnAudioStreamAdded/Removed() methods need to ...
3 years, 5 months ago (2017-06-26 22:58:00 UTC) #55
lpy
Thanks, I updated the patch. https://codereview.chromium.org/2948613002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/2948613002/diff/120001/content/browser/frame_host/render_frame_host_impl.cc#newcode1193 content/browser/frame_host/render_frame_host_impl.cc:1193: GetProcess()->OnAudioStreamAdded(); On 2017/06/26 22:57:59, ...
3 years, 5 months ago (2017-06-28 02:14:29 UTC) #63
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/2948613002/180001
3 years, 5 months ago (2017-06-28 18:02:32 UTC) #72
commit-bot: I haz the power
3 years, 5 months ago (2017-06-28 18:33:22 UTC) #75
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/5e9ff6090994e9e6b3e63e404366...

Powered by Google App Engine
This is Rietveld 408576698