New issue
Advanced search Search tips

Issue 664364 link

Starred by 3 users

Issue metadata

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

Blocking:
issue 403462



Sign in to add a comment

Support hosting media mojo interfaces in different processes

Project Member Reported by xhw...@chromium.org, Nov 11 2016

Issue description

The current structure make it impossible to support hosting different media services in different processes. For example, on desktop we may want to host a video decoder service in the GPU process, but host a CDM service in a utility process. For another example, on Android, we want to host the audio decoder and CDM service in the GPU process, but host a Renderer service in the browser process.

This issue will track the design and implementation to solve this.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 3 2016

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

commit aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e
Author: xhwang <xhwang@chromium.org>
Date: Sat Dec 03 01:19:15 2016

media: Add MediaInterfaceProxy

The current structure make it impossible to support hosting different
media services in different processes. For example, on desktop we may
want to host a video decoder service in the GPU process, but host a CDM
service in a utility process. For another example, on Android, we want
to host the audio decoder and CDM service in the GPU process, but host
a Renderer service in the browser process.

This CL adds a MediaInterfaceProxy which will serve as a proxy (and
central place) to dispatch media interface creation calls and decide
where to forward the interface request to support the above use cases.

In this CL, MediaInterfaceProxy will always forward calls to the
existing media service we have. In future CLs, we'll add more logic to
support the more complicated use cases.

This also moves a lot of media logic into a helper class, which helps
make RenderFrameHostImpl cleaner.

BUG= 664364 
TEST=Maually tested.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

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

[modify] https://crrev.com/aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e/content/browser/BUILD.gn
[modify] https://crrev.com/aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e/content/browser/frame_host/render_frame_host_impl.h
[add] https://crrev.com/aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e/content/browser/media/media_interface_proxy.cc
[add] https://crrev.com/aa0bf6dcfa0c1e3e788d381cebee7e012a3a5a6e/content/browser/media/media_interface_proxy.h

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 14 2017

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

commit bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1
Author: Xiaohan Wang <xhwang@chromium.org>
Date: Fri Jul 14 23:55:16 2017

media: Support hosting mojo CDM in a standalone service

Currently when mojo CDM is enabled it is hosted in the MediaService
running in the process specified by "mojo_media_host". However, on
some platforms we need to run mojo CDM and other mojo media services in
different processes. For example, on desktop platforms, we want to run
mojo video decoder in the GPU process, but run the mojo CDM in the
utility process.

This CL adds a new build flag "enable_standalone_cdm_service". When
enabled, the mojo CDM service will be hosted in a standalone "cdm"
service running in the utility process. All other mojo media services
will sill be hosted in the "media" servie running in the process
specified by "mojo_media_host".

BUG= 664364 
TEST=Encrypted media browser tests using mojo CDM is still working.

Change-Id: I95be6e05adc9ebcff966b26958ef1d7becdfb487
Reviewed-on: https://chromium-review.googlesource.com/567172
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486947}
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/browser/media/media_interface_proxy.cc
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/browser/media/media_interface_proxy.h
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/common/service_manager/service_manager_connection_impl.cc
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/public/app/BUILD.gn
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/content/utility/utility_service_factory.cc
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/media/media_options.gni
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/media/mojo/BUILD.gn
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/media/mojo/interfaces/constants.mojom
[modify] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/media/mojo/services/BUILD.gn
[add] https://crrev.com/bc1f34b9be509f1404f0bb1ba1947614d5f0bcd1/media/mojo/services/cdm_manifest.json

Cc: julien.isorce@chromium.org

Comment 4 by xhw...@chromium.org, Sep 19 2017

Status: Fixed (was: Started)

Sign in to add a comment