[mythtv] Moving V4L out of NuppelVideoRecorder?

Isaac Richards ijr at case.edu
Sun Jan 30 23:56:09 EST 2005


On Sunday 30 January 2005 11:41 pm, Colin Cross wrote:
> I'd like to make some changes to NuppelVideoRecorder.cpp and I figured
> I'd get some feedback before I start.  Currently NuppelVideoRecorder is
> a 3675 line monstrosity that deals with everything from setting up the
> capture card to calling the V4L ioctl to capture each frame to writing
> the final compressed data to the nuv file.
>
> My problem started when I tried testing out a dummy v4l2 video source
> module I wrote, and I found that mythtv was using V4L2 ioctls to set up
> the capture and then V4L ioctls to do the capture.  Since I only
> implemented V4L2, it failed.  So I figured I'd add proper V4L2 capture
> support, since the hard work to set up the card had already been
> implemented.  Then I realized that there was no way to add the support
> without adding an if (using-v4l2) to every line.  There was already some
> discussion about adding support for recording on a Mac, which would be
> even more of a mess.
>
> I want to create a VideoSource class, and then move all of the V4L
> specific code to a V4LVideoSource subclass.  That would allow someone
> else to implement the Mac recording as another sublcass of VideoSource.
> One question I have is how to implement V4L2.  Should it be part of the
> V4L class, since it will be substantially the same except for using
> slightly different ioctls, or should it be a separate class, since it
> would clutter up the V4L class with "if (using-v4l2)"?

I'm not really sure what you're talking about.  The DoV4L2() function in 
NVR.cpp sets up and captures video using v4l2 interfaces.

Isaac


More information about the mythtv-dev mailing list