9 #include <QSocketNotifier> 13 #include <utils/PixelFormat.h> 14 #include <hyperion/Grabber.h> 15 #include <grabber/VideoStandard.h> 16 #include <utils/Components.h> 34 VideoStandard videoStandard,
35 PixelFormat pixelFormat,
40 QRectF getSignalDetectionOffset()
42 return QRectF(_x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max);
45 bool getSignalDetectionEnabled() {
return _signalDetectionEnabled; }
64 double redSignalThreshold,
65 double greenSignalThreshold,
66 double blueSignalThreshold,
67 int noSignalCounterThreshold = 50);
76 double horizontalMax);
97 void readError(
const char* err);
103 void getV4Ldevices();
112 void init_read(
unsigned int buffer_size);
116 void init_userp(
unsigned int buffer_size);
118 void init_device(VideoStandard videoStandard,
int input);
120 void uninit_device();
122 void start_capturing();
124 void stop_capturing();
126 bool process_image(
const void *p,
int size);
128 void process_image(
const uint8_t *p,
int size);
130 int xioctl(
int request,
void *arg);
132 void throw_exception(
const QString & error)
134 Error(
_log,
"Throws error: %s", QSTRING_CSTR(error));
137 void throw_errno_exception(
const QString & error)
139 Error(
_log,
"Throws error nr: %s", QSTRING_CSTR(QString(error +
" error code " + QString::number(errno) +
", " + strerror(errno))));
160 jmp_buf setjmp_buffer;
163 static void errorHandler(j_common_ptr cInfo)
165 errorManager* mgr =
reinterpret_cast<errorManager*
>(cInfo->err);
166 longjmp(mgr->setjmp_buffer, 1);
169 static void outputHandler(j_common_ptr cInfo)
174 jpeg_decompress_struct* _decompress;
175 errorManager* _error;
180 std::map<QString,QString> _v4lDevices;
182 VideoStandard _videoStandard;
185 std::vector<buffer> _buffers;
187 PixelFormat _pixelFormat;
188 int _pixelDecimation;
193 int _noSignalCounterThreshold;
195 bool _signalDetectionEnabled;
196 bool _noSignalDetected;
197 int _noSignalCounter;
203 QSocketNotifier *_streamNotifier;
206 bool _deviceAutoDiscoverEnabled;
virtual void setSignalThreshold(double redSignalThreshold, double greenSignalThreshold, double blueSignalThreshold, int noSignalCounterThreshold=50)
overwrite Grabber.h implementation
Definition: V4L2Grabber.cpp:186
virtual void setDeviceVideoStandard(QString device, VideoStandard videoStandard)
overwrite Grabber.h implementation
Definition: V4L2Grabber.cpp:1119
virtual void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax)
overwrite Grabber.h implementation
Definition: V4L2Grabber.cpp:196
virtual void setPixelDecimation(int pixelDecimation)
set new PixelDecimation value to ImageResampler
Definition: V4L2Grabber.cpp:1109
Components
Enumeration of components in Hyperion.
Definition: Components.h:10
virtual void setSignalDetectionEnable(bool enable)
overwrite Grabber.h implementation
Definition: V4L2Grabber.cpp:1100
virtual void setWidthHeight()
overwrite Grabber.h implementation, as v4l doesn't use width/height
Definition: V4L2Grabber.h:52
The Grabber class is responsible to apply image resizes (with or without ImageResampler) Overwrite th...
Definition: Grabber.h:17
Logger * _log
logger instance
Definition: Grabber.h:119
Capture class for V4L2 devices.
Definition: V4L2Grabber.h:28
Plain-Old-Data structure containing the red-green-blue color specification.
Definition: ColorRgb.h:13