mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
VType as QString
This commit is contained in:
parent
8ffe9cb8e2
commit
1a8e2ca27c
@ -85,7 +85,7 @@ public:
|
|||||||
virtual void setGrabberFixValues(
|
virtual void setGrabberFixValues(
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int vtype);
|
QString vtype);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief overwrite Grabber.h implementation
|
/// @brief overwrite Grabber.h implementation
|
||||||
@ -216,6 +216,6 @@ private:
|
|||||||
bool _grabberFixEnabled;
|
bool _grabberFixEnabled;
|
||||||
int _gf_width;
|
int _gf_width;
|
||||||
int _gf_height;
|
int _gf_height;
|
||||||
int _gf_vtype;
|
QString _gf_vtype;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -26,7 +26,7 @@ public slots:
|
|||||||
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
||||||
void setSignalDetectionEnable(bool enable);
|
void setSignalDetectionEnable(bool enable);
|
||||||
void setGrabberFixEnable(bool enable);
|
void setGrabberFixEnable(bool enable);
|
||||||
void setGrabberFixValues(int width, int height, string vtype);
|
void setGrabberFixValues(int width, int height, QString vtype);
|
||||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
virtual void setGrabberFixValues(
|
virtual void setGrabberFixValues(
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int vtype) {};
|
QString vtype) {};
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Apply device and videoStanded (used from v4l)
|
/// @brief Apply device and videoStanded (used from v4l)
|
||||||
|
@ -210,13 +210,13 @@ void V4L2Grabber::setSignalDetectionOffset(double horizontalMin, double vertical
|
|||||||
|
|
||||||
Info(_log, "Signal detection area set to: %f,%f x %f,%f", _x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max );
|
Info(_log, "Signal detection area set to: %f,%f x %f,%f", _x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max );
|
||||||
}
|
}
|
||||||
void V4L2Grabber::setGrabberFixValues(int width, int height, string vtype)
|
void V4L2Grabber::setGrabberFixValues(int width, int height, QString vtype)
|
||||||
{
|
{
|
||||||
_gf_width = width;
|
_gf_width = width;
|
||||||
_gf_height = height;
|
_gf_height = height;
|
||||||
_gf_vtype = vtype;
|
_gf_vtype = vtype;
|
||||||
|
|
||||||
Warning(_log, "Grabber fix set to: %d x %d, %s", _gf_width, _gf_height, _gf_vtype);
|
Warning(_log, "Grabber fix set to: %d x %d, %s", _gf_width, _gf_height, QSTRING_CSTR(_gf_vtype));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool V4L2Grabber::start()
|
bool V4L2Grabber::start()
|
||||||
@ -628,17 +628,30 @@ void V4L2Grabber::init_device(VideoStandard videoStandard, int input)
|
|||||||
fmtdesc.index++;
|
fmtdesc.index++;
|
||||||
}
|
}
|
||||||
// RPi Camera V1.3 & V2.1 workaround resolution and pixelformat
|
// RPi Camera V1.3 & V2.1 workaround resolution and pixelformat
|
||||||
Warning(_log, "vor _grabberFixEnabled");
|
|
||||||
if (_grabberFixEnabled) {
|
if (_grabberFixEnabled) {
|
||||||
Warning(_log, "_grabberFixEnabled");
|
max_width = _gf_width;
|
||||||
//if (max_width == 2592 || max_width == 3280) {
|
max_height = _gf_height;
|
||||||
max_width = _gf_width;
|
|
||||||
max_height = _gf_height;
|
QString pixformat = _gf_vtype.toLower();
|
||||||
|
if (pixformat == "yuyv")
|
||||||
|
{
|
||||||
|
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
|
||||||
|
}
|
||||||
|
else if (pixformat == "uyvy")
|
||||||
|
{
|
||||||
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
|
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
|
||||||
Warning(_log, "wxh %d x %d", max_width, max_height);
|
}
|
||||||
//}
|
else if (pixformat == "rgb32")
|
||||||
} else {
|
{
|
||||||
Warning(_log, "nicht _grabberFixEnabled");
|
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_RGB32;
|
||||||
|
}
|
||||||
|
#ifdef HAVE_JPEG
|
||||||
|
else if (pixformat == "mjpeg")
|
||||||
|
{
|
||||||
|
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_MJPEG;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Warning(_log, "wxh %d x %d, vtype %s", max_width, max_height, QSTRING_CSTR(pixformat.toUpper()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the settings
|
// set the settings
|
||||||
|
@ -52,7 +52,7 @@ void V4L2Wrapper::setSignalDetectionOffset(double verticalMin, double horizontal
|
|||||||
{
|
{
|
||||||
_grabber.setSignalDetectionOffset(verticalMin, horizontalMin, verticalMax, horizontalMax);
|
_grabber.setSignalDetectionOffset(verticalMin, horizontalMin, verticalMax, horizontalMax);
|
||||||
}
|
}
|
||||||
void V4L2Wrapper::setGrabberFixValues(int width, int height, string vtype)
|
void V4L2Wrapper::setGrabberFixValues(int width, int height, QString vtype)
|
||||||
{
|
{
|
||||||
_grabber.setGrabberFixValues(width, height, vtype);
|
_grabber.setGrabberFixValues(width, height, vtype);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user