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

Issue 1972783003: Disable idle suspend for Chromecast (Closed)

Created:
4 years, 7 months ago by halliwell
Modified:
4 years, 6 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, feature-media-reviews_chromium.org, halliwell+watch_chromium.org, jam, lcwu+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Disable idle suspend for Chromecast Adds an API for content embedders to prevent media player from suspending when idle, and uses it to prevent suspend on Chromecast (where it causes the screen to go black with current hardware decoders). BUG=internal b/28635426

Patch Set 1 #

Total comments: 2

Patch Set 2 : Restore 'NO' conditional #

Total comments: 4

Patch Set 3 : Simplify suspend state logic, and rebase #

Total comments: 1

Patch Set 4 : Reverted all content/ changes, API now in Renderer #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -9 lines) Patch
M chromecast/renderer/media/cma_renderer.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/renderer/media/cma_renderer.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 1 chunk +6 lines, -0 lines 2 comments Download
M media/base/renderer.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 2 chunks +8 lines, -7 lines 1 comment Download
M media/blink/webmediaplayer_impl_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/services/mojo_renderer_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/services/mojo_renderer_impl.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M media/renderers/renderer_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/renderers/renderer_impl.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (6 generated)
halliwell
4 years, 7 months ago (2016-05-12 03:49:49 UTC) #3
sandersd (OOO until July 31)
I'm not a fan of WebMediaPlayerParams's growing constructor, but this CL itself lgtm. https://codereview.chromium.org/1972783003/diff/1/media/blink/webmediaplayer_impl.cc File ...
4 years, 7 months ago (2016-05-12 17:48:11 UTC) #4
halliwell
sievers: PTAL at content/ changes https://codereview.chromium.org/1972783003/diff/1/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (left): https://codereview.chromium.org/1972783003/diff/1/media/blink/webmediaplayer_impl.cc#oldcode1472 media/blink/webmediaplayer_impl.cc:1472: if (can_suspend_state_ == CanSuspendState::NO) ...
4 years, 7 months ago (2016-05-12 18:11:59 UTC) #6
DaleCurtis
https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1456 media/blink/webmediaplayer_impl.cc:1456: if (can_suspend_state_ == CanSuspendState::NO) Unnecessary due to line 1476?
4 years, 7 months ago (2016-05-16 17:03:50 UTC) #7
sandersd (OOO until July 31)
https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1456 media/blink/webmediaplayer_impl.cc:1456: if (can_suspend_state_ == CanSuspendState::NO) On 2016/05/16 17:03:49, DaleCurtis wrote: ...
4 years, 7 months ago (2016-05-16 18:03:32 UTC) #8
DaleCurtis
https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1456 media/blink/webmediaplayer_impl.cc:1456: if (can_suspend_state_ == CanSuspendState::NO) On 2016/05/16 at 18:03:32, sandersd ...
4 years, 7 months ago (2016-05-16 18:13:18 UTC) #9
halliwell
https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/1972783003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1456 media/blink/webmediaplayer_impl.cc:1456: if (can_suspend_state_ == CanSuspendState::NO) On 2016/05/16 18:13:18, DaleCurtis wrote: ...
4 years, 7 months ago (2016-05-16 18:31:43 UTC) #10
DaleCurtis
lgtm
4 years, 7 months ago (2016-05-16 21:16:57 UTC) #11
halliwell
On 2016/05/16 21:16:57, DaleCurtis wrote: > lgtm sievers: friendly ping on this.
4 years, 7 months ago (2016-05-16 22:59:08 UTC) #12
alokp
https://codereview.chromium.org/1972783003/diff/40001/content/public/renderer/content_renderer_client.h File content/public/renderer/content_renderer_client.h (right): https://codereview.chromium.org/1972783003/diff/40001/content/public/renderer/content_renderer_client.h#newcode353 content/public/renderer/content_renderer_client.h:353: virtual bool AllowMediaIdleSuspend(); IMHO this API does not belong ...
4 years, 7 months ago (2016-05-17 15:13:38 UTC) #14
halliwell
On 2016/05/17 15:13:38, alokp wrote: > https://codereview.chromium.org/1972783003/diff/40001/content/public/renderer/content_renderer_client.h > File content/public/renderer/content_renderer_client.h (right): > > https://codereview.chromium.org/1972783003/diff/40001/content/public/renderer/content_renderer_client.h#newcode353 > ...
4 years, 7 months ago (2016-05-17 23:36:42 UTC) #15
alokp
On 2016/05/17 23:36:42, halliwell wrote: > On 2016/05/17 15:13:38, alokp wrote: > > > https://codereview.chromium.org/1972783003/diff/40001/content/public/renderer/content_renderer_client.h ...
4 years, 7 months ago (2016-05-18 00:28:55 UTC) #16
DaleCurtis
I agree it's a bit funny as a content setting, I don't have a good ...
4 years, 7 months ago (2016-05-18 03:58:35 UTC) #18
no sievers
On 2016/05/12 18:11:59, halliwell wrote: > sievers: PTAL at content/ changes > what alokp@ says. ...
4 years, 7 months ago (2016-05-19 17:36:26 UTC) #19
halliwell
Ok, I reverted all content/ changes and added an API to Renderer instead. Not sure ...
4 years, 7 months ago (2016-05-21 00:46:58 UTC) #21
alokp
I think this is in the right direction. Do you expect the answer for AllowSuspend ...
4 years, 7 months ago (2016-05-21 03:52:14 UTC) #22
halliwell
On 2016/05/21 03:52:14, alokp wrote: > I think this is in the right direction. Do ...
4 years, 7 months ago (2016-05-21 04:25:30 UTC) #23
DaleCurtis
The value could change on other platforms. I.e. right now OSX and Windows are only ...
4 years, 7 months ago (2016-05-23 18:00:38 UTC) #24
sandersd (OOO until July 31)
https://codereview.chromium.org/1972783003/diff/60001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/1972783003/diff/60001/media/base/pipeline_impl.cc#newcode251 media/base/pipeline_impl.cc:251: DCHECK(renderer_); Since CanSuspend() can be called before Start(), and ...
4 years, 7 months ago (2016-05-23 18:41:58 UTC) #25
alokp
Dale: Can the Renderer implementations on OSX and Windows switch dynamically between gpu/software decoders during ...
4 years, 7 months ago (2016-05-23 20:32:01 UTC) #26
DaleCurtis
On 2016/05/23 at 20:32:01, alokp wrote: > Dale: Can the Renderer implementations on OSX and ...
4 years, 7 months ago (2016-05-23 20:35:04 UTC) #27
halliwell
On 2016/05/23 20:35:04, DaleCurtis wrote: > On 2016/05/23 at 20:32:01, alokp wrote: > > Dale: ...
4 years, 7 months ago (2016-05-24 21:54:26 UTC) #28
sandersd (OOO until July 31)
4 years, 7 months ago (2016-05-24 23:11:26 UTC) #29
On 2016/05/24 21:54:26, halliwell wrote:
> On 2016/05/23 20:35:04, DaleCurtis wrote:
> > On 2016/05/23 at 20:32:01, alokp wrote:
> > > Dale: Can the Renderer implementations on OSX and Windows switch
dynamically
> > between gpu/software decoders during their lifetime? If not, we can return
the
> > response to can-suspend in Renderer::Initialize?
> > 
> > Yes they can switch dynamically to software decoding in the case of GPU
decode
> > errors.
> 
> Dale + Dan: is that dynamic switching handled by the VideoFrame metadata
though?
>  Or were you hoping to move OSX and Windows checking into the Renderer
interface
> also?
> 
> At least for our use case, I like Alok's suggestion of setting up the flag at
> Initialize time, because it eliminates any need for locking around checking
> |renderer_|.

The source of truth for us is the VideoDecoder (and due to fallbacks that can
change within a Renderer instance). An ideal API would be to ask the Renderer,
which in turn could ask the Decoder. Using VideoFrames was a quick workaround to
avoid all of those interface changes.

That said, since it is the VideoFrames that become broken, signaling via
VideoFrame metadata isn't crazy.

Powered by Google App Engine
This is Rietveld 408576698