Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Issue 2735083002: [Mojo Video Capture] Add test coverage for accelerated jpeg decoding (Closed)

Created:
3 years, 9 months ago by chfremer
Modified:
3 years, 9 months ago
CC:
chromium-reviews, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, piman+watch_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Add test coverage for accelerated jpeg decoding This CL adds test cases to VideoCaptureBrowserTest that exercise the code path for accelerated jpeg decoding using a fake decode accelerator. * Add a FakeJpegDecodeAccelerator that can run in the GPU process and decodes jpeg frames in software using libyuv. * Add a command-line flag kUseFakeJpegDecodeAccelerator to enable the fake accelerator (and suppress any "real" ones if present). * Fix threading-related DCHECKs in GpuJpegDecodeAccelerator::Client to match what is actually happening. This is needed to make the new test cases pass. It also fixes issue 688184 [1]. This CL is part of the Mojo Video Capture work. For the bigger picture, see [2] CL14. BUG=584797, 688184 TEST= content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" [1] https://bugs.chromium.org/p/chromium/issues/detail?id=688184 [2] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2735083002 Cr-Commit-Position: refs/heads/master@{#458782} Committed: https://chromium.googlesource.com/chromium/src/+/ac2f201c499c2d65a5d43b6ce49d9af5b4520f99

Patch Set 1 #

Total comments: 26

Patch Set 2 : incorporate mcasas@'s suggestions #

Patch Set 3 : Removed OnStoppedUsingGpuDecode() event. #

Total comments: 12

Patch Set 4 : Incorporated suggestions from Patch Set 3 #

Total comments: 2

Patch Set 5 : Remove example code that accidentally slipped in with Patch Set 4 #

Total comments: 11

Patch Set 6 : Incorporated emircan@'s suggestions #

Total comments: 5

Patch Set 7 : Rebase to March 14 and Do not actually decode Jpeg frames #

Total comments: 2

Patch Set 8 : Rebase to March 15th, Remove #include jpeg_parser #

Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -40 lines) Patch
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_browsertest.cc View 1 2 3 4 5 6 chunks +39 lines, -11 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 4 5 6 7 4 chunks +30 lines, -11 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_event_handler.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc View 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_host.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_frame_receiver_on_io_thread.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_frame_receiver_on_io_thread.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/media_switches.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M media/base/media_switches.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M media/capture/video/video_capture_device_client.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/video_capture_device_client.cc View 1 2 3 3 chunks +9 lines, -4 lines 0 comments Download
M media/capture/video/video_capture_device_client_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/capture/video/video_frame_receiver.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/gpu/BUILD.gn View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A media/gpu/fake_jpeg_decode_accelerator.h View 1 2 3 4 5 1 chunk +69 lines, -0 lines 0 comments Download
A media/gpu/fake_jpeg_decode_accelerator.cc View 1 2 3 4 5 6 7 1 chunk +103 lines, -0 lines 0 comments Download
M media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc View 1 7 chunks +36 lines, -13 lines 0 comments Download
M services/video_capture/receiver_mojo_to_media_adapter.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M services/video_capture/receiver_mojo_to_media_adapter.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 81 (51 generated)
chfremer
mcasas@: PTAL miu@: PTAL emircan@: FYI
3 years, 9 months ago (2017-03-07 16:37:48 UTC) #13
mcasas
https://codereview.chromium.org/2735083002/diff/20001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2735083002/diff/20001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode221 content/browser/renderer_host/media/video_capture_browsertest.cc:221: })); Ugh waiting like this. Can't we somehow inject ...
3 years, 9 months ago (2017-03-07 19:39:38 UTC) #15
chfremer
posciak@: PTAL media/gpu/* emircan@: PTAL content/browser/renderer_host/media/*, media/capture/vide* mcasas@, miu@: FYI
3 years, 9 months ago (2017-03-07 19:39:50 UTC) #17
chfremer
On 2017/03/07 19:39:50, chfremer wrote: > posciak@: PTAL media/gpu/* > emircan@: PTAL content/browser/renderer_host/media/*, media/capture/vide* > ...
3 years, 9 months ago (2017-03-07 19:44:57 UTC) #18
miu
FYI: I added crbug 688184 to the BUG= line in the change description.
3 years, 9 months ago (2017-03-07 20:32:15 UTC) #20
miu
Moving myself to cc, since I don't really know how the accelerated jpeg decode code ...
3 years, 9 months ago (2017-03-07 20:35:48 UTC) #21
miu
3 years, 9 months ago (2017-03-07 20:36:02 UTC) #23
chfremer
mcasas@: PTAL https://codereview.chromium.org/2735083002/diff/20001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2735083002/diff/20001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode221 content/browser/renderer_host/media/video_capture_browsertest.cc:221: })); On 2017/03/07 19:39:37, mcasas wrote: > ...
3 years, 9 months ago (2017-03-07 22:30:39 UTC) #24
mcasas
Looking good, some comments/suggestions. https://codereview.chromium.org/2735083002/diff/60001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/2735083002/diff/60001/content/browser/renderer_host/media/video_capture_controller.cc#newcode481 content/browser/renderer_host/media/video_capture_controller.cc:481: } This code looks a ...
3 years, 9 months ago (2017-03-08 01:33:17 UTC) #29
chfremer
mcasas@: PTAL https://codereview.chromium.org/2735083002/diff/60001/content/browser/renderer_host/media/video_capture_controller.cc File content/browser/renderer_host/media/video_capture_controller.cc (right): https://codereview.chromium.org/2735083002/diff/60001/content/browser/renderer_host/media/video_capture_controller.cc#newcode481 content/browser/renderer_host/media/video_capture_controller.cc:481: } On 2017/03/08 01:33:17, mcasas wrote: > ...
3 years, 9 months ago (2017-03-08 18:58:08 UTC) #34
mcasas
lgtm with the removal below. https://codereview.chromium.org/2735083002/diff/80001/content/browser/renderer_host/media/video_capture_controller.h File content/browser/renderer_host/media/video_capture_controller.h (right): https://codereview.chromium.org/2735083002/diff/80001/content/browser/renderer_host/media/video_capture_controller.h#newcode182 content/browser/renderer_host/media/video_capture_controller.h:182: void PerformForClientsWithOpenSessionT(); If we ...
3 years, 9 months ago (2017-03-08 22:04:51 UTC) #37
chfremer
posciak@: PTAL https://codereview.chromium.org/2735083002/diff/80001/content/browser/renderer_host/media/video_capture_controller.h File content/browser/renderer_host/media/video_capture_controller.h (right): https://codereview.chromium.org/2735083002/diff/80001/content/browser/renderer_host/media/video_capture_controller.h#newcode182 content/browser/renderer_host/media/video_capture_controller.h:182: void PerformForClientsWithOpenSessionT(); On 2017/03/08 22:04:51, mcasas wrote: ...
3 years, 9 months ago (2017-03-08 22:21:22 UTC) #38
emircan
https://codereview.chromium.org/2735083002/diff/100001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2735083002/diff/100001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode250 content/browser/renderer_host/media/video_capture_browsertest.cc:250: EXPECT_FALSE(must_wait_for_gpu_decode_to_start); Since we expect to quit via |must_wait_for_gpu_decode_to_start| clause, ...
3 years, 9 months ago (2017-03-09 23:44:25 UTC) #43
chfremer
https://codereview.chromium.org/2735083002/diff/100001/content/browser/renderer_host/media/video_capture_browsertest.cc File content/browser/renderer_host/media/video_capture_browsertest.cc (right): https://codereview.chromium.org/2735083002/diff/100001/content/browser/renderer_host/media/video_capture_browsertest.cc#newcode250 content/browser/renderer_host/media/video_capture_browsertest.cc:250: EXPECT_FALSE(must_wait_for_gpu_decode_to_start); On 2017/03/09 23:44:25, emircan wrote: > Since we ...
3 years, 9 months ago (2017-03-10 18:30:49 UTC) #46
emircan
https://codereview.chromium.org/2735083002/diff/100001/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc File media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc (right): https://codereview.chromium.org/2735083002/diff/100001/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc#newcode68 media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc:68: std::move(io_task_runner)); On 2017/03/10 18:30:49, chfremer wrote: > On 2017/03/09 ...
3 years, 9 months ago (2017-03-13 17:47:38 UTC) #49
emircan
lgtm
3 years, 9 months ago (2017-03-13 17:47:58 UTC) #50
chfremer
sandersd@: PTAL media/*
3 years, 9 months ago (2017-03-13 22:28:38 UTC) #52
sandersd (OOO until July 31)
https://codereview.chromium.org/2735083002/diff/120001/media/capture/video/video_capture_device_client.cc File media/capture/video/video_capture_device_client.cc (right): https://codereview.chromium.org/2735083002/diff/120001/media/capture/video/video_capture_device_client.cc#newcode289 media/capture/video/video_capture_device_client.cc:289: std::move(on_started_using_gpu_cb_).Run(); Does std::move() actually do anything here? Is this ...
3 years, 9 months ago (2017-03-14 23:02:35 UTC) #53
chfremer
sandersd@: PTAL https://codereview.chromium.org/2735083002/diff/120001/media/capture/video/video_capture_device_client.cc File media/capture/video/video_capture_device_client.cc (right): https://codereview.chromium.org/2735083002/diff/120001/media/capture/video/video_capture_device_client.cc#newcode289 media/capture/video/video_capture_device_client.cc:289: std::move(on_started_using_gpu_cb_).Run(); On 2017/03/14 23:02:34, sandersd wrote: > ...
3 years, 9 months ago (2017-03-15 17:31:05 UTC) #54
sandersd (OOO until July 31)
https://codereview.chromium.org/2735083002/diff/120001/media/gpu/BUILD.gn File media/gpu/BUILD.gn (right): https://codereview.chromium.org/2735083002/diff/120001/media/gpu/BUILD.gn#newcode132 media/gpu/BUILD.gn:132: "fake_jpeg_decode_accelerator.h", On 2017/03/15 17:31:05, chfremer wrote: > On 2017/03/14 ...
3 years, 9 months ago (2017-03-15 17:38:13 UTC) #55
chfremer
sandersd@: PTAL As per offline discussion, we now do not actually decode the Jpeg frames. ...
3 years, 9 months ago (2017-03-15 18:51:53 UTC) #58
sandersd (OOO until July 31)
lgtm https://codereview.chromium.org/2735083002/diff/140001/media/gpu/fake_jpeg_decode_accelerator.cc File media/gpu/fake_jpeg_decode_accelerator.cc (right): https://codereview.chromium.org/2735083002/diff/140001/media/gpu/fake_jpeg_decode_accelerator.cc#newcode10 media/gpu/fake_jpeg_decode_accelerator.cc:10: #include "media/filters/jpeg_parser.h" Remove?
3 years, 9 months ago (2017-03-15 18:55:52 UTC) #61
chfremer
zmo@: PTAL content/browser/gpu/* https://codereview.chromium.org/2735083002/diff/140001/media/gpu/fake_jpeg_decode_accelerator.cc File media/gpu/fake_jpeg_decode_accelerator.cc (right): https://codereview.chromium.org/2735083002/diff/140001/media/gpu/fake_jpeg_decode_accelerator.cc#newcode10 media/gpu/fake_jpeg_decode_accelerator.cc:10: #include "media/filters/jpeg_parser.h" On 2017/03/15 18:55:52, sandersd ...
3 years, 9 months ago (2017-03-15 19:22:23 UTC) #65
chfremer
piman@: PTAL content/browser/gpu/gpu_process_host.cc
3 years, 9 months ago (2017-03-21 19:48:45 UTC) #69
piman
lgtm
3 years, 9 months ago (2017-03-21 21:26:42 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735083002/160001
3 years, 9 months ago (2017-03-21 21:28:49 UTC) #73
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/405102)
3 years, 9 months ago (2017-03-21 23:25:14 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735083002/160001
3 years, 9 months ago (2017-03-22 16:46:51 UTC) #77
commit-bot: I haz the power
Committed patchset #8 (id:160001) as https://chromium.googlesource.com/chromium/src/+/ac2f201c499c2d65a5d43b6ce49d9af5b4520f99
3 years, 9 months ago (2017-03-22 16:54:01 UTC) #80
chfremer
3 years, 9 months ago (2017-03-22 18:37:01 UTC) #81
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:160001) has been created in
https://codereview.chromium.org/2766343002/ by chfremer@chromium.org.

The reason for reverting is: Causes a ChromiumOS test failure, see
https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20C....

Powered by Google App Engine
This is Rietveld 408576698