Video Capture Win: ImageCapture.getPhotoCapabilities() does not call VideoCaptureDeviceMFWin::getPhotoState anymore
Reported by
alaoui....@gmail.com,
Apr 13 2018
|
|||||||
Issue descriptionWhat steps will reproduce the problem? (1) Enable MediaFoundation video capture on Windows 10 (2) Go to https://simpl.info/imagecapture/ (3) Open the console (4) Camera capabilities are logged What is the expected output? The logged |capabilities| object should contain the image width and height capabiltities. What do you see instead? capabilities.imageWidth and capabilities.imageHeight are null. Please provide any additional information below. After debug, it looks to me that VideoCaptureDeviceMFWin::getPhotoState is never called.
,
Apr 15 2018
I tested on master, so version 67. Yes it was working on version 66. I would say that the binding between ImageCapture.getPhotoCapabilities and getPhotoState does not work anymore.
,
Apr 15 2018
It looks like to be caused by [1] because of [2]. I don't understand why I was sure it was working ... [1] https://cs.chromium.org/chromium/src/content/browser/image_capture/image_capture_impl.cc?rcl=81c92b46714dc2433fd149897a4593036096de10&l=34 [2] https://bugs.chromium.org/p/chromium/issues/detail?id=722038
,
Apr 15 2018
I am working on a CL that restricts getPhotoState deactivation to DirectShow implementation.
,
Apr 16 2018
,
Apr 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a commit be9d1264fb2ebfdf9ee0b1307e56aad9b456187a Author: Réda Housni Alaoui <alaoui.rda@gmail.com> Date: Wed Apr 18 20:12:24 2018 [Video Capture Win] Enable GetPhotoState call for MediaFoundation implementation GetPhotoState was disabled on Windows because of issue 722038 . The issue only impacts the Video Capture DirectShow implementation. This prevents video stream from being stopped when InitializeVideoAndCameraControls fails on DirectShow and let GetPhotoState calls reach the MediaFoundation implementation. Bug: 833449 , 722038 Change-Id: Ifad3fa1ee86938ee62a306bbf5900bf645a5eb9f Reviewed-on: https://chromium-review.googlesource.com/1013697 Commit-Queue: Christian Fremerey <chfremer@chromium.org> Reviewed-by: Christian Fremerey <chfremer@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Cr-Commit-Position: refs/heads/master@{#551800} [modify] https://crrev.com/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a/content/browser/image_capture/image_capture_impl.cc [modify] https://crrev.com/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a/media/base/media_switches.cc [modify] https://crrev.com/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a/media/base/media_switches.h [modify] https://crrev.com/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a/media/capture/video/win/video_capture_device_win.cc [modify] https://crrev.com/be9d1264fb2ebfdf9ee0b1307e56aad9b456187a/media/capture/video/win/video_capture_device_win.h
,
Apr 18 2018
chfremer@, can we cherry pick the fix to version 66 and 67 please? Currently, in our application, our only way to know if the takePhoto() will return a very high resolution picture (mediafoundation vs directshow) is to trigger a getPhotoOptions() before taking the photo and check for the presence of capabilities.imageWidth and capabilities.imageHeight properties.
,
Apr 18 2018
If you are ok with that, how should I make the cherry pick? What are the branches to target?
,
Apr 19 2018
Oops, sorry I didn't realize that the second CL you sent was for a merge into M67. From my perspective, merging into M67 is reasonable and sufficiently safe. Merge into M66 is a bit risky and very unlikely to get approved, since M66 already hit stable. To be able to merge into M67, we first need to request approval. I'll request via setting the appropriate label.
,
Apr 19 2018
Ok I will abandon the CL for 66. Thank you !
,
Apr 19 2018
Pls apply appropriate OSs label. Thank you.
,
Apr 20 2018
Label to apply is Windows. But I don’t have the permission to do it.
,
Apr 20 2018
,
Apr 20 2018
alaoui.rda@ The commit from #6 should be part of canary builds starting with version 68.0.3400.0. Could you verify that on Win canary the issue is fixed and works as expected? I will also do a quick test on my Windows machine.
,
Apr 20 2018
I tried 68.0.3401.0 on my Windows 10 laptop. Tested for DirectShow and MediaFoundation both: https://googlechrome.github.io/samples/image-capture/grab-frame-take-photo.html and https://simpl.info/imagecapture/ (as described in the report for this crbug) Both worked fine.
,
Apr 20 2018
Re #14: I can’t test right now. I will be able to test in 3 hours at best
,
Apr 20 2018
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 20 2018
chfremer@, I just tested, I can confirm that it works as expected on Canary.
,
Apr 20 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cf6b1f00e622a21669eb808acf9d790d93d4198e commit cf6b1f00e622a21669eb808acf9d790d93d4198e Author: Réda Housni Alaoui <alaoui.rda@gmail.com> Date: Fri Apr 20 20:51:06 2018 [Video Capture Win] Enable GetPhotoState call for MediaFoundation implementation GetPhotoState was disabled on Windows because of issue 722038 . The issue only impacts the Video Capture DirectShow implementation. This prevents video stream from being stopped when InitializeVideoAndCameraControls fails on DirectShow and let GetPhotoState calls reach the MediaFoundation implementation. Bug: 833449 , 722038 Change-Id: Ifad3fa1ee86938ee62a306bbf5900bf645a5eb9f Reviewed-on: https://chromium-review.googlesource.com/1013697 Commit-Queue: Christian Fremerey <chfremer@chromium.org> Reviewed-by: Christian Fremerey <chfremer@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#551800}(cherry picked from commit be9d1264fb2ebfdf9ee0b1307e56aad9b456187a) Reviewed-on: https://chromium-review.googlesource.com/1017820 Cr-Commit-Position: refs/branch-heads/3396@{#173} Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428} [modify] https://crrev.com/cf6b1f00e622a21669eb808acf9d790d93d4198e/content/browser/image_capture/image_capture_impl.cc [modify] https://crrev.com/cf6b1f00e622a21669eb808acf9d790d93d4198e/media/base/media_switches.cc [modify] https://crrev.com/cf6b1f00e622a21669eb808acf9d790d93d4198e/media/base/media_switches.h [modify] https://crrev.com/cf6b1f00e622a21669eb808acf9d790d93d4198e/media/capture/video/win/video_capture_device_win.cc [modify] https://crrev.com/cf6b1f00e622a21669eb808acf9d790d93d4198e/media/capture/video/win/video_capture_device_win.h
,
Apr 20 2018
Cool. And the merge was also approved. I just checked in the CL, so this should be part of the next M67 release.
,
Apr 24 2018
Able to reproduce this issue on Windows 10 on the build without fix 65.0.3325.181 and the issue is fixed on the latest Dev 67.0.3396.18 as per the original comment. On navigating to the given link https://simpl.info/imagecapture/, Can observe the image width and height capabilities in Devtools -> Console. Attached is the screen shot for reference. Hence adding TE verified labels as the fix is working as intended. Thanks..
,
Jun 7 2018
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable? |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by chfremer@chromium.org
, Apr 13 2018