mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Updates on Grabber fps setting
This commit is contained in:
parent
1063eadec5
commit
79e9e0cf67
@ -147,10 +147,7 @@ private slots:
|
|||||||
void handleSourceRequest(hyperion::Components component, int hyperionInd, bool listen);
|
void handleSourceRequest(hyperion::Components component, int hyperionInd, bool listen);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Update Update capture rate
|
|
||||||
/// @param type interval between frames in milliseconds
|
|
||||||
///
|
|
||||||
void updateTimer(int interval);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -168,6 +165,11 @@ protected:
|
|||||||
///
|
///
|
||||||
virtual bool close() { return true; }
|
virtual bool close() { return true; }
|
||||||
|
|
||||||
|
/// @brief Update Update capture rate
|
||||||
|
/// @param type interval between frames in milliseconds
|
||||||
|
///
|
||||||
|
void updateTimer(int interval);
|
||||||
|
|
||||||
|
|
||||||
QString _grabberName;
|
QString _grabberName;
|
||||||
|
|
||||||
|
@ -74,9 +74,6 @@ void VideoWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument
|
|||||||
// Device resolution
|
// Device resolution
|
||||||
_grabber.setWidthHeight(obj["width"].toInt(0), obj["height"].toInt(0));
|
_grabber.setWidthHeight(obj["width"].toInt(0), obj["height"].toInt(0));
|
||||||
|
|
||||||
// Device framerate
|
|
||||||
_grabber.setFramerate(obj["fps"].toInt(15));
|
|
||||||
|
|
||||||
// Device encoding format
|
// Device encoding format
|
||||||
_grabber.setEncoding(obj["encoding"].toString("NO_CHANGE"));
|
_grabber.setEncoding(obj["encoding"].toString("NO_CHANGE"));
|
||||||
|
|
||||||
@ -124,6 +121,11 @@ void VideoWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument
|
|||||||
obj["blueSignalThreshold"].toDouble(0.0)/100.0,
|
obj["blueSignalThreshold"].toDouble(0.0)/100.0,
|
||||||
obj["noSignalCounterThreshold"].toInt(50));
|
obj["noSignalCounterThreshold"].toInt(50));
|
||||||
|
|
||||||
|
// Device framerate
|
||||||
|
_grabber.setFramerate(obj["fps"].toInt(15));
|
||||||
|
|
||||||
|
updateTimer(_ggrabber->getUpdateInterval());
|
||||||
|
|
||||||
// Reload the Grabber if any settings have been changed that require it
|
// Reload the Grabber if any settings have been changed that require it
|
||||||
_grabber.reload(getV4lGrabberState());
|
_grabber.reload(getV4lGrabberState());
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,8 @@ bool Grabber::setWidthHeight(int width, int height)
|
|||||||
|
|
||||||
bool Grabber::setFramerate(int fps)
|
bool Grabber::setFramerate(int fps)
|
||||||
{
|
{
|
||||||
|
Debug(_log,"Set new frames per second to: %i fps, current fps: %i", fps, _fps);
|
||||||
|
|
||||||
if((fps > 0) && (_fps != fps))
|
if((fps > 0) && (_fps != fps))
|
||||||
{
|
{
|
||||||
Info(_log,"Set new frames per second to: %i fps", fps);
|
Info(_log,"Set new frames per second to: %i fps", fps);
|
||||||
|
@ -186,7 +186,8 @@ void GrabberWrapper::updateTimer(int interval)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GrabberWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
|
void GrabberWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
|
||||||
{ if(type == settings::SYSTEMCAPTURE && !_grabberName.startsWith("V4L"))
|
{
|
||||||
|
if(type == settings::SYSTEMCAPTURE && !_grabberName.startsWith("V4L"))
|
||||||
{
|
{
|
||||||
// extract settings
|
// extract settings
|
||||||
const QJsonObject& obj = config.object();
|
const QJsonObject& obj = config.object();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user