Commit 8413f9ef authored by dalecurtis's avatar dalecurtis Committed by Commit bot

Disable idle player suspend on OSX.

This breaks hardware decoded video since ownership of video frames
is tied to the hardware decoder.

BUG=595716
TEST=none

Review URL: https://codereview.chromium.org/1813883002

Cr-Commit-Position: refs/heads/master@{#381771}
parent 74deaca3
...@@ -1105,6 +1105,12 @@ void WebMediaPlayerImpl::OnSuspendRequested(bool must_suspend) { ...@@ -1105,6 +1105,12 @@ void WebMediaPlayerImpl::OnSuspendRequested(bool must_suspend) {
return; return;
#endif #endif
#if defined(OS_MACOSX)
// TODO(sandersd): Idle suspend is disabled on OSX since hardware decoded
// frames are owned by the video decoder in the GPU process. A mechanism for
// detaching ownership from the decoder is needed. http://crbug.com/595716.
return;
#else
// Suspend should never be requested unless required or we're already in an // Suspend should never be requested unless required or we're already in an
// idle state (paused or ended). // idle state (paused or ended).
DCHECK(must_suspend || paused_ || ended_); DCHECK(must_suspend || paused_ || ended_);
...@@ -1115,6 +1121,7 @@ void WebMediaPlayerImpl::OnSuspendRequested(bool must_suspend) { ...@@ -1115,6 +1121,7 @@ void WebMediaPlayerImpl::OnSuspendRequested(bool must_suspend) {
pipeline_controller_.Suspend(); pipeline_controller_.Suspend();
if (must_suspend && delegate_) if (must_suspend && delegate_)
delegate_->PlayerGone(delegate_id_); delegate_->PlayerGone(delegate_id_);
#endif
} }
void WebMediaPlayerImpl::OnPlay() { void WebMediaPlayerImpl::OnPlay() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment