New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 606890 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Chrome , Mac
Pri: 1
Type: Bug



Sign in to add a comment

captureStream: Delay in playback of captured stream

Project Member Reported by srnarayanan@chromium.org, Apr 26 2016

Issue description

Version: M51 51.0.2704.28
OS: Mac, Win 7

What steps will reproduce the problem?
(1) Open https://cdn.rawgit.com/uysalere/js-demos/master/canvascapture2.html
(2) Drag mouse over the pink canvas area, to draw a pattern
(3) Click 'Create Stream from < canvas >' button
(4) Click 'Play back captured Stream to a < video >' button
(5) Continue dragging/drawing on the canvas with the mouse

What is the expected output?
The mouse pattern that is drawn on the canvas needs to be played back without delay, or missing patterns

What do you see instead?
There's more than 15 secs delay in drawing the pattern in playback; sometimes the playback just freezes

Please use labels and text to provide additional information.
This issue is not seen in Linux
 
Labels: -Pri-3 M-51 Pri-1
Owner: cpaulin@chromium.org
Status: Assigned (was: Untriaged)
cpaulin@ - can you investigate to see if this is a bug in the canvas capture functionality, as opposed to an issue with the test page itself?

Comment 2 by junov@chromium.org, Apr 26 2016

Cc: emir...@chromium.org

Comment 3 by srcv@chromium.org, Apr 26 2016

Labels: OS-Chrome
This issue is also observed in Chrome OS (M51 51.0.2704.26 / 8172.12.0 dev)
Cc: -emir...@chromium.org
Owner: emir...@chromium.org
Status: Started (was: Assigned)
Cc: emir...@chromium.org
 Issue 606943  has been merged into this issue.
I merged the issues as the root cause is the same. Alpha channel video playback and/or capture on Mac/Win is the problem. Setting [0] to false fixes the issues, but loses alpha channel.

[0] https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/media/canvas_capture_handler.cc&l=243
Owner: qiangchen@chromium.org
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d0a271c39cd8ba5292dd184acd6f7565d1f7348a

commit d0a271c39cd8ba5292dd184acd6f7565d1f7348a
Author: qiangchen <qiangchen@chromium.org>
Date: Fri Apr 29 21:02:37 2016

Bug Fix: Rendering stuck due to thread issue of WebMediaPlayerMSCompositor

We observed this when rendering canvas captured frame with alpha
channel. The underlying reason is that it would take a longer time
to process a frame with alpha channel, and thus when PutCurrentFrame()
is called, the |current_frame_| has already been changed, but
we still mark |current_frame_used| to be true, which will make
UpdateCurrentFrame() to return false, and thus chrome compositor
will stop updating.

This CL essentiall moves setting of |current_frame_used| back
to GetCurrentFrame().

BUG= 606890 

Review-Url: https://codereview.chromium.org/1930003002
Cr-Commit-Position: refs/heads/master@{#390757}

[modify] https://crrev.com/d0a271c39cd8ba5292dd184acd6f7565d1f7348a/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/d0a271c39cd8ba5292dd184acd6f7565d1f7348a/content/renderer/media/webmediaplayer_ms_compositor.cc
[modify] https://crrev.com/d0a271c39cd8ba5292dd184acd6f7565d1f7348a/content/renderer/media/webmediaplayer_ms_compositor.h
[modify] https://crrev.com/d0a271c39cd8ba5292dd184acd6f7565d1f7348a/content/renderer/media/webmediaplayer_ms_unittest.cc

Comment 9 by tkent@chromium.org, May 10 2016

Components: -Blink>CaptureStream Blink>MediaCaptureFromElement
Merge Blink>CaptureStream into Blink>MediaCaptureFromElement

Components: -Blink>MediaCaptureFromElement
Labels: Merge-Request-51
Verified the CL in #8 in M52 Canary 52.0.2730.0 (#392504) in Windows, Mac

Re: https://cdn.rawgit.com/uysalere/js-demos/master/canvascapture2.html
The mouse pattern that is drawn on the canvas is played back without delay, or missing patterns

Requesting a merge to M51 

Comment 11 by tin...@google.com, May 10 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Components: Blink>MediaCaptureFromElement
Project Member

Comment 13 by bugdroid1@chromium.org, May 10 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/565d9bab5faa26425576be279a02c0633aa060b5

commit 565d9bab5faa26425576be279a02c0633aa060b5
Author: qiangchen <qiangchen@chromium.org>
Date: Tue May 10 23:50:59 2016

Bug Fix: Rendering stuck due to thread issue of WebMediaPlayerMSCompositor

We observed this when rendering canvas captured frame with alpha
channel. The underlying reason is that it would take a longer time
to process a frame with alpha channel, and thus when PutCurrentFrame()
is called, the |current_frame_| has already been changed, but
we still mark |current_frame_used| to be true, which will make
UpdateCurrentFrame() to return false, and thus chrome compositor
will stop updating.

This CL essentiall moves setting of |current_frame_used| back
to GetCurrentFrame().

BUG= 606890 

Review-Url: https://codereview.chromium.org/1930003002
Cr-Commit-Position: refs/heads/master@{#390757}
(cherry picked from commit d0a271c39cd8ba5292dd184acd6f7565d1f7348a)

TBR=dalecurtis@chromium.org
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/1964253002
Cr-Commit-Position: refs/branch-heads/2704@{#488}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/565d9bab5faa26425576be279a02c0633aa060b5/content/renderer/media/webmediaplayer_ms.cc
[modify] https://crrev.com/565d9bab5faa26425576be279a02c0633aa060b5/content/renderer/media/webmediaplayer_ms_compositor.cc
[modify] https://crrev.com/565d9bab5faa26425576be279a02c0633aa060b5/content/renderer/media/webmediaplayer_ms_compositor.h
[modify] https://crrev.com/565d9bab5faa26425576be279a02c0633aa060b5/content/renderer/media/webmediaplayer_ms_unittest.cc

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified in M51 qualifying Beta 51.0.2704.47 

Re: https://cdn.rawgit.com/uysalere/js-demos/master/canvascapture2.html
The mouse pattern that is drawn on the canvas is played back without delay, or missing patterns

Components: -Blink>MediaCaptureFromElement Blink>MediaStream>CaptureFromElement
Renamed Blink>MediaCaptureFromElement to Blink>MediaStream>CaptureFromElement. Moving issues to the new component.

Sign in to add a comment