Added a new class to easily expose the JSON metadata of supported effects in libopenshot. Fixed some bugs related to metadata, and a few bugs in the Mask effect (if initialized without a reader).

This commit is contained in:
Jonathan Thomas
2015-08-06 20:01:34 -05:00
parent 41dceadd1f
commit c7f0a481cc
16 changed files with 189 additions and 12 deletions

View File

@@ -109,3 +109,19 @@ void EffectBase::SetJsonValue(Json::Value root) {
if (!root["order"].isNull())
Order(root["order"].asInt());
}
// Generate Json::JsonValue for this object
Json::Value EffectBase::JsonInfo() {
// Create root json object
Json::Value root;
root["name"] = info.name;
root["class_name"] = info.class_name;
root["short_name"] = info.short_name;
root["description"] = info.description;
root["has_video"] = info.has_video;
root["has_audio"] = info.has_audio;
// return JsonValue
return root;
}