RE: ImageCapture function/flow relationship for setOptions()

Hello,

    "Devices may temporarily stop streaming data, reconfigure themselves
    with the appropriate photo settings, take the photo, and then resume
    streaming."

>So it seems that you use setOptions() to set a Setting...but this doesn't get applied until either takePhoto() or grabFrame() is called.

>So if I call setOptions() and then introspect the settings these won't be updated unless there's a takePhoto() or grabFrame() in between?

The key word is "may".  Implementations could do it differently, and I imagine if the camera is not integrated then it will be done differently.

My guess is for typical implementations is that the settings will be updated upon call of setOptions, but won't be applied until the photo is taken.  This seems to be the way it is done for many native camera API implementations.  For instance, you wouldn't necessarily want the flash to be active until the photo is taken.

> Are these additive? e.g. do multiple setOptions() combine together? 

setOptions() is with respect to the current camera settings.  The camera settings may also be manipulated directly by the end user at any time, depending on the implementation.

>Does takePhoto() and grabFrame() act like a commit and there's some sort of setOptions() buffer? 

This is an implementation issue.  Note also that the camera may or may not be integrated, so the actual image capture operation may be taking place on a peripheral device.

This specification has been reviewed several times over the past 3 years.  Also, this specification has to cover many different types of camera implementations, both integrated (like smart phones) and external (e.g. webcams). 

> Also, when I try to introspect the settings, this is where we really drift away from the Constrainable Pattern.

Capabilities is a (relatively) recent feature of gUM(), but you have a point.  It might be better to separate out the current photo settings from the current photo capabilities - the current spec tries to combine them.  If you have a suggestion, please feel free to put it forward.

-Giri

-----Original Message-----
From: Rob Manson [mailto:roBman@buildAR.com] 
Sent: Tuesday, March 31, 2015 12:24 PM
To: Mandyam, Giridhar
Cc: public-media-capture@w3.org; Kostiainen, Anssi; Hu, Ningxin
Subject: ImageCapture function/flow relationship for setOptions()

Hi Giri,

I also have a question about ImageCapture function/flow relationship for
setOptions()

In the definitions of takePhoto() and grabFrame() it says:

    "Devices may temporarily stop streaming data, reconfigure themselves
    with the appropriate photo settings, take the photo, and then resume
    streaming."

And in Example 2 it shows:

    captureDevice.setOptions({
      redEyeReductionSetting:true
    }).then(
      captureDevice.takePhoto().then(
        showPicture(blob),
        function(error){
          alert("Failed to take photo");
        }
      )
    );

So it seems that you use setOptions() to set a Setting...but this doesn't get applied until either takePhoto() or grabFrame() is called.

So if I call setOptions() and then introspect the settings these won't be updated unless there's a takePhoto() or grabFrame() in between?
Are these additive? e.g. do multiple setOptions() combine together? Does
takePhoto() and grabFrame() act like a commit and there's some sort of
setOptions() buffer? Or does any setOptions() simply override any previous? You can see my confusion here.

Also, when I try to introspect the settings, this is where we really drift away from the Constrainable Pattern.

    photoCapabilities of type PhotoCapabilities, readonly
        Describes current photo settings

Here the narrative of the spec is saying photoCapabilities will return "Capabilities" (which I would expect was the "range" of options this device supports).

But it's definition says it's returning a description of the "current photo settings".

In fact the crossing over here between the "current photo settings" and the MediaSettings[Item|Range] intended to define possible ranges or values leaves me very confused.

How would I find the set of ImageCapture capabilities this track/device supports? And how does that differ from finding the values that have actually been set?

roBman

Received on Friday, 3 April 2015 14:47:08 UTC