SVG5/sv4l2device.h
2025-10-12 13:55:56 +09:00

44 lines
690 B
C++

#ifndef SV4L2DEVICE_H
#define SV4L2DEVICE_H
#include <QObject>
#include <linux/videodev2.h>
struct LMSBBB_buffer{
void* start;
size_t length;
};
class SV4L2Device
{
public:
SV4L2Device();
virtual ~SV4L2Device();
static bool CheckDevice(QString strDevice);
int xioctl(int fh, unsigned long int request, void *arg);
int open_device(QString strDevice);
template<typename typeXX> void clear_memmory(typeXX* x);
void StreamOn();
protected:
static int m_nDeviceID;
int m_nVideoWidth;
int m_nVideoHeight;
v4l2_requestbuffers m_RequestBuffer;
v4l2_buffer m_Buffer;
LMSBBB_buffer* m_pBufferLMS;
};
#endif // SV4L2DEVICE_H