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

Issue 636064 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Cast Streaming should not support unsupported HW codecs

Project Member Reported by m...@chromium.org, Aug 9 2016

Issue description

There's been a bit of history on this topic, but to sum it all up: Often, there are cases on the various platforms and hardware configurations where a HW encoder is reported as supported by VEA::GetSupportedProfiles(), and then when Cast Streaming goes to initialize the encoder, that initialization fails. This is catastrophic, since at this point the codec has already been negotiated between sender and receiver and cannot be changed (i.e., no fallback to a SW encoder is possible).

We need to re-think how we will support HW encoders. Some OTOH options:

1. Only support HW encoders on CrOS (and maybe Mac?) and never on other platforms.

2. Don't trust VEA::GetSupportedProfiles(); or, if it returns true, we should try to initialize the encoder with max resolution/framerate/bitrate parameters before allowing it to be used by the Cast Streaming extension API.

 

Comment 1 by m...@chromium.org, Aug 9 2016

Related issue: bug 636036

Comment 2 by x...@chromium.org, Aug 9 2016

Currently H264 HW encoder is always disabled on Mac. https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_rtp_stream.cc?rcl=1470626560&l=435

Maybe we should do this for Windows too.
Components: Internals>Cast
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 12 2016

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

commit 48e00814143cfe9f019679ca1cf55693e15aca83
Author: emircan <emircan@chromium.org>
Date: Mon Sep 12 21:51:35 2016

Disable MediaFoundation HW encoder on Windows

Disable this feature due to reports where users get error:
[mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed.
https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298

BUG= 636064 

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

[modify] https://crrev.com/48e00814143cfe9f019679ca1cf55693e15aca83/chrome/renderer/media/cast_rtp_stream.cc

Labels: M-54 Merge-Request-54

Comment 7 by dimu@chromium.org, Sep 13 2016

Labels: -Merge-Request-54 Merge-Approved-54 Hotlist-Merge-Approved
Owner: emir...@chromium.org
Your change meets the bar and is auto-approved for M54 (branch: 2840)
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 14 2016

Labels: -merge-approved-54 merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/906dc96423883ee4ff295b87a55eac23298992d6

commit 906dc96423883ee4ff295b87a55eac23298992d6
Author: emircan <emircan@chromium.org>
Date: Wed Sep 14 03:43:17 2016

Disable MediaFoundation HW encoder on Windows

Disable this feature due to reports where users get error:
[mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed.
https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298

BUG= 636064 

Review-Url: https://codereview.chromium.org/2335743002
Cr-Commit-Position: refs/heads/master@{#418066}
(cherry picked from commit 48e00814143cfe9f019679ca1cf55693e15aca83)

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

Review-Url: https://codereview.chromium.org/2341443003
Cr-Commit-Position: refs/branch-heads/2840@{#354}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/906dc96423883ee4ff295b87a55eac23298992d6/chrome/renderer/media/cast_rtp_stream.cc

Comment 9 by mfo...@chromium.org, Sep 14 2016

It's not clear that HW encoders will ever be 100% reliable.  Maybe with the suggested fixes HW codecs will work 99.99% of the time, and we can call it good.

Otherwise, the long term fix would be to implement software fallback for Cast Streaming; modifying the protocol and receivers as necessary to support this scenario.

Comment 10 by m...@chromium.org, Sep 15 2016

Agreed. Cast Streaming needs a bunch of refactoring/interface changes to
support HW encoders correctly (e.g., a fallback-to-software mechanism). The
current design forces HW encoding to either work perfectly, or else the
entire product feature is broken. :(
Cc: emir...@chromium.org
Owner: ----
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 27 2016

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

commit 906dc96423883ee4ff295b87a55eac23298992d6
Author: emircan <emircan@chromium.org>
Date: Wed Sep 14 03:43:17 2016

Disable MediaFoundation HW encoder on Windows

Disable this feature due to reports where users get error:
[mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed.
https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298

BUG= 636064 

Review-Url: https://codereview.chromium.org/2335743002
Cr-Commit-Position: refs/heads/master@{#418066}
(cherry picked from commit 48e00814143cfe9f019679ca1cf55693e15aca83)

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

Review-Url: https://codereview.chromium.org/2341443003
Cr-Commit-Position: refs/branch-heads/2840@{#354}
Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607}

[modify] https://crrev.com/906dc96423883ee4ff295b87a55eac23298992d6/chrome/renderer/media/cast_rtp_stream.cc

Status: Fixed (was: Available)
This seems to be "fixed" by disabling HW codecs on Windows and Mac.

Adding software fallback would be a different feature request.  And may be lower priority once we ship media remoting.


Sign in to add a comment