#ifndef V4L2CAPTURE_H
#define V4L2CAPTURE_H

#include "V4l2Access.h"
#include "CCycleBuffer.h"

class V4l2Capture : public V4l2Access
{
protected:
    V4l2Capture(V4l2Device *device);

public:
    static V4l2Capture *create(const V4L2DeviceParameters & param, IoType iotype = V4l2Access::IOTYPE_MMAP);
    virtual ~V4l2Capture();

    size_t read(char *buffer, size_t bufferSize);
    int isReadable(timeval *tv);
    CCycleBuffer *m_capture_buf;
};

#endif // V4L2CAPTURE_H
