Added video standards to JsonAPI output

This commit is contained in:
Paulchen-Panther
2021-02-07 14:30:36 +01:00
parent 2ff3c1155b
commit 4f81fbd2ab
8 changed files with 95 additions and 8 deletions

View File

@@ -508,6 +508,13 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
in["name"] = input.key();
in["inputIdx"] = input.value();
QJsonArray standards;
QList<VideoStandard> videoStandards = GrabberWrapper::getInstance()->getAvailableDeviceStandards(devicePath, input.value());
for (auto standard : videoStandards)
{
standards.append(VideoStandard2String(standard));
}
QJsonArray formats;
QStringList encodingFormats = GrabberWrapper::getInstance()->getAvailableEncodingFormats(devicePath, input.value());
for (auto encodingFormat : encodingFormats)
@@ -538,6 +545,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
formats.append(format);
}
in["standards"] = standards;
in["formats"] = formats;
video_inputs.append(in);
}