mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
commit
8ded8132e2
@ -24,6 +24,7 @@ public slots:
|
||||
void setCropping(int cropLeft, int cropRight, int cropTop, int cropBottom);
|
||||
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
||||
void setSignalDetectionEnable(bool enable);
|
||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
||||
|
||||
private slots:
|
||||
void newFrame(const Image<ColorRgb> & image);
|
||||
|
@ -54,9 +54,6 @@ V4L2Grabber::V4L2Grabber(const QString & device
|
||||
{
|
||||
setPixelDecimation(pixelDecimation);
|
||||
getV4Ldevices();
|
||||
|
||||
// init
|
||||
setDeviceVideoStandard(device, videoStandard);
|
||||
}
|
||||
|
||||
V4L2Grabber::~V4L2Grabber()
|
||||
|
@ -76,3 +76,8 @@ bool V4L2Wrapper::getSignalDetectionEnable()
|
||||
{
|
||||
return _grabber.getSignalDetectionEnabled();
|
||||
}
|
||||
|
||||
void V4L2Wrapper::setDeviceVideoStandard(QString device, VideoStandard videoStandard)
|
||||
{
|
||||
_grabber.setDeviceVideoStandard(device, videoStandard);
|
||||
}
|
||||
|
@ -376,6 +376,7 @@ void HyperionDaemon::handleSettingsUpdate(const settings::type& type, const QJso
|
||||
#ifdef ENABLE_V4L2
|
||||
|
||||
const QJsonObject & grabberConfig = v4lArray.at(idx).toObject();
|
||||
bool enableV4l = grabberConfig["enable"].toBool(true);
|
||||
|
||||
V4L2Wrapper* grabber = new V4L2Wrapper(
|
||||
grabberConfig["device"].toString("auto"),
|
||||
@ -403,6 +404,14 @@ void HyperionDaemon::handleSettingsUpdate(const settings::type& type, const QJso
|
||||
connect(this, &HyperionDaemon::videoMode, grabber, &V4L2Wrapper::setVideoMode);
|
||||
connect(this, &HyperionDaemon::settingsChanged, grabber, &V4L2Wrapper::handleSettingsUpdate);
|
||||
|
||||
if (enableV4l)
|
||||
{
|
||||
v4lEnableCount++;
|
||||
|
||||
// init
|
||||
grabber->setDeviceVideoStandard(grabberConfig["device"].toString("auto"), parseVideoStandard(grabberConfig["standard"].toString("no-change")));
|
||||
}
|
||||
|
||||
_v4l2Grabbers.push_back(grabber);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user