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: Mon, 5 Nov 2001 09:52:45 +0100	[thread overview]
Message-ID: <20011105095245.B11001@bytesex.org> (raw)
In-Reply-To: <20011030105151.A4545@bytesex.org> <Pine.LNX.4.20.0111020951270.29256-100000@node2.localnet.net>
In-Reply-To: <Pine.LNX.4.20.0111020951270.29256-100000@node2.localnet.net>

> > 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.
> 
> You are starting to see my point. I want API flexible enough not to
> require #ifdef's each time a new feature is added. Driver is an
> application in it's own right. While 2.2=>2.4 change is ok, I really
> dislike such changes in the _stable_ kernel. 

Bad luck for you.  See Linus comments about binary-only modules +
compatibility.  There is simply no way around a ifdef here and there for
different kernel versions because a driver IMHO should be maintained for
both current stable and current hacker kernels.

> > I can't see why ioctls don't allow you to experiment.
> > 
> 
> Well, could you add then an ioctl to the current kernel so I can
> experiment with it ? I want it in the kernel headers so that the
> applications will compile whether or not the driver sourcecode has been
> installed. Nothing fancy, just an ioctl number something along
> 
> #define V4L_VLADIMIR_DERGACHEV_PRIVATE_IOCTL     _IOWR(....)
> 
> I'll take care of the structs ;)

Why this needs to be in the kernel?  Simply ship a copy of the header
file with both application and driver or require the driver being
installed to build the application.  Once you've worked out good,
working interfaces they can go into the kernel headers.  You don't need
that for experimental stuff.

> > 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).
> > 
> 
> Well, if it worked for you - good. I am not going that way,

If you want to put yourself in trouble ...

> the versioning
> issues alone are reason enough.

With argument passing using strings instead of structs you have the
versioning issues to, they only show up in other ways.  I'd expect it
becomes harder to debug because the failures are more subtile.  With a
obsolete ioctl struct you likely get back -EINVAL, which is quite
obvious if the application does sane error checking.  Or the application
doesn't even compile.  Both are IMHO much better than some stange
behaviour at runtime, which is the failure pattern I'd expect with API
changes when passing parameters using strings.

> > I doubt this is just a implementation issue.  I don't believe in AI.
> > 
> 
> :)))) There is a thin line between real intellegence and clever
> algorithm. My bet is that a clever algorithm will suffice.

I don't believe this until I've seen that working in real live.

> > > 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.
> > 
> 
> Ohh, bttv _is_ good. I only argue against v4l :)

But bttv supports the v4l(2) API.  If bttv can handle the poll without
much extra code, what exactly was the point in arguing against the
select support defined in the v4l2 API?

  Gerd


  reply	other threads:[~2001-11-05  9:41 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
2001-11-02 15:10           ` volodya
2001-11-05  8:52             ` Gerd Knorr [this message]
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=20011105095245.B11001@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).