mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fix: Resolve enable state for v4l and screen capture (#728)
* fix: Resolve the enable state for v4l and screen capture * Use instance index instead of pointer * Second try * fix(QtGrabber): QScreen ownership * Remove v4l2 compState listener
This commit is contained in:
@@ -58,10 +58,6 @@ V4L2Grabber::V4L2Grabber(const QString & device
|
||||
setPixelDecimation(pixelDecimation);
|
||||
getV4Ldevices();
|
||||
|
||||
// connect componentStateChange only for build-in grabber
|
||||
if (HyperionIManager::HIMinstance)
|
||||
connect(this, &Grabber::compStateChangeRequest, this, &V4L2Grabber::compStateChangeRequest);
|
||||
|
||||
// init
|
||||
setDeviceVideoStandard(device, videoStandard);
|
||||
}
|
||||
@@ -1175,17 +1171,3 @@ void V4L2Grabber::setDeviceVideoStandard(QString device, VideoStandard videoStan
|
||||
if(started) start();
|
||||
}
|
||||
}
|
||||
|
||||
void V4L2Grabber::compStateChangeRequest(const hyperion::Components component, bool enable)
|
||||
{
|
||||
if (component == hyperion::COMP_V4L)
|
||||
{
|
||||
if (_initialized != enable)
|
||||
{
|
||||
if (enable)
|
||||
start();
|
||||
else
|
||||
stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,8 +23,6 @@ V4L2Wrapper::V4L2Wrapper(const QString &device,
|
||||
// Handle the image in the captured thread using a direct connection
|
||||
connect(&_grabber, SIGNAL(newFrame(Image<ColorRgb>)), this, SLOT(newFrame(Image<ColorRgb>)), Qt::DirectConnection);
|
||||
connect(&_grabber, SIGNAL(readError(const char*)), this, SLOT(readError(const char*)), Qt::DirectConnection);
|
||||
|
||||
connect(this, &V4L2Wrapper::compStateChangeRequest, _ggrabber, &Grabber::compStateChangeRequest);
|
||||
}
|
||||
|
||||
bool V4L2Wrapper::start()
|
||||
|
Reference in New Issue
Block a user