Am Mittwoch, 23. Oktober 2002 11:24 schrieb Joe Burks: > At 10:34 AM 10/23/2002 +0200, Oliver Neukum wrote: > >Why should shutter speed setting be different from, eg. frame size? > >They should be settable by the same method. > > Agreed. And in V4L2 they can be. Technically it could be set through a > vicam-specific ioctl, but if that were the only way to set shutter speed, > the reality is nobody would be able to set it. No V4L app would know about > my custom ioctl, and even if I wrote a custom app to allow shutter tweaking
Why would teaching applications your ioctl be harder than teaching them your customs procfs or driverfs file? From a coding point of view an ioctl on a file you do a lot of ioctls on anyway is far simpler than deducing a path to another file, opening it and writing an ASCII value into it. Which is racy by the way, unless you revalidate the file. > the lead time for people to get the app in their distribution is fairly > long. You are offering a nonstandard feature. It needs special support in any case. Those who can rig their own shell scripts can compile a simple C programm, too. > >Secondly, vicam like most V4L devices, implements exclusive open. > >A proc or driverfs file to change a setting violates that model. > > The risk being run here (root might change camuser's shutter speed on him / > disconnect at just the wrong time) is less than the benefit (the shutter > speed can be changed). No, most emphatically not. Risking data corruption due to accessing memory already freed is absolutely unacceptable, regardless of the features you gain. If you do this proc iopath, you do proper locking with all consequences. It's painful but necessary. > I believe the exclusive open model is required by V4L. One of the benefits > of v4l2 is that it allows multiple opens. While that is true, V4L2 is not here yet and won't come into 2.4. So I suggest that you leave out the shutter speed setting until it is clear whether V4L2 is in 2.6/3.0. For 2.4, IMHO you swallow the toad, define an ioctl and get on with life. Regards Oliver ------------------------------------------------------- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel