mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Have fps as int, fix height typo
This commit is contained in:
@@ -718,14 +718,14 @@ QMultiMap<int, int> MFGrabber::getAvailableDeviceResolutions(const QString& devi
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList MFGrabber::getAvailableDeviceFramerates(const QString& devicePath, const int& /*device input not used on windows*/, const PixelFormat& encFormat, const unsigned width, const unsigned height) const
|
||||
QIntList MFGrabber::getAvailableDeviceFramerates(const QString& devicePath, const int& /*device input not used on windows*/, const PixelFormat& encFormat, const unsigned width, const unsigned height) const
|
||||
{
|
||||
QStringList result = QStringList();
|
||||
QIntList result = QIntList();
|
||||
|
||||
for(int i = 0; i < _deviceProperties[devicePath].count(); ++i )
|
||||
{
|
||||
QString fps = QString::number(_deviceProperties[devicePath][i].numerator / _deviceProperties[devicePath][i].denominator);
|
||||
if(!result.contains(fps, Qt::CaseInsensitive) && _deviceProperties[devicePath][i].pf == encFormat && _deviceProperties[devicePath][i].width == width && _deviceProperties[devicePath][i].height == height)
|
||||
int fps = _deviceProperties[devicePath][i].numerator / _deviceProperties[devicePath][i].denominator;
|
||||
if(!result.contains(fps) && _deviceProperties[devicePath][i].pf == encFormat && _deviceProperties[devicePath][i].width == width && _deviceProperties[devicePath][i].height == height)
|
||||
result << fps;
|
||||
}
|
||||
|
||||
|
@@ -1467,9 +1467,9 @@ QMultiMap<int, int> V4L2Grabber::getAvailableDeviceResolutions(const QString& de
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList V4L2Grabber::getAvailableDeviceFramerates(const QString& devicePath, const int& deviceInput, const PixelFormat& encFormat, const unsigned width, const unsigned height) const
|
||||
QIntList V4L2Grabber::getAvailableDeviceFramerates(const QString& devicePath, const int& deviceInput, const PixelFormat& encFormat, const unsigned width, const unsigned height) const
|
||||
{
|
||||
QStringList result = QStringList();
|
||||
QIntList result = QIntList();
|
||||
|
||||
for(auto it = _deviceProperties.begin(); it != _deviceProperties.end(); ++it)
|
||||
if (it.key() == devicePath)
|
||||
@@ -1478,8 +1478,8 @@ QStringList V4L2Grabber::getAvailableDeviceFramerates(const QString& devicePath,
|
||||
for (auto enc = input.value().encodingFormats.begin(); enc != input.value().encodingFormats.end(); enc++)
|
||||
if(enc.key() == encFormat && enc.value().width == width && enc.value().height == height)
|
||||
for (auto fps = enc.value().framerates.begin(); fps != enc.value().framerates.end(); fps++)
|
||||
if(!result.contains(QString::number(*fps)))
|
||||
result << QString::number(*fps);
|
||||
if(!result.contains(*fps))
|
||||
result << *fps;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user