New issue
Advanced search Search tips

Issue 833449 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: ----
Type: Defect


Previous locations:
monorail:3701


Sign in to add a comment

Video Capture Win: ImageCapture.getPhotoCapabilities() does not call VideoCaptureDeviceMFWin::getPhotoState anymore

Reported by alaoui....@gmail.com, Apr 13 2018

Issue description

What 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.
 
hmm, I am not aware of any recent changes regarding getPhotoState.

What version did you test on?
Is this a regression, i.e. did it work on older versions?
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.
I am working on a CL that restricts getPhotoState deactivation to DirectShow implementation.
Project: chromium
Moved issue monorail:3701 to now be  issue chromium:833449 .
Project Member

Comment 6 by bugdroid1@chromium.org, 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

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.
If you are ok with that, how should I make the cherry pick? What are the branches to target?
Components: Blink>GetUserMedia
Labels: Merge-Request-67
Owner: chfremer@chromium.org
Status: Assigned (was: New)
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.
Ok I will abandon the CL for 66.
Thank you !
Pls apply appropriate OSs label. Thank you.
Label to apply is Windows. 
But I don’t have the permission to do it.
Labels: OS-Windows
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.
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.


Re #14:

I can’t test right now.
I will be able to test in 3 hours at best
Project Member

Comment 17 by sheriffbot@chromium.org, Apr 20 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
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
chfremer@, I just tested, I can confirm that it works as expected on Canary.
Project Member

Comment 19 by bugdroid1@chromium.org, Apr 20 2018

Labels: -merge-approved-67 merge-merged-3396
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

Status: Fixed (was: Assigned)
Cool. And the merge was also approved. I just checked in the CL, so this should be part of the next M67 release.
Labels: TE-Verified-M67 TE-Verified-67.0.3396.18
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..
833449-M67.PNG
325 KB View Download
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable?

Sign in to add a comment