Re: Is there any #ifdef way to detect the new v4l interface?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Duncan,

On Thu, 2002-12-12 at 06:12, Duncan Haldane wrote:
> The sourceforge version is full of preprocessor instructions such as,
> in particular (now)
> 
> #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19))
> #define NEW_V4L_INTERFACE 1
> #endif

BTTV simply created a new series: BTTV-0.8.x/0.9.x supports the 'new'
interface, BTTV-0.7.x supports the 'old' interface. That's what I did in
my driver too... Such compiler preprocessors only make it harder then it
needs to be, imho. I'd humbly suggest to keep two versions of the
driver, one for videodev1 (video_dev-based), one for videodev2
(file_ops-based). The new interface has so many advantages over the old
interface (possibilities for per-open() settings) that using
preprocessors would probably only limit yourself, or make the code
unreadable, or make a full dual driver, where half of the code stands
for the old interface and the other half stands for the new interface.

Just mho.

> Is there any way the preprocessor could detect
> the changed interface?  (or RedHat patching)

I don't think so.Never saw it.

HTH,

Ronald

-- 
Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
Linux Video/Multimedia developer





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux