Load Json::Value into this object
| 205 | |
| 206 | // Load Json::Value into this object |
| 207 | void Mask::SetJsonValue(const Json::Value root) { |
| 208 | Json::Value normalized_root = root; |
| 209 | // Legacy compatibility: keep accepting "reader" on Mask effects. |
| 210 | if (!normalized_root["reader"].isNull() && normalized_root["mask_reader"].isNull()) |
| 211 | normalized_root["mask_reader"] = normalized_root["reader"]; |
| 212 | |
| 213 | // Set parent data |
| 214 | EffectBase::SetJsonValue(normalized_root); |
| 215 | |
| 216 | // Set data from Json (if key is found) |
| 217 | if (!normalized_root["replace_image"].isNull()) |
| 218 | replace_image = normalized_root["replace_image"].asBool(); |
| 219 | if (!normalized_root["fade_audio_hint"].isNull()) |
| 220 | fade_audio_hint = normalized_root["fade_audio_hint"].asBool(); |
| 221 | if (!normalized_root["brightness"].isNull()) |
| 222 | brightness.SetJsonValue(normalized_root["brightness"]); |
| 223 | if (!normalized_root["contrast"].isNull()) |
| 224 | contrast.SetJsonValue(normalized_root["contrast"]); |
| 225 | |
| 226 | } |
| 227 | |
| 228 | // Get all properties for a specific frame |
| 229 | std::string Mask::PropertiesJSON(int64_t requested_frame) const { |
nothing calls this directly
no outgoing calls
no test coverage detected