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

Issue 2193213003: ImageCapture: Queue up requests while device not ready (Closed)

Created:
4 years, 4 months ago by mcasas
Modified:
4 years, 4 months ago
Reviewers:
emircan, ncarter (slow)
CC:
chromium-reviews, posciak+watch_chromium.org, phoglund+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, tnakamura+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ImageCapture: Queue up requests while device not ready Calls to ImageCapture methods (e.g. takePhoto(), getPhotoCapabilities()) might be lost if racing against either: - device creation (in VideoCaptureManager) - actual device capture (in VideoCaptureDeviceAndroid) So, this CL: - adds a "queue" of image capture-related requests in VideoCaptureManager, where we store such requests _if_ the capture device is not ready (but it's known) -- these are served OnDeviceStarted(). - adds a similar "queue" of requests in VideoCaptureDeviceAndroid, where we store requests is the device has not captured anything yet (Android API needs the device up and running for many operations). - adds a takePhoto() content_browsertest for Android and FakeVideoCaptureDevice, factoring Js code appropriately. BUG=518807, 627537 TEST=added new content_browsertest: out/gn/bin/run_content_browsertests(_incremental) --gtest_filter=*WebRtcImageCaptureBrowserTest* or out/gn/content_browsertests --gtest_filter=*WebRtcImageCaptureBrowserTest* Committed: https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81 Cr-Commit-Position: refs/heads/master@{#409988}

Patch Set 1 : #

Total comments: 18

Patch Set 2 : emircan@s comments #

Patch Set 3 : reduce getUserMedia() resolution #

Patch Set 4 : Reduce requested getUserMedia() resolution #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -160 lines) Patch
M content/browser/renderer_host/media/video_capture_manager.h View 1 4 chunks +21 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 6 chunks +87 lines, -29 lines 0 comments Download
M content/browser/webrtc/webrtc_image_capture_browsertest.cc View 3 chunks +39 lines, -16 lines 0 comments Download
M content/test/data/media/image_capture_test.html View 1 2 3 3 chunks +56 lines, -16 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.h View 1 4 chunks +24 lines, -8 lines 0 comments Download
M media/capture/video/android/video_capture_device_android.cc View 1 9 chunks +169 lines, -83 lines 0 comments Download
M media/capture/video/fake_video_capture_device.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 53 (38 generated)
mcasas
emircan@ PTAL
4 years, 4 months ago (2016-08-02 23:50:04 UTC) #21
mcasas
emircan@ ping
4 years, 4 months ago (2016-08-03 17:12:54 UTC) #24
emircan
https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc#newcode522 content/browser/renderer_host/media/video_capture_manager.cc:522: DVLOG(3) << "OnDeviceStarted"; __func__ https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.h File content/browser/renderer_host/media/video_capture_manager.h (right): https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.h#newcode336 ...
4 years, 4 months ago (2016-08-03 21:55:54 UTC) #25
mcasas
PTAL (and discussion) https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc File content/browser/renderer_host/media/video_capture_manager.cc (right): https://codereview.chromium.org/2193213003/diff/220001/content/browser/renderer_host/media/video_capture_manager.cc#newcode522 content/browser/renderer_host/media/video_capture_manager.cc:522: DVLOG(3) << "OnDeviceStarted"; On 2016/08/03 21:55:54, ...
4 years, 4 months ago (2016-08-03 22:19:37 UTC) #27
emircan
lgtm https://codereview.chromium.org/2193213003/diff/220001/media/capture/video/android/video_capture_device_android.h File media/capture/video/android/video_capture_device_android.h (right): https://codereview.chromium.org/2193213003/diff/220001/media/capture/video/android/video_capture_device_android.h#newcode120 media/capture/video/android/video_capture_device_android.h:120: const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; On 2016/08/03 22:19:36, mcasas wrote: ...
4 years, 4 months ago (2016-08-03 22:52:59 UTC) #28
emircan
lgtm
4 years, 4 months ago (2016-08-03 22:53:00 UTC) #29
mcasas
nick@chromium.org: Please RS changes in content/browser/webrtc/webrtc_image_capture_browsertest.cc
4 years, 4 months ago (2016-08-03 23:31:49 UTC) #31
ncarter (slow)
lgtm
4 years, 4 months ago (2016-08-04 18:23:14 UTC) #32
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/2193213003/260001
4 years, 4 months ago (2016-08-04 18:25:59 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/116409)
4 years, 4 months ago (2016-08-04 20:08:46 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/116409)
4 years, 4 months ago (2016-08-04 20:09:50 UTC) #37
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/2193213003/380001
4 years, 4 months ago (2016-08-05 04:08:04 UTC) #48
commit-bot: I haz the power
Committed patchset #4 (id:380001)
4 years, 4 months ago (2016-08-05 04:11:30 UTC) #50
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/bd1933b1b5ee7a3557401fe79f63f38e3d5deb81 Cr-Commit-Position: refs/heads/master@{#409988}
4 years, 4 months ago (2016-08-05 04:13:37 UTC) #52
Guido Urdaneta
4 years, 4 months ago (2016-08-05 10:19:55 UTC) #53

Powered by Google App Engine
This is Rietveld 408576698