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

Issue 641559 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 571155



Sign in to add a comment

content_browsertests fail with mojo cdm/renderer

Project Member Reported by alokp@chromium.org, Aug 26 2016

Issue description

Build content_browsertests with the gn args used by chromecast:
enable_mojo_media = true
enable_test_mojo_media_client = true
mojo_media_services = ["cdm, "renderer"]

A bunch of media-related tests fail. We need to make the tests pass or disable them before enabling mojo pipeline on cast_shell_linux bot.
 

Comment 1 by alokp@chromium.org, Aug 26 2016

MediaSessionVisibilityBrowserTest.* crash:

[95493:95493:0826/145536:4336039818372:FATAL:audio_output_stream_sink.cc(30)] Check failed: !started_. 
#0 0x7f8369f1b0fe base::debug::StackTrace::StackTrace()
#1 0x7f8369f8163f logging::LogMessage::~LogMessage()
#2 0x7f836fffa78e media::AudioOutputStreamSink::Initialize()
#3 0x7f836fec5718 media::AudioRendererImpl::OnAudioBufferStreamInitialized()

This is probably because Audio/VideoRendererSink is shared between multiple media elements. media_session.html creates 3 audio and 4 video elements.

The same issue also causes DCHECK(s) in AudioOutputResampler::Shutdown because Audio/VideoRendererSink is owned by MojoMediaClient, and does not get destroyed with media pipeline. We need to make one sink per renderer and move the ownership to MojoRendererService.
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 27 2016

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

commit 5a465d6e732dbe747db2c88507c84febe993f25d
Author: alokp <alokp@chromium.org>
Date: Fri Aug 26 23:56:41 2016

Disable EME playback tests when using mojo cdm/renderer.

BUG= 641559 

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

[modify] https://crrev.com/5a465d6e732dbe747db2c88507c84febe993f25d/content/browser/media/encrypted_media_browsertest.cc

Comment 3 by perkj@chromium.org, Aug 30 2016

Cc: mcasas@chromium.org niklase@chromium.org
niklase@chromium.org, mcasas@chromium.org -> are you aware of this work and what it means? I guess it will break capture from HtmlMediaElement.

Comment 4 by alokp@chromium.org, Aug 30 2016

mojo:media service is currently only enabled for chromecast where we never supported capture from HtmlMediaElement.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 30 2016

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

commit cacc2c351d60d27969aa4044ae0aa248a1a2eab8
Author: alokp <alokp@chromium.org>
Date: Tue Aug 30 18:25:45 2016

Disable WebRTC CaptureFromMediaElement test when using mojo renderer.

BUG= 641559 

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

[modify] https://crrev.com/cacc2c351d60d27969aa4044ae0aa248a1a2eab8/content/browser/webrtc/webrtc_capture_from_element_browsertest.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 30 2016

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

commit 791524fccfb1a5fc88aabd43664ab0ed064de513
Author: mcasas <mcasas@chromium.org>
Date: Tue Aug 30 20:36:01 2016

Cleanup: Disable WebRTC CaptureFromMediaElement test when using mojo renderer.

Cleanup after https://codereview.chromium.org/2283163002/

BUG= 641559 

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

[modify] https://crrev.com/791524fccfb1a5fc88aabd43664ab0ed064de513/content/browser/webrtc/webrtc_capture_from_element_browsertest.cc

Comment 7 by mcasas@chromium.org, Aug 30 2016

Components: Blink>MediaStream>CaptureFromElement
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 31 2016

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

commit 0b72920835dc60afae7c1f159ebc75008969de0f
Author: alokp <alokp@chromium.org>
Date: Tue Aug 30 23:59:19 2016

Move ownership of audio/video sinks to MojoRendererService.

Otherwise they get shared between multiple instances of Renderer
and do not get destroyed when media pipeline is destroyed.

BUG= 641559 

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

[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/chromecast/browser/media/cast_mojo_media_client.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/chromecast/browser/media/cast_mojo_media_client.h
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/clients/mojo_renderer_unittest.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/mojo_renderer_service.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/mojo_renderer_service.h
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/service_factory_impl.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/service_factory_impl.h
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/0b72920835dc60afae7c1f159ebc75008969de0f/media/mojo/services/test_mojo_media_client.h

Comment 9 by alokp@chromium.org, Sep 1 2016

Cc: jrumm...@chromium.org sande...@chromium.org dalecur...@chromium.org
The last two fixes are in CQ:
https://codereview.chromium.org/2298913002/
https://codereview.chromium.org/2295403002/

Ones those land content_browsertests will pass with "enable_test_mojo_media_client = true". Now I am not sure how to set this GN arg just for content_browsertests target.

Any objection to replacing DefaultMojoMediaClient with TestMojoMediaClient? I do not know why TestMojoMediaClient is not the default MojoMediaClient. The only test-related bits are AudioManager::CreateForTesting, which can be cleaned up.

xhwang@ is OOO.
dalecurtis/sandersd/jrummel: Thoughts?
No objection from me. I don't think the current breakdown of these subclasses is ideal, but you're not proposing a change there.
Project Member

Comment 11 by bugdroid1@chromium.org, Sep 1 2016

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

commit 8f75a9ee58edd4a3039d0fcc55f7325842afc448
Author: alokp <alokp@chromium.org>
Date: Thu Sep 01 01:47:01 2016

Destroy MojoMediaClient in MojoMediaApplication::OnStop().

Service::OnStop is not called when EmbeddedApplicationRunner is
deleted instead of stopping due to connection error. Deleting
MojoMediaClient in MojoMediaApplication::OnStop() allows
MojoMediaApplication to share cleanup code between the two
shutdown paths.

BUG= 641559 

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

[modify] https://crrev.com/8f75a9ee58edd4a3039d0fcc55f7325842afc448/media/mojo/services/mojo_media_application.cc
[modify] https://crrev.com/8f75a9ee58edd4a3039d0fcc55f7325842afc448/media/mojo/services/mojo_media_client.cc
[modify] https://crrev.com/8f75a9ee58edd4a3039d0fcc55f7325842afc448/media/mojo/services/mojo_media_client.h
[modify] https://crrev.com/8f75a9ee58edd4a3039d0fcc55f7325842afc448/media/mojo/services/test_mojo_media_client.cc
[modify] https://crrev.com/8f75a9ee58edd4a3039d0fcc55f7325842afc448/media/mojo/services/test_mojo_media_client.h

Project Member

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

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

commit 33e6e6b45312ce953f9c4c2521b12705c1fe0fba
Author: alokp <alokp@chromium.org>
Date: Thu Sep 01 02:54:07 2016

Garcefully handle glCreateGpuMemoryBufferImageCHROMIUM failure.

Creates a black frame instead of CHECKing if gl context is lost
or glCreateGpuMemoryBufferImageCHROMIUM fails. The default platform
for ozone (headless), used for content_browsertests on cast bots,
does not support Pixmaps.

BUG= 641559 

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

[modify] https://crrev.com/33e6e6b45312ce953f9c4c2521b12705c1fe0fba/media/renderers/video_overlay_factory.cc
[modify] https://crrev.com/33e6e6b45312ce953f9c4c2521b12705c1fe0fba/media/renderers/video_overlay_factory.h

Status: Fixed (was: Assigned)
Cc: -xhw...@chromium.org
Owner: xhw...@chromium.org
Status: Assigned (was: Fixed)
Assigning to xhwang@ so that we remember to fix and enable EME playback tests.
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 11 2016

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

commit 41f1d0e9e7bfab2aca601b12599e124ccc2def1e
Author: xhwang <xhwang@chromium.org>
Date: Fri Nov 11 08:16:36 2016

media: Enable encrypted media content browsertests when MojoCdm is used

Previously on Android (that uses MojoCdm by default), we enabled
External Clear Key support and used it in encrypted media content
browsertests.

This CL extends the coverage such that on all platforms that uses
MojoCdm, these tests will be enabled. For example, on cast_shell, both
MojoCdm and MojoRenderer are used.

Note that an AesDecryptor is running in the remote process (Gpu or
Browser). On Android, the Decryptor on the CDM is wrapped into a
MojoDecryptor, which is used by the DecryptingDemuxerStream in the
render process. On CastShell, the Decryptor on the CDM is used directly
by the Renderer running in the remote process.

TBR=mkwst@chromium.org,peter@chromium.org
BUG= 641559 
TEST=This CL enables existing tests on more platforms.

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

[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/content/browser/media/encrypted_media_browsertest.cc
[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/content/shell/BUILD.gn
[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/content/shell/renderer/shell_content_renderer_client.cc
[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/content/shell/renderer/shell_content_renderer_client.h
[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/media/base/key_systems.cc
[modify] https://crrev.com/41f1d0e9e7bfab2aca601b12599e124ccc2def1e/media/cdm/default_cdm_factory.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Nov 12 2016

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

commit 4155c401799a814cefc13f5b2589034dde217651
Author: xhwang <xhwang@chromium.org>
Date: Sat Nov 12 00:30:30 2016

media: Supports Clear Key key system for mojo CDM/Renderer combo

When both mojo CDM and mojo Renderer are used, do not create
AesDecryptor in the render process since it cannot be used by the remote
renderer. Instead, always create the mojo CDM, and the MojoMediaClient
can choose how to implement it.

BUG= 441957 , 641559 
TEST=This CL enables more tests.

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

[modify] https://crrev.com/4155c401799a814cefc13f5b2589034dde217651/content/browser/media/encrypted_media_browsertest.cc
[modify] https://crrev.com/4155c401799a814cefc13f5b2589034dde217651/media/mojo/clients/mojo_cdm_factory.cc

Status: Fixed (was: Assigned)
[bulk-edit : please ignore if not applicable]

Could you please set the correct milestone for this issue?

Sign in to add a comment