> On Sat, Sep 17, 2011 at 6:39 PM, Eric Perko <firstname.lastname@example.org> wrote:
>> Here's my thoughts on an official USB camera driver for Fuerte:
>> Camera driver base class (or parameter management helper)
>> I'd like to see some kind of shared parameter management code for
>> camera drivers (similar to what the camera_calibration_manager
>> does for calibration info and services).
>> This could allow all the camera drivers to share logic for whether to
>> have a parameter like exposure in auto, manual, query, etc. Something
>> along the lines of how camera1394 has both an "exposure" setting and
>> an "auto_exposure" setting that tells the driver how to interpret the
>> exposure setting the user set.
On Sun, Sep 18, 2011 at 11:58 AM, Jack O'Quin <email@example.com> wrote: > We should shoot for a common feature parameter API for both DC1394 and
> USB devices. That seems do-able and worthwhile, since that common code
> can profit significantly from several proposed dynamic_reconfigure
> I can work on packaging the existing camera1394 feature handling into
> a separate package, probably part of the image_common stack like
> camera_info_manager. Or, it could be included in the driver_common
> stack if that seems more appropriate.
> In either case, this task should be done soon to allow time for the
> USB driver to use it and for dynamic_reconfigure changes to be made.
This seemed like a good idea to Ken, Eric and me, so I spent some time
looking at the camera1394 code, trying to figure out how to factor out
a common service.
At first glace it looked OK. The code is simple enough. Here are the
It uses the Camera1394Config structure created by dynamic_reconfigure.
We could define a template implementation that would allow this type
to be configured for a different driver.
At a closer look, however, most of the existing code is heavily
aligned with the dc1394 structures, passing pointers to
dc1394feature_info_t. The USB camera interface is probably similar (I
don't know), but not identical. I suspect that the list of features to
support will differ somewhat, as well.
Then, there's code to query the device-dependent value limits of each
feature and set various modes and values. That uses dc1394. While the
USB interfaces are probably similar, I doubt they are identical.
In summary, the more I look the less common code I see. It may be
possible to create a common service for these kinds of parameters, but
that looks difficult. I suspect forking these files to the USB driver
and modifying them to work with the appropriate interfaces would
actually be easier to do and to maintain.
That leaves the problem of modifying both drivers as
dynamic_reconfigure gradually evolves better support for
device-dependent parameters. Despite that, I recommend forking the
code, not creating a common parameter package.
Please take a look for yourselves, and let me know if I am missing
something. It is clearly possible to write a shared service, but it
won't look much like the existing camera1394 implementation, and I
doubt the common service would end up doing very much.
This message was posted to the following mailing lists: