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

Issue 877690 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

[Video Capture Service, ChromeOS] Inject GPU dependencies when starting service from external process

Project Member Reported by chfremer@chromium.org, Aug 24

Issue description

In order to enable accelerated JPEG decoding (and use of GpuMemoryBuffers in the context of ARC camera service on ChromeOS), the video capture service requires clients to inject certain GPU dependencies on service startup.

This is currently done in the main code path through which the Browser process connects to the video capture service.

https://cs.chromium.org/chromium/src/content/browser/renderer_host/media/service_video_capture_provider.cc?q=ServiceVideoCaptureProvider&g=0&l=151


A second code path was recently added here:
https://cs.chromium.org/chromium/src/chrome/browser/extensions/api/media_perception_private/media_perception_api_delegate_chromeos.cc?q=media_perception_api_delegate&dr=C&l=80

If the service is already/still running from a previous startup from the first call site, the GPU dependencies will already be injected. However, if it is not already/still running, the second call site will not inject anything, and accelerated JPEG decoding will not work.

 
A possible solution might be to have all video capture service starts go through a central shared code path offered by the Browser process.

Note, this solution may also help towards working out a solution for  bug 876892 .
Cc: mattfrazier@chromium.org weigua@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 29

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

commit 2517229df1c255626faa9309277b19bf79ad0b3d
Author: Christian Fremerey <chfremer@chromium.org>
Date: Wed Aug 29 22:05:29 2018

[Video Capture Service] Clarify and verify what happens if InjectGpuDependencies is not called

Bug:  877690 
Change-Id: Ideeb349eed59c8b2106894b6d4f9971f3ea702f8
Reviewed-on: https://chromium-review.googlesource.com/1194872
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587302}
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/public/mojom/device_factory_provider.mojom
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/device_factory_provider_test.cc
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/device_factory_provider_unittest.cc
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_descriptor_test.cc
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_descriptor_test.h
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_descriptor_unittest.cc
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_test.cc
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_test.h
[modify] https://crrev.com/2517229df1c255626faa9309277b19bf79ad0b3d/services/video_capture/test/fake_device_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 30

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

commit 3304d8fe7851816cabea29cad6af3dde741afc21
Author: Christian Fremerey <chfremer@chromium.org>
Date: Thu Aug 30 01:30:56 2018

[Video Capture Service] Inject GPU dependencies when starting service via extension

The video capture service requires GPU dependencies to be injected after startup
in order to enable accelerated MJPEG decoding. This CL adds this injection call
where the service is started from the media_perception_private extension.

The injected dependencies use classes that used to live in
content/browser/renderer_host/media. To be able to reuse them for the
extension, this CL moves them to a location that is accessible to both
usage sites, i.e. to content/browser/gpu with a public interface in
content/public/browser.

Bug:  877690 
Change-Id: If43ff7ff3f24a0aa17d441af5f5f605a894f374e
Reviewed-on: https://chromium-review.googlesource.com/1195657
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587377}
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/chrome/browser/extensions/api/media_perception_private/media_perception_api_delegate_chromeos.cc
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/BUILD.gn
[add] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/gpu/delegate_to_browser_gpu_service_accelerator_factory.cc
[rename] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/gpu/video_capture_dependencies.cc
[rename] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/gpu/video_capture_dependencies.h
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/browser/renderer_host/media/service_video_capture_provider.cc
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/public/browser/BUILD.gn
[modify] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/public/browser/DEPS
[add] https://crrev.com/3304d8fe7851816cabea29cad6af3dde741afc21/content/public/browser/delegate_to_browser_gpu_service_accelerator_factory.h

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 30

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

commit 8b2fa061e52c22b7d84be4244b34d90feb905224
Author: Matt Giuca <mgiuca@chromium.org>
Date: Thu Aug 30 04:17:00 2018

Revert "[Video Capture Service] Inject GPU dependencies when starting service via extension"

This reverts commit 3304d8fe7851816cabea29cad6af3dde741afc21.

Reason for revert: Compile failure (see  crbug.com/879034 ).

Original change's description:
> [Video Capture Service] Inject GPU dependencies when starting service via extension
> 
> The video capture service requires GPU dependencies to be injected after startup
> in order to enable accelerated MJPEG decoding. This CL adds this injection call
> where the service is started from the media_perception_private extension.
> 
> The injected dependencies use classes that used to live in
> content/browser/renderer_host/media. To be able to reuse them for the
> extension, this CL moves them to a location that is accessible to both
> usage sites, i.e. to content/browser/gpu with a public interface in
> content/public/browser.
> 
> Bug:  877690 
> Change-Id: If43ff7ff3f24a0aa17d441af5f5f605a894f374e
> Reviewed-on: https://chromium-review.googlesource.com/1195657
> Commit-Queue: Christian Fremerey <chfremer@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#587377}

TBR=jam@chromium.org,chfremer@chromium.org,lasoren@chromium.org

Change-Id: If23d44ff678a7b4a1b42ce5aa176f7f314c033e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  877690 ,  879034 
Reviewed-on: https://chromium-review.googlesource.com/1195304
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Commit-Queue: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587437}
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/chrome/browser/extensions/api/media_perception_private/media_perception_api_delegate_chromeos.cc
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/BUILD.gn
[delete] https://crrev.com/9d82fb5952beddd0786ea66506ef95cb641fa260/content/browser/gpu/delegate_to_browser_gpu_service_accelerator_factory.cc
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/renderer_host/media/service_video_capture_provider.cc
[rename] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/renderer_host/media/video_capture_dependencies.cc
[rename] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/browser/renderer_host/media/video_capture_dependencies.h
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/public/browser/BUILD.gn
[modify] https://crrev.com/8b2fa061e52c22b7d84be4244b34d90feb905224/content/public/browser/DEPS
[delete] https://crrev.com/9d82fb5952beddd0786ea66506ef95cb641fa260/content/public/browser/delegate_to_browser_gpu_service_accelerator_factory.h

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 6

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

commit ac94dafa79689901225dd29a38d882573ba5b456
Author: Christian Fremerey <chfremer@chromium.org>
Date: Thu Sep 06 19:27:24 2018

Reland [Video Capture Service] Inject GPU dependencies when starting service via extension

Patchset 1 is the reverted CL as previously reviewed.
Patchset 2 is the fix.

The reason for the revert was a linker error for component builds.
The fix is to add a missing CONTENT_EXPORT.

---

Original CL description:

The video capture service requires GPU dependencies to be injected after startup
in order to enable accelerated MJPEG decoding. This CL adds this injection call
where the service is started from the media_perception_private extension.

The injected dependencies use classes that used to live in
content/browser/renderer_host/media. To be able to reuse them for the
extension, this CL moves them to a location that is accessible to both
usage sites, i.e. to content/browser/gpu with a public interface in
content/public/browser.

TBR=jam@chromium.org

Bug:  877690 
Change-Id: Ibeb29361c762d8366f1433d918e8abead0a39173
Reviewed-on: https://chromium-review.googlesource.com/1208821
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589242}
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/chrome/browser/extensions/api/media_perception_private/media_perception_api_delegate_chromeos.cc
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/BUILD.gn
[add] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/gpu/delegate_to_browser_gpu_service_accelerator_factory.cc
[rename] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/gpu/video_capture_dependencies.cc
[rename] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/gpu/video_capture_dependencies.h
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/browser/renderer_host/media/service_video_capture_provider.cc
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/public/browser/BUILD.gn
[modify] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/public/browser/DEPS
[add] https://crrev.com/ac94dafa79689901225dd29a38d882573ba5b456/content/public/browser/delegate_to_browser_gpu_service_accelerator_factory.h

Status: Fixed (was: Assigned)
The fix is available in builds starting with  71.0.3545.0

Sign in to add a comment