Video format
This commit is contained in:
@@ -1118,6 +1118,22 @@ bool RuntimeHost::LoadConfig(std::string& error)
|
||||
}
|
||||
if (const JsonValue* enableExternalKeyingValue = configJson.find("enableExternalKeying"))
|
||||
mConfig.enableExternalKeying = enableExternalKeyingValue->asBoolean(mConfig.enableExternalKeying);
|
||||
if (const JsonValue* videoFormatValue = configJson.find("videoFormat"))
|
||||
{
|
||||
if (videoFormatValue->isString() && !videoFormatValue->asString().empty())
|
||||
mConfig.videoFormat = videoFormatValue->asString();
|
||||
}
|
||||
if (const JsonValue* frameRateValue = configJson.find("frameRate"))
|
||||
{
|
||||
if (frameRateValue->isString() && !frameRateValue->asString().empty())
|
||||
mConfig.frameRate = frameRateValue->asString();
|
||||
else if (frameRateValue->isNumber())
|
||||
{
|
||||
std::ostringstream stream;
|
||||
stream << frameRateValue->asNumber();
|
||||
mConfig.frameRate = stream.str();
|
||||
}
|
||||
}
|
||||
|
||||
mAutoReloadEnabled = mConfig.autoReload;
|
||||
return true;
|
||||
@@ -1398,6 +1414,8 @@ JsonValue RuntimeHost::BuildStateValue() const
|
||||
app.set("autoReload", JsonValue(mAutoReloadEnabled));
|
||||
app.set("maxTemporalHistoryFrames", JsonValue(static_cast<double>(mConfig.maxTemporalHistoryFrames)));
|
||||
app.set("enableExternalKeying", JsonValue(mConfig.enableExternalKeying));
|
||||
app.set("videoFormat", JsonValue(mConfig.videoFormat));
|
||||
app.set("frameRate", JsonValue(mConfig.frameRate));
|
||||
root.set("app", app);
|
||||
|
||||
JsonValue runtime = JsonValue::MakeObject();
|
||||
|
||||
Reference in New Issue
Block a user