MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / SetJsonValue

Method SetJsonValue

src/audio_effects/Compressor.cpp:157–180  ·  view source on GitHub ↗

Load Json::Value into this object

Source from the content-addressed store, hash-verified

155
156// Load Json::Value into this object
157void Compressor::SetJsonValue(const Json::Value root) {
158
159 // Set parent data
160 EffectBase::SetJsonValue(root);
161
162 // Set data from Json (if key is found)
163 if (!root["threshold"].isNull())
164 threshold.SetJsonValue(root["threshold"]);
165
166 if (!root["ratio"].isNull())
167 ratio.SetJsonValue(root["ratio"]);
168
169 if (!root["attack"].isNull())
170 attack.SetJsonValue(root["attack"]);
171
172 if (!root["release"].isNull())
173 release.SetJsonValue(root["release"]);
174
175 if (!root["makeup_gain"].isNull())
176 makeup_gain.SetJsonValue(root["makeup_gain"]);
177
178 if (!root["bypass"].isNull())
179 bypass.SetJsonValue(root["bypass"]);
180}
181
182// Get all properties for a specific frame
183std::string Compressor::PropertiesJSON(int64_t requested_frame) const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected