#ifndef _V4L_HH_ #define _V4L_HH_ #include #include #include #include #include #include #include #include #include "videodev.h" #include "VideoIn.hh" class V4L : public VideoIn { public: V4L( char* videoName, char* deviceName, int channel, int videoMode, int videoFormat, int width, int height, int bitsPerPixel); virtual ~V4L (); ErrType read (Image* image); ErrType readAhead (); ErrType readDirect (Image* image); ErrType advance (); ErrType width (int newW); ErrType height (int newH); ErrType bitDepth (int newBitDepth); ErrType byteDepth (int newByteDepth); /** \fn Image* V4L::image (void) * \brief Returns a pointer to copy_ if the current image is buffered. * Returns direct_ otherwise. * \param none * \returns A pointer to the current frame (either copy_ or direct_) */ Image* image (void); private: int v4lfd; // the video device descriptor char* deviceName; // filename for the v4l device /* Grabbing stuff */ struct video_capability grabCapability; struct video_mmap grabBuffer; struct video_channel grabChannel; struct video_picture grabPicture; struct video_window grabWindow; int grabInput; int grabNorm; int grabFrameNumber; }; #endif /* _V4L_HH_ */