From: Hans de Goede <j.w.r.degoede@hhs.nl>
To: Markus Rechberger <mrechberger@gmail.com>
Cc: Andrea <audetto@tiscali.it>, video4linux-list@redhat.com
Subject: Re: prototype of a USB v4l2 driver? gspca?
Date: Thu, 17 Jul 2008 17:34:14 +0200 [thread overview]
Message-ID: <487F6676.1080403@hhs.nl> (raw)
In-Reply-To: <d9def9db0807170831h4fb42ba2v5a7ff38c762092f5@mail.gmail.com>
Markus Rechberger wrote:
> On Sun, Jul 13, 2008 at 9:29 PM, Hans de Goede <j.w.r.degoede@hhs.nl> wrote:
>> Andrea wrote:
>>> 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
>>>
>> Correct.
>>
>>> 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.
>>>
>> It isn't.
>>
>>> The a natural question that comes to me:
>>>
>>> Shouldn't many more USB drivers be implemented as subdrivers of gspca?
>> Yes that would remove lots of code duplication, but allas they were written
>> before gspca (version 2, as you currently see in mercurial) was around.
>>
>
> I guess quite a few drivers have extra features which might be missing
> in other usb based ones. Best is probably to have a look at all
> available ones and cherry pick the best ideas and easiest to
> understand parts.
> I think they are all on a certain level of quality right now.
>
> * gspca
> * uvcvideo
> * em28xx from mcentral.de
>
Well these 3 drivers (in case of gscpa driver group) target different classes
of hardware:
gspca: pre uvc webcams (and nothing more then that)
uvcvideo: uvc devices
em28xx: em28xx based devices, which can be dvd, analogtv, webcam, etc, etc.
Regards,
Hans
--
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-17 15:35 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 ` prototype of a USB v4l2 driver? gspca? Andrea
2008-07-13 19:29 ` Hans de Goede
2008-07-17 15:31 ` Markus Rechberger
2008-07-17 15:34 ` Hans de Goede [this message]
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=487F6676.1080403@hhs.nl \
--to=j.w.r.degoede@hhs.nl \
--cc=audetto@tiscali.it \
--cc=mrechberger@gmail.com \
--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