Re: Need clarification: Does the spec allow varying the video resolution sent to the sink per-frame?

In general, media capture recognizes that sources can change in size
dynamically.  See
https://w3c.github.io/mediacapture-main/#the-model-sources-sinks-constraints-and-settings

I don't think that there is any implicit assumption about limits on
this, so per frame changes are perfectly reasonable (in theory,
changes could be even more frequent than that, but you would never see
them).

Constraints do establish limits on this, but they can be as loose as
you like.  There is no need to fix a resolution (or frame rate, or
aspect ratio, etc...).

On 11 December 2015 at 08:39, Yuri Wiitala <miu@chromium.org> wrote:
> For screen capturing use cases, such as desktop or tab capture, the source
> content can be resized during a capture session (e.g., the user resizes
> their browser window).  However, a video stream whose resolution changes
> dynamically (i.e., possibly per-frame) at the sink is not discussed nor in
> the examples.
>
> From what I can tell, the spec seems to always assume one fixed video
> resolution is chosen at the beginning, within what is allowed by the
> MediaTrackConstraints.  Then, only by using applyConstraints() can a
> different fixed resolution be set (by evaluating the new constraints).
>
> Or, am I wrong, and because it's not explicitly stated, that there is NO
> assumption about video resolution to the sink being fixed?  For what it's
> worth, in the Chrome implementation today, the resolution can vary
> per-frame.
>
> Details on my use case: In Chrome, our tab capture implementation uses the
> min and max width and height constraints to produce video frames of any
> resolution within range.  It can also provide a fixed aspect ratio, with
> letter-boxing added where needed, or use any aspect ratio.
>
> In addition, video resolution can change, not just because of source content
> resizes, but also depending on system performance (CPU/GPU availability) and
> other external conditions (e.g., network bandwidth when remoting content).
> For example, on a low-end machine, video resolution will be decreased in
> order to maintain a smooth frame rate.  For further details, please see:
> https://www.chromium.org/developers/design-documents/auto-throttled-screen-capture-and-mirroring
>
> Thanks,
> Yuri
>

Received on Thursday, 10 December 2015 23:06:04 UTC