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

Issue 1580493004: Plumb audio focus support for spitzer clients. (Closed)

Created:
4 years, 11 months ago by DaleCurtis
Modified:
4 years, 9 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, henrika (OOO until Aug 14), jam, mcasas+watch_chromium.org, miu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-media_chromium.org, o1ka, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@delegate_hookup
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plumb audio focus support for spitzer clients. Adds a new audio effects parameters "FOCUSABLE" which can be set by clients which support platform specific audio focus concepts. This tells the AudioRendererHost that it should check with the focus controller before allowing audio playback. MediaWebContentsObserverAndroid is the focus controller in this case. Since audio streams can be created far ahead of player creation, the controller must support deferred responses for the focus request. Focus grants are handled per render frame. I.e. the ARH requests focus status using a render pid+render frame id and internally the MWCOA vends status based on the frame id (once approved). While a render frame has an active (playing) media session, all focus requests are granted. BUG=529887 TEST=audio doesn't play until after focus request.

Patch Set 1 : Fix crash, plumb. #

Total comments: 6

Patch Set 2 : Detangle. Cleanup. #

Total comments: 3

Patch Set 3 : Rebased. #

Patch Set 4 : Rebase. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -19 lines) Patch
M content/browser/media/android/media_session_controller.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/media/android/media_session_controller.cc View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/media/android/media_web_contents_observer_android.h View 1 2 3 3 chunks +11 lines, -0 lines 5 comments Download
M content/browser/media/android/media_web_contents_observer_android.cc View 1 2 3 4 chunks +52 lines, -12 lines 1 comment Download
M content/browser/media/media_web_contents_observer.h View 1 2 3 2 chunks +21 lines, -0 lines 0 comments Download
M content/browser/media/media_web_contents_observer.cc View 1 2 3 2 chunks +29 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 5 chunks +30 lines, -0 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.h View 1 chunk +5 lines, -3 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
M media/audio/audio_parameters.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/blink/webaudiosourceprovider_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M media/blink/webaudiosourceprovider_impl.cc View 2 chunks +9 lines, -1 line 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
DaleCurtis
This is not ready for review and may ultimately just be merged into https://codereview.chromium.org/1570043002/ (certainly ...
4 years, 11 months ago (2016-01-12 02:12:51 UTC) #4
Henrik Grunell
On 2016/01/12 02:12:51, DaleCurtis wrote: > This is not ready for review and may ultimately ...
4 years, 11 months ago (2016-01-12 08:16:05 UTC) #5
DaleCurtis
Focus control is handled via the creator the stream, so in my proposed model the ...
4 years, 11 months ago (2016-01-12 18:31:51 UTC) #6
Henrik Grunell
On 2016/01/12 18:31:51, DaleCurtis wrote: > Focus control is handled via the creator the stream, ...
4 years, 11 months ago (2016-01-13 08:12:03 UTC) #7
Henrik Grunell
On 2016/01/13 08:12:03, Henrik Grunell wrote: > On 2016/01/12 18:31:51, DaleCurtis wrote: > > Focus ...
4 years, 11 months ago (2016-01-13 09:40:35 UTC) #8
DaleCurtis
The answer is the same as before, handling loss of focus is not the stream's ...
4 years, 11 months ago (2016-01-13 20:59:46 UTC) #9
Henrik Grunell
On 2016/01/13 20:59:46, DaleCurtis wrote: > The answer is the same as before, handling loss ...
4 years, 11 months ago (2016-01-14 11:19:29 UTC) #10
mlamouri (slow - plz ping)
couple of drive-by comments. Will have another look later. https://codereview.chromium.org/1580493004/diff/20001/content/browser/media/media_web_contents_observer.cc File content/browser/media/media_web_contents_observer.cc (right): https://codereview.chromium.org/1580493004/diff/20001/content/browser/media/media_web_contents_observer.cc#newcode84 content/browser/media/media_web_contents_observer.cc:84: ...
4 years, 11 months ago (2016-01-14 15:03:41 UTC) #11
DaleCurtis
Cleaned up and pulled things that belong in the other patch set out. https://codereview.chromium.org/1580493004/diff/20001/content/browser/media/media_web_contents_observer.cc File ...
4 years, 11 months ago (2016-01-14 23:16:10 UTC) #14
mlamouri (slow - plz ping)
It looks generally good. Will have another look when it's "ready" for review ;) https://codereview.chromium.org/1580493004/diff/80001/content/browser/media/android/media_web_contents_observer_android.cc ...
4 years, 11 months ago (2016-01-19 17:18:18 UTC) #15
DaleCurtis
This is ready for review (though still needs unit tests) if we still want to ...
4 years, 10 months ago (2016-02-03 02:15:31 UTC) #18
mlamouri (slow - plz ping)
Hmm, I started to review this then I realized we probably don't need all of ...
4 years, 10 months ago (2016-02-03 15:20:52 UTC) #19
DaleCurtis
On 2016/02/03 at 15:20:52, mlamouri wrote: > Hmm, I started to review this then I ...
4 years, 10 months ago (2016-02-04 00:03:51 UTC) #20
DaleCurtis
https://codereview.chromium.org/1671603002 implements muting which is much cleaner. I think we should ditch this CL. Let ...
4 years, 10 months ago (2016-02-04 22:24:31 UTC) #21
Henrik Grunell
4 years, 9 months ago (2016-03-10 21:11:43 UTC) #22
On 2016/02/04 22:24:31, DaleCurtis wrote:
> https://codereview.chromium.org/1671603002 implements muting which is much
> cleaner. I think we should ditch this CL. Let me know and I'll close this one.

From my point of view: go for the other approach.

Powered by Google App Engine
This is Rietveld 408576698