since I originally wrote the v4l plugins, I guess I'm still kind of
maintainer of them. I'm now thinking of some kind of a rewrite. The
reason for this is that they don't have v4l2 support and I also want to
add BSD support in the long term (just like xawtv). The current plugins
don't really allow this.
So now the question: how to do it? There's three main ways of doing it:
1) use the '1 plugin 1 functionality' principle. this means I'd make a
v4lsrc plugin, a v4l2src plugin, a v4lmjpegsrc (for MJPEG/V4L1
extensions), a v4lmjpegsink, and another one for the BSDs. Probably
also, just like now, a parent v4lelement and a v4l2element which contain
the basic v4l2 functions but not the capture-specific functions. I could
then also make a v4l2compsrc/sink for compressed capture/playback in
2) Use the current layout (v4lelement, v4lsrc, v4lmjpegsrc,
v4lmjpegsink) and add the v4l2 calls and autodetect v4l1 or v4l2. Same
3) my preference: decrease the number of plugins to three: v4lelement,
v4lsrc and v4lsink (or maybe videoelement, videosrc, videosink - but
videosink's name is already taken so I'll use the 'v4l' stuff although
it doesn't cover the whole). v4lelement contains an autodetector for
v4l, v4l2 or BSD and has the basic functions (set frequency, set
norm/channel, overlay, open/close, etc.). v4lsrc receives a signal from
v4lelement if v4l1 or v4l2 or BSD has been chosen and adds capture
functions. This means v4l1, v4l1/MJPEG extensions, v4l2, v4l2
compressed, BSD. Via this signal, it chooses v4l1, v4l2 or BSD, and the
user can then set 'mjpeg-compressed' or 'uncompressed' capture. Later
on, if I ever get to know someone who has such a card, MPEG capture
would also be possible. v4lsink has v4l2 compressed playback and
v4l1/MJPEG playback These are currently the only known implementations
of v4l-playback that I know of. Here, also, everything is autodetected.
I prefer 3 because it makes application development easier (you simply
either use a v4lsrc or a v4lsink. The rest is automated inside the
plugin). The plugin itself will be harder, but that's only the fun part
of it :-). One of the problems with the current gst-record is that it
needs to switch dynamically from v4lsrc to v4lmjpegsrc to v4lelement and
back, and that's not a good thing, imho.
Anyway, opinions wanted. I've already started some work on the 'new'
gstv4lelement (the parent class) and will try to create a working plugin
Reason for me to do this is that the v4l2-driver for my capture card is
finally kind-of working, so I can now work on software for it. ;-).
Let me know your comments,
PS Christian, sorry the driver took so long, I'll now get back to
working on things that are "really important"(tm). ;-).
- /V\ | Ronald Bultje <rbultje@...>
- // \\ | Running: Linux-2.4.18-3 and OpenBSD 3.0
- /( )\ | http://ronald.bitfreak.net/