v4l2 input device/norm - auto?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi experts,

continuing the never-stoppable work on a v4l2 driver (woohoo, I have
time), I was suddenly wondering whether the v4l2 spec allows 'automatic'
as norm and/or input. Since one can define his/her own norms/inputs,
it'd be easy as hell to set 'name' in v4l2_input to 'Automatic' and then
set type to -1 or so. Also, one could set std.name to 'Automatic' in
v4l2_enumstd, inputs/outputs both to 0 and std.numerator,
std.denominator and std.colorstandard all to 0.
Is this allowed or would you rather have the application do
autodetection by trial-and-error (i.e. set input from 0 to X and do
VIDIOC_G_TUNER until signal>0 in v4l2_tuner, and then change norm until
signal has the highest value), where the driver only does essential
tasks and doesn't have too many bells&whistles?

Oh, and lastly, I'm still wondering about what the values in
v4l2_cropcap are supposed to mean. Is anyone using this in his/her
driver or am I the first? http://www.thedirks.org/v4l2/ is silent about
this ioctl, and there aren't any helpful commands concerning this ioctl
in videodev2.h either.

struct v4l2_cropcap
{
	__u32	capability;
	int	min_x;
	int	min_y;
	int	max_x;
	int	max_y;
	int	default_left;
	int	default_top;
	int	default_right;
	int	default_bottom;
	__u32	reserved[2];
};

default_* are (I guess) the default values, i.e. the full frame for most
drivers (left=0,top=0,right=768/640/720,bottom=480/576), but what are
{min,max}_[xy]? Minimal and maximal width/height of the unscaled cropped
frame? Or something with x and y offset (what?)? and what am I supposed
to put into capability?

Thanks for any insights,

Ronald

-- 
-   .-.
-   /V\    | Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
-  // \\   | Running: Linux-2.4.18-3 and OpenBSD 3.0
- /(   )\  | http://ronald.bitfreak.net/
-  ^^-^^





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux