You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user