linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@bytesex.org>
To: volodya@mindspring.com
Cc: video4linux-list@redhat.com, livid-gatos@linuxvideo.org,
	linux-kernel@vger.kernel.org
Subject: Re: [V4L] Re: [RFC] alternative kernel multimedia API
Date: Tue, 30 Oct 2001 10:51:51 +0100	[thread overview]
Message-ID: <20011030105151.A4545@bytesex.org> (raw)
In-Reply-To: <20011029134034.A9113@bytesex.org> <Pine.LNX.4.20.0110290807280.17469-100000@node2.localnet.net>
In-Reply-To: <Pine.LNX.4.20.0110290807280.17469-100000@node2.localnet.net>

> > > So I can distribute the driver and the application to use it and not
> > > depend on the kernel version.
> > 
> > The exported API must not depend on the kernel version.  If the API
> > changes in a way which isn't backward compatible, it is a kernel bug.
> 
> I already got a report from the user that in his kernel
> video_register_device has 2 arguments and not 3. This is pain to deal with
> in drivers distributed separately from kernel tree.

Internal kernel interfaces are another story, they are not fixed and are
allways subject to change and not limited to v4l.  See the major pci
subsystem changes from 2.2 => 2.4 for example.  The API visible to the
application matters, this must stay backward compatible.

> > I can't see why it is a problem to add a new header or new ioctls to
> > a existing header file.  I like it this way, because the kernel headers
> > with all the #defines and structs are providing at least a minimum of
> > documentation.  I do often read header files when programming stuff.
> > 
> 
> Because we don't know which interface is best until we experiment with
> it. And I can't experiment without people being able to test. And the
> easier it is to compile and install code the more testers (and developers
> !) we get.

I can't see why ioctls don't allow you to experiment.

> > Of course old applications don't know about the new stuff (neither the
> > temporary nor the final versions which make in into the official API
> > some day maybe).  But I don't see how your approach handles this better:
> > Applications still need to be hacked to use the new stuff ...
> > 
> 
> The way you write device specific appliacation is by including kernel
> headers. If the stuff we want is not there makes a lot trouble for
> installing and maintaining code.

No, it doesn't.  I never had trouble with xawtv.  I simply shipped a
private copy of videodev.h with the xawtv tarball (which allowed to
build it without hassle on 2.0.x systems which had no linux/videodev.h
yet).

> > You can't.  But I don't see why this is a issue:  The only thing a
> > application can handle easily are controls like contrast/hue where the
> > only thing a application needs to do is to map it to a GUI and let the
> > user understand and adjust stuff.  The other stuff has way to much
> > non-trivial dependences, I doubt a application can blindly use new
> > driver features.
> 
> Have you ever thought that the reason we only use these controls is
> because they are the only ones easy to implement now ?

I doubt this is just a implementation issue.  I don't believe in AI.

> > > > >   * can cause problems with different compilers
> > > > 
> > > > Then your compiler is buggy.
> > > 
> > > No, I may have simply used different compilers for the kernel and the
> > > application.
> > 
> > I doubt that.
> 
> You are kidding, aren't you ? Most distributions now come out with egcs
> compiler 1.1.x "recommended for compiling" kernels and something newer.

I doubt that this creates trouble, not that you might use different
compilers (I know RH ships or used to ship kgcc ...).

> > > What if the driver does not support counting dropped frames ?
> > 
> > -EINVAL or something like that.
> 
> But supports every other field.

Can't happen, there is VIDIOC_G_PERF only for this performance
monitoring ...

> > > What if there is a control with no min/max limits ?
> > 
> > Do you have a example?
> > 
> 
> Overlay color key - this is basically an RGB pixel value.

0x000000 => 0xffffff ?

> I would prefer minimum effort on the part of driver writer ;) At the
> moment all I see in bttv and my own code for select is looking on some
> already existing fields. Heck, the code is very similar to what needs to
> be checked for a blocking/non-blocking read. Why duplicate it ?

bttv's poll function is very short for exactly this reason.  Basically I
only have to call poll_wait with the (existing) wait queue which the IRQ
handler will wake up once the frame capture is finished.

> Also, v4l select will not work (as far as I understand) when the driver is
> using memory-mapped buffers.

v4l2 expects drivers to support select for the mmap() case too.

  Gerd

-- 
Netscape is unable to locate the server localhost:8000.
Please check the server name and try again.

  reply	other threads:[~2001-10-30  9:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <slrn9tiq3v.69j.kraxel@bytesex.org>
2001-10-26 15:19 ` [V4L] Re: [RFC] alternative kernel multimedia API volodya
2001-10-26 17:52 ` Gerd Knorr
2001-10-26 21:28   ` volodya
2001-10-29 12:40     ` Gerd Knorr
2001-10-29 13:21       ` volodya
2001-10-30  9:51         ` Gerd Knorr [this message]
2001-11-02 15:10           ` volodya
2001-11-05  8:52             ` Gerd Knorr
2001-11-05 20:56               ` volodya
2001-11-05 21:52                 ` Gerd Knorr
2001-11-06 15:41                   ` volodya
2001-11-06 16:45                     ` Gerd Knorr
2001-10-30 11:43         ` Mark McClelland
2001-11-04  8:39           ` Albert D. Cahalan
2001-11-04 17:44             ` volodya

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=20011030105151.A4545@bytesex.org \
    --to=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=livid-gatos@linuxvideo.org \
    --cc=video4linux-list@redhat.com \
    --cc=volodya@mindspring.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;
as well as URLs for NNTP newsgroup(s).