Populate getCapabilities() for cameras on Mac OS |
||||
Issue descriptionOn Mac OS, getCapabilities() in the Image Capture API (https://developers.google.com/web/updates/2016/12/imagecapture#capabilities_and_settings) returns an empty set of capabilities for webcams such as Logitech C920 and the built-in Facetime HD camera on MacBook Pros. AVFoundation does support some of the necessary capabilities, such as exposureMode. https://github.com/yellowdoge/cam_formats/blob/master/cam_formats_avf.mm demonstrates this. Chrome Version : 64.0.3282.186 OS Version: OS X 10.13.3 URLs (if applicable) : What steps will reproduce the problem? 1. With a Logitech C920 web cam connected, call MediaStreamTrack.getCapabilities() What is the expected result? A non-empty set of capabilities, including exposureMode What happens instead of that? An empty set of capabilities UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
,
Mar 1 2018
Assigning it to me since bringert@ is not a project member.
,
Mar 2 2018
I looked at the AVCaptureDevice docs (https://developer.apple.com/documentation/avfoundation/avcapturedevice?language=objc) to figure out which of the MediaTrackSettings (https://w3c.github.io/mediacapture-image/#mediatracksettings-section) could be implemented. DOMString whiteBalanceMode; double colorTemperature; Looks like these can be implemented with https://developer.apple.com/documentation/avfoundation/avcapturedevice/1386369-whitebalancemode?language=objc (iOS 4.0+, macOS 10.7+) and friends. DOMString exposureMode; https://developer.apple.com/documentation/avfoundation/avcapturedevice/1388858-exposuremode?language=objc (iOS 4.0+, macOS 10.7+) should be usable for setting exposureMode. In manual mode, https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624606-exposureduration?language=objc needs to be set to control exposure time. But it's not clear from https://w3c.github.io/mediacapture-image/#mediatracksettings-section how to actually control "manual" mode exposure. Maybe there needs to be an exposureTime member in MediaTrackSettings? DOMString focusMode; double focusDistance; See https://developer.apple.com/documentation/avfoundation/avcapturedevice/1389191-focusmode?language=objc (iOS 4.0+, macOS 10.7+) for setting focusMode focusDistance can be read with https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624643-lensposition?language=objc and set with https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624617-setfocusmodelockedwithlenspositi?language=objc but these APIS seem to be limited to iOS 8.0+ sequence<Point2D> pointsOfInterest; There is https://developer.apple.com/documentation/avfoundation/avcapturedevice/1385853-focuspointofinterest?language=objc and https://developer.apple.com/documentation/avfoundation/avcapturedevice/1388777-exposurepointofinterest?language=objc, but it's not clear from the MediaTrackSettings docs how to indicate what pointsOfInterest is for. I guess we'd just have to use MediaTrackSettings.pointsOfInterest to set both AVCaptureDevice focusPointOfInterest and AVCaptureDevice exposurePointOfInterest. double exposureCompensation; Probably https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624651-exposuretargetbias?language=objc (iOS 8.0+) and https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624637-setexposuretargetbias?language=objc (iOS 8.0+) double iso; https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624649-iso?language=objc (iOS 8.0+) double brightness; double contrast; double saturation; double sharpness; These seem like postprocessing options that aren't supported by AVCaptureDevice. Maybe that can be done with some other part of AVFoundation. double zoom; https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624611-videozoomfactor?language=objc (iOS 7.0+) boolean torch; See https://developer.apple.com/documentation/avfoundation/avcapturedevice/1386035-torchmode?language=objc (iOS 4.0+ macOS 10.7+)
,
Nov 28
Nothing on this issue is Google confidential. Adding allpublic to open access.
,
Dec 13
|
||||
►
Sign in to add a comment |
||||
Comment 1 by bringert@google.com
, Mar 1 20182.1 KB
2.1 KB View Download