From: Andrea <audetto@tiscali.it>
To: Hans de Goede <j.w.r.degoede@hhs.nl>, video4linux-list@redhat.com
Subject: Re: prototype of a USB v4l2 driver? gspca?
Date: Sun, 13 Jul 2008 12:30:47 +0100 [thread overview]
Message-ID: <4879E767.4000103@tiscali.it> (raw)
In-Reply-To: <48790D29.1010404@hhs.nl>
Hans de Goede wrote:
> Andrea wrote:
>
> What kind of device, I think that for webcams you;re best using gspca,
> (now merged in mecurial), that handles all the usb specific stuff,
> buffer management, etc. In general it makes it easy to write a webcam
> driver allowing you to focus on the interaction with the cam, rather
> then having to worry about looking, usb specifics, buffer management etc.
>
I've had a quick look at the structure of gspca, and it seems that any subdriver should just (easier
to say that to do) fill one of those structures
struct sd_desc {
/* information */
const char *name; /* sub-driver name */
/* controls */
const struct ctrl *ctrls;
int nctrls;
/* operations */
cam_cf_op config; /* called on probe */
cam_op open; /* called on open */
cam_v_op start; /* called on stream on */
cam_v_op stopN; /* called on stream off - main alt */
cam_v_op stop0; /* called on stream off - alt 0 */
cam_v_op close; /* called on close */
cam_pkt_op pkt_scan;
/* optional operations */
cam_v_op dq_callback; /* called when a frame has been dequeued */
cam_jpg_op get_jcomp;
cam_jpg_op set_jcomp;
cam_qmnu_op querymenu;
};
1) providing ctrls (+ functions to handle settings)
2) functions to open/stream/close etc...
It does not seem too bad.
The a natural question that comes to me:
Shouldn't many more USB drivers be implemented as subdrivers of gspca?
But I guess there is much more I don't know under the apparent easy interface.
Andrea
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-07-13 11:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 19:40 prototype of a USB v4l2 driver? Andrea
2008-07-12 19:59 ` Hans de Goede
2008-07-13 8:39 ` Andrea
2008-07-13 11:30 ` Andrea [this message]
2008-07-13 19:29 ` prototype of a USB v4l2 driver? gspca? Hans de Goede
2008-07-17 15:31 ` Markus Rechberger
2008-07-17 15:34 ` Hans de Goede
2008-07-17 16:19 ` Markus Rechberger
2008-07-17 21:10 ` Andrea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4879E767.4000103@tiscali.it \
--to=audetto@tiscali.it \
--cc=j.w.r.degoede@hhs.nl \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox