New issue
Advanced search Search tips

Issue 684766 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug-Regression

Blocking:
issue 685356
issue 685662



Sign in to add a comment

Old/erroneous frame feedback during tab capture

Project Member Reported by m...@chromium.org, Jan 24 2017

Issue description

I turned on verbose logging for video_capture_oracle.cc, and noticed a ton of errors related to "old frame" feedback (sample pasted below). It's most likely this is related to recent changes to the video capture stack.

Not sure whether this is actually causing a performance issue and/or frame feedback is being misreported. We need to root-cause why this is happening. Just in case it's either, I'm starting with bug with the ReleaseBlock-Stable flag to ensure we have a fix before M57 goes out. If it turns out the "old frame" feedback is harmless, we can remove the blocker and just patch for M58.

To repro:

1. Build chrome locally and run with command-line flags: --enable-logging=stderr --vmodule=video_capture_oracle=1

2. Add tabCapture example extension (go to chrome://extensions, load unpacked extension), found here: src/chrome/common/extensions/docs/examples/api/tabCapture/

3. Open a new tab, navigate to a video streaming site (like Youtube).

4. Click extension action icon to launch tab capture.

5. Play a video, to generate sustained capture frame flow.

Expected: No (or very few at initial start-up) "old frame" feedback log errors.

Observed: Lots of log spamming. Sample:

[7295:7295:0123/165252.518980:VERBOSE1:web_contents_video_capture_device.cc(688)] Computed physical capture size (1297x729) from view size (865x486).
[7295:7295:0123/165252.519033:VERBOSE1:thread_safe_capture_oracle.cc(184)] Source size changed to 1297x729
[7295:7329:0123/165252.654881:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165252.663934:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165252.683262:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165252.768070:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165252.802454:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165252.855251:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165252.886124:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165252.936594:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165252.962863:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.016071:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.050654:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.104329:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.131864:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.181502:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.222130:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.266032:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.298669:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.348409:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.394851:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.432473:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.465782:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.518038:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.550760:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.606998:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.635228:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.685100:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.717530:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.763309:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.796198:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7295:0123/165253.827591:VERBOSE1:video_capture_oracle.cc(149)] Content sampler now detects animation.
[7295:7329:0123/165253.850804:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.882245:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165253.934647:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165253.970243:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165254.018394:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165254.050426:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165254.102249:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165254.134499:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165254.182174:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165254.219768:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165254.267150:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165254.301909:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0
[7295:7329:0123/165254.353011:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #17
[7295:7329:0123/165254.387245:VERBOSE1:video_capture_oracle.cc(329)] Very old frame feedback being ignored: frame #0


 

Comment 1 by m...@chromium.org, Jan 24 2017

Owner: chfremer@chromium.org
Status: Assigned (was: Available)
chfremer: I'm thinking this is most likely due to the recent changes in the video capture stack. Can you take a look?

Comment 2 by m...@chromium.org, Jan 24 2017

Summary: Old/erroneous frame feedback during tab capture (was: Old/erroneous frame feedback from video capture stack)
Status: Started (was: Assigned)
I started investigating. Will report back here with any findings.
I found two things:

1.) I am unable to repro using the reported steps. @miu, could it be that you were also using Cast? I belive that currently only Cast generates frame feedback, and unless frame feedback is generated, VideoCaptureController does not send anything back to the producing device.

2.) Based on the example log output, it appears that the frame numbers do not get updated. And from looking at the code of VideoCaptureController, updating the frame_feedback_id is indeed missing, which is of course a problem (and a big oversight from my side).

Apparently my testing of the refactored feedback mechanism was insufficient. I am going to add a unit test for VideoCaptureController to ensure that it properly updates the frame feedback id. Once we verified the fix, we should then prepare a patch for M57.

The CL with the fix is up for review:
https://codereview.chromium.org/2659653002/

Comment 6 by x...@chromium.org, Jan 26 2017

Blocking: 685662

Comment 7 by x...@chromium.org, Jan 26 2017

Blocking: 685356
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 31 2017

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

commit 6ce92793fa6e71801c77b7770c66eeb76799df30
Author: chfremer <chfremer@chromium.org>
Date: Tue Jan 31 17:41:57 2017

Fix for  issue 684766  Old/erroneous frame feedback during tab capture

VideoCaptureController was not updating the |frame_feedback_id| when new frames
were arriving. This resulted in frame feedback being reported back to producing
devices being stuck with the |frame_feedback_id|s that came with the initial
sharing of the buffers.

The existing unit test did not catch this bug, because it tested the
feedback mechanism for a sequence of only 2 frames, which happens to be the same
as the number of buffers being shared, resulting in the issue not surfacing.

In addition to a fix, this CL adds a new test case that verifies that the
frame feedback mechanism works as intended for longer sequences of frames.

BUG= 684766 
TEST=content_unittests --gtest_filter="VideoCaptureControllerTest.*"

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

[modify] https://crrev.com/6ce92793fa6e71801c77b7770c66eeb76799df30/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/6ce92793fa6e71801c77b7770c66eeb76799df30/content/browser/renderer_host/media/video_capture_controller.h
[modify] https://crrev.com/6ce92793fa6e71801c77b7770c66eeb76799df30/content/browser/renderer_host/media/video_capture_controller_unittest.cc

Labels: TE-NeedsTriageHelp
I am currently waiting for confirmation that the fix was effective for issue 685356 and issue 685662. As soon as we have the confirmation, we should merge into M57.

Comment 11 by m...@chromium.org, Feb 7 2017

Labels: Merge-Request-57
The fix was confirmed on the Lenovo test lab machine. (The other Mac regression seems to be something else.)

Comment 12 by m...@chromium.org, Feb 7 2017

Status: Fixed (was: Started)

Comment 13 by m...@chromium.org, Feb 7 2017

Status: Verified (was: Fixed)
Project Member

Comment 14 by sheriffbot@chromium.org, Feb 7 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
I landed the merge into branch 2987.
Labels: -Merge-Approved-57 merge-merged-2987

Sign in to add a comment