[mythtv-users] Removing v4l version 1 code from mythtv

Rajesh Krishna Balan rajesh at cs.cmu.edu
Wed Feb 2 11:02:00 UTC 2011


On 1/2/2011 8:36 AM, Rajesh Krishna Balan wrote:
> okay. looks like videodev.h is going away with linux 2.6.38. natty 
> just released a 2.6.38 pre kernel. That explains why videodev.h 
> disappeared.
>
> looks like the mythtv code will need to be tweaked a bit to just use 
> the videodev2.h structures. I'll play with it a bit more later and see 
> what I manage to do.

okay. I have something that compiles. What I did is basically comment 
out all the v4l1 code portions. Most of the code is nicely structured so 
that the v4l1 code and the v4l2 code are separate. The only file I had 
problems with is NuppleVideoRecorder.cpp.  Most of the code there seems 
to be v4l1 only. I ended up commenting out whole chunks of code to get 
mythtv to compile (I don't need Nupple support).

The only code change I had to do (beyond commenting out code) was this.

in libs/libmythtv/vbitext/vbi.c

< #define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOC_PRIVATE+8, int)  
// v4l2
---
 > #define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOCPRIVATE+8, int) 
// v4l1

I'm now testing to see if everything works. I'm not submitting a formal 
patch as the proper way to do this is to set a flag in configure if v4l1 
support is missing (but v4l2 is found) and then use that flag to set the 
proper IFDEFs in the various files. I don't have the required mythtv 
codebase experience to figure out the right way to do this configure and 
ifdef extension. The files that need changing are (all found in 
libs/libmythtv)

analogsignalmonitor.cpp
cardutil.cpp
NuppelVideoRecorder.cpp
v4lchannel.cpp
vbitext/vbi.cpp

along with the configure script

Raj


More information about the mythtv-users mailing list