18 #include <QSocketNotifier> 19 #include <QtCore/QString> 20 #include <QtCore/QVector> 21 #include <QtCore/QSocketNotifier> 22 #include <linux/videodev2.h> 24 using convertFunctionPtr = QVector<uint8_t> (*)(
const QVector<uint8_t> &realCameraShot,
int height,
int width);
42 const QVector<uint8_t> &
getFrame()
const {
return mFrame; }
57 int xioctl(
unsigned long request,
void *arg,
const QString &possibleError);
59 void startCapturing();
64 int mFileDescriptor = -1;
65 const QString fileDevicePath;
71 QVector<uint8_t> mFrame;
72 QVector<buffer> buffers;
73 v4l2_format mFormat {};
74 QSocketNotifier *mNotifier {};
Class for working with a camera on a TRIK controller.
Definition: trikV4l2VideoDevice.h:27
const QVector< uint8_t > & getFrame() const
Get last frame.
Definition: trikV4l2VideoDevice.h:42
void dataReady()
Signal when photo was made.
void readFrameData(int fd)
Read data from v4l2 buffers.
Definition: trikV4l2VideoDevice.cpp:358
~TrikV4l2VideoDevice()
Definition: trikV4l2VideoDevice.cpp:134
const QVector< uint8_t > & makeShot()
Make photo using TRIK camera.
Definition: trikV4l2VideoDevice.cpp:260
QVector< uint8_t >(*)(const QVector< uint8_t > &realCameraShot, int height, int width) convertFunctionPtr
Definition: trikV4l2VideoDevice.h:24
TrikV4l2VideoDevice(const QString &inputFile)
TRIK v4l2 video device constructor.
Definition: trikV4l2VideoDevice.cpp:127