Media Foundation for Clear: MF->default renderer fallback on error [chromium/src : main]

51 views
Skip to first unread message

Brian Beecher (Gerrit)

unread,
Feb 16, 2022, 6:50:53 PM2/16/22
to Dale Curtis, Xiaohan Wang, William Carr, Frank Li, patn...@microsoft.com, blink-...@chromium.org, chfreme...@chromium.org, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, Kumar Rajeev, Isuru Pathirana, David Springgay

Attention is currently required from: Dale Curtis, Xiaohan Wang, William Carr, Frank Li.

Brian Beecher would like Dale Curtis, Xiaohan Wang, William Carr and Frank Li to review this change.

View Change

Media Foundation for Clear: MF->default renderer fallback on error

This change implements a renderer fallback path for the MF for Clear
feature. With this change we'll fall back to the default Chromium
renderer if/when the Media Foundation renderer fails for clear playback.

Bug: 1295957
Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
---
M content/renderer/media/media_factory.cc
M media/base/pipeline_impl.cc
M media/base/pipeline_impl.h
M media/base/pipeline_impl_unittest.cc
M media/remoting/integration_test.cc
M media/renderers/win/media_engine_notify_impl.cc
M media/renderers/win/media_foundation_renderer_integration_test.cc
M media/test/pipeline_integration_test_base.cc
M media/test/pipeline_integration_test_base.h
M third_party/blink/renderer/core/exported/web_media_player_impl_unittest.cc
M third_party/blink/renderer/platform/media/web_media_player_impl.cc
M third_party/blink/renderer/platform/media/web_media_player_impl.h
12 files changed, 332 insertions(+), 91 deletions(-)


To view, visit change 3470178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
Gerrit-Change-Number: 3470178
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Frank Li <fra...@microsoft.com>
Gerrit-Reviewer: William Carr <wic...@microsoft.com>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: David Springgay <dasp...@microsoft.com>
Gerrit-CC: Isuru Pathirana <Isuru.P...@microsoft.com>
Gerrit-CC: Kumar Rajeev <ku...@microsoft.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Attention: William Carr <wic...@microsoft.com>
Gerrit-Attention: Frank Li <fra...@microsoft.com>
Gerrit-MessageType: newchange

Brian Beecher (Gerrit)

unread,
Feb 16, 2022, 6:51:00 PM2/16/22
to patn...@microsoft.com, blink-...@chromium.org, chfreme...@chromium.org, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, Dale Curtis, Xiaohan Wang, William Carr, Frank Li, Kumar Rajeev, Isuru Pathirana, David Springgay, chromium...@chromium.org, Rijubrata Bhaumik

Attention is currently required from: Dale Curtis, Xiaohan Wang, William Carr, Frank Li.

View Change

1 comment:

To view, visit change 3470178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
Gerrit-Change-Number: 3470178
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Frank Li <fra...@microsoft.com>
Gerrit-Reviewer: William Carr <wic...@microsoft.com>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: David Springgay <dasp...@microsoft.com>
Gerrit-CC: Isuru Pathirana <Isuru.P...@microsoft.com>
Gerrit-CC: Kumar Rajeev <ku...@microsoft.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Attention: William Carr <wic...@microsoft.com>
Gerrit-Attention: Frank Li <fra...@microsoft.com>
Gerrit-Comment-Date: Wed, 16 Feb 2022 23:50:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Xiaohan Wang (Gerrit)

unread,
Feb 16, 2022, 7:44:25 PM2/16/22
to Brian Beecher, patn...@microsoft.com, blink-...@chromium.org, chfreme...@chromium.org, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, Chromium LUCI CQ, Dale Curtis, Xiaohan Wang, William Carr, Frank Li, Kumar Rajeev, Isuru Pathirana, David Springgay, chromium...@chromium.org, Rijubrata Bhaumik

Attention is currently required from: Dale Curtis, Brian Beecher, William Carr, Frank Li.

View Change

6 comments:

  • Patchset:

    • Patch Set #1:

      Thanks! I didn't review all the details (tests). But I have some high level comments for discussion.

  • File media/base/pipeline_impl.h:

    • Patch Set #1, Line 35: absl::optional<RendererType>)>;

      Please comment on what the new parameters are and why we need them.

  • File media/base/pipeline_impl.cc:

    • Patch Set #1, Line 457:

      renderer_type_ && *renderer_type_ == RendererType::kMediaFoundation &&
      default_renderer_type &&
      *default_renderer_type == RendererType::kDefault

      This makes me a bit sad. If we really need the RendererType (see below), it seems to me we should add a media::Renderer::GetType() function instead of passing it through multiple layers. (If we decide to do it, it should be in a separate CL.)

    • Patch Set #1, Line 462: // or if playback fails the error will be propagated.

      hmm, I wonder whether we should check this earlier in all cases (and on all platforms). I don't see a case where we want to resume in an error state.... If so, then we don't need to check all the types...

      +dalecurtis for his insights on this as well

    • Patch Set #1, Line 618: !media::SupportMediaFoundationClearPlayback()) {

      Sorry I don't understand this logic. I though if the CDM requires MFR we should always create MFR? Or are you saying if media::SupportMediaFoundationClearPlayback() is true we MFR should already be the base renderer so we don't need to reset the renderer_type? If so, it'd be great to have some comments and even better a DCHECK...

  • File third_party/blink/renderer/platform/media/web_media_player_impl.cc:

To view, visit change 3470178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
Gerrit-Change-Number: 3470178
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Frank Li <fra...@microsoft.com>
Gerrit-Reviewer: William Carr <wic...@microsoft.com>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: David Springgay <dasp...@microsoft.com>
Gerrit-CC: Isuru Pathirana <Isuru.P...@microsoft.com>
Gerrit-CC: Kumar Rajeev <ku...@microsoft.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Brian Beecher <brb...@microsoft.com>
Gerrit-Attention: William Carr <wic...@microsoft.com>
Gerrit-Attention: Frank Li <fra...@microsoft.com>
Gerrit-Comment-Date: Thu, 17 Feb 2022 00:44:12 +0000

Dale Curtis (Gerrit)

unread,
Feb 16, 2022, 7:53:52 PM2/16/22
to Brian Beecher, patn...@microsoft.com, blink-...@chromium.org, chfreme...@chromium.org, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, Chromium LUCI CQ, Xiaohan Wang, William Carr, Frank Li, Kumar Rajeev, Isuru Pathirana, David Springgay, chromium...@chromium.org, Rijubrata Bhaumik

Attention is currently required from: Brian Beecher, Xiaohan Wang, William Carr, Frank Li.

View Change

2 comments:

  • File media/base/pipeline_impl.cc:

    • Patch Set #1, Line 457:

      renderer_type_ && *renderer_type_ == RendererType::kMediaFoundation &&
      default_renderer_type &&
      *default_renderer_type == RendererType::kDefault

    • This makes me a bit sad. […]

      Yes, I agree we should growing any more code under BUILDFLAG here. Even the section below I think should be removed in favor of adding necessary functions on all platforms.

    • Patch Set #1, Line 462: // or if playback fails the error will be propagated.

      hmm, I wonder whether we should check this earlier in all cases (and on all platforms). […]

    • I don't think we want to resume from error state on any platform. I don't think this should be controlled at this layer, but instead the renderer factory selector.

To view, visit change 3470178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
Gerrit-Change-Number: 3470178
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Frank Li <fra...@microsoft.com>
Gerrit-Reviewer: William Carr <wic...@microsoft.com>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: David Springgay <dasp...@microsoft.com>
Gerrit-CC: Isuru Pathirana <Isuru.P...@microsoft.com>
Gerrit-CC: Kumar Rajeev <ku...@microsoft.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: Brian Beecher <brb...@microsoft.com>
Gerrit-Attention: Xiaohan Wang <xhw...@chromium.org>
Gerrit-Attention: William Carr <wic...@microsoft.com>
Gerrit-Attention: Frank Li <fra...@microsoft.com>
Gerrit-Comment-Date: Thu, 17 Feb 2022 00:53:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Xiaohan Wang <xhw...@chromium.org>
Gerrit-MessageType: comment

Xiaohan Wang (Gerrit)

unread,
Feb 16, 2022, 8:16:55 PM2/16/22
to Brian Beecher, patn...@microsoft.com, blink-...@chromium.org, chfreme...@chromium.org, erickun...@chromium.org, feature-me...@chromium.org, jophba...@chromium.org, kinuko...@chromium.org, mfoltz...@chromium.org, poscia...@chromium.org, Chromium LUCI CQ, Dale Curtis, Xiaohan Wang, William Carr, Frank Li, Kumar Rajeev, Isuru Pathirana, David Springgay, chromium...@chromium.org, Rijubrata Bhaumik

Attention is currently required from: Dale Curtis, Brian Beecher, William Carr, Frank Li.

View Change

1 comment:

  • File media/base/pipeline_impl.cc:

    • Patch Set #1, Line 457:

      renderer_type_ && *renderer_type_ == RendererType::kMediaFoundation &&
      default_renderer_type &&
      *default_renderer_type == RendererType::kDefault

    • Yes, I agree we should growing any more code under BUILDFLAG here. […]

      Thinking more on this, you could also just add something like media::Renderer::ShouldFallbackToDefaultRendererOnError(), which will by default return false so most Render impls don't need to override it. Then MediaFoundationRendererClient can override based on whether `cdm_context_` is set or not. WDYT?

To view, visit change 3470178. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb9194e108ec5388e003d811b1dfeaeca674f33e
Gerrit-Change-Number: 3470178
Gerrit-PatchSet: 1
Gerrit-Owner: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Brian Beecher <brb...@microsoft.com>
Gerrit-Reviewer: Dale Curtis <dalec...@chromium.org>
Gerrit-Reviewer: Frank Li <fra...@microsoft.com>
Gerrit-Reviewer: William Carr <wic...@microsoft.com>
Gerrit-Reviewer: Xiaohan Wang <xhw...@chromium.org>
Gerrit-CC: David Springgay <dasp...@microsoft.com>
Gerrit-CC: Isuru Pathirana <Isuru.P...@microsoft.com>
Gerrit-CC: Kumar Rajeev <ku...@microsoft.com>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: Dale Curtis <dalec...@chromium.org>
Gerrit-Attention: Brian Beecher <brb...@microsoft.com>
Gerrit-Attention: William Carr <wic...@microsoft.com>
Gerrit-Attention: Frank Li <fra...@microsoft.com>
Gerrit-Comment-Date: Thu, 17 Feb 2022 01:16:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Dale Curtis <dalec...@chromium.org>
Reply all
Reply to author
Forward
0 new messages