[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6aafad18-13a2-ef45-48a1-1f094554af31@chromium.org>
Date: Tue, 11 Apr 2023 15:51:36 +0900
From: Max Staudt <mstaudt@...omium.org>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Hans Verkuil <hverkuil@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ricardo Ribalda <ribalda@...omium.org>,
Yunke Cao <yunkec@...omium.org>,
Tomasz Figa <tfiga@...omium.org>
Subject: Re: [PATCH v1] media: vivid: Add webcam parameter for (un)limited
bandwidth
Thank you Mauro for having a first look!
Questions below.
On 4/10/23 18:23, Mauro Carvalho Chehab wrote:
> IMO, instead of a parameter that just enables/disables the bandwidth
> limit, the best would be to have a parameter specifying the bandwidth
> (with 0 meaning unlimited).
>
> If not used, vivid would initialize it to dev->webcam_bandwidth_limit,
> so a read operation will show the current limit.
Up until now, the bandwidth limit is a rather arbitrary reduction of two
interval sizes per frame size.
How would you prefer to define a limited bandwidth in this parameter?
How would it affect the simulated camera, do you have a suggestion for a
formula from bandwidth to frame/interval sizes offered?
>> +/* Default: limited webcam bandwidth */
>> +static bool webcam_bandwidth_limit[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = true };
>> +module_param_array(webcam_bandwidth_limit, bool, NULL, 0444);
>
> I would also use 0666, to allow changing this on runtime.
I guess that's possible, though it would add complexity.
Currently we can ask for two instances, each with a different setting:
n_devs=2 webcam_bandwidth_limit=1,0
This creates /dev/video0 which is limited, and /dev/video4 which is
unlimited.
Maybe this already sufficiently covers the case you are looking for, and
we can keep the complexity low? A real webcam won't suddenly offer new
frame rates either...
Max
Powered by blists - more mailing lists