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)"?

Will this patch be accepted? Am I duplicating anyone's work? Can anyone think of a better name than VideoSource, since that name is already taken for channel lineups?
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to