improved the stabilize effect integration

This commit is contained in:
Brenno
2020-07-15 10:29:08 -03:00
parent 6d547650dc
commit d6e0a69c1f
13 changed files with 225 additions and 164 deletions

View File

@@ -29,7 +29,6 @@
*/
#include "../include/EffectInfo.h"
// #include "../include/Clip.h"
using namespace openshot;
@@ -86,9 +85,24 @@ EffectBase* EffectInfo::CreateEffect(std::string effect_type) {
else if (effect_type == "Wave")
return new Wave();
else if(effect_type == "Stabilizer")
return new Stabilizer();
else if(effect_type == "Tracker")
return new Tracker();
return NULL;
}
EffectBase* EffectInfo::CreateEffect(std::string effect_type, std::string pb_data_path){
if(effect_type == "Stabilizer")
return new Stabilizer(pb_data_path);
else if(effect_type == "Tracker")
return new Tracker();
}
// Generate Json::Value for this object
Json::Value EffectInfo::JsonValue() {
@@ -110,6 +124,8 @@ Json::Value EffectInfo::JsonValue() {
root.append(Saturation().JsonInfo());
root.append(Shift().JsonInfo());
root.append(Wave().JsonInfo());
root.append(Stabilizer().JsonInfo());
root.append(Tracker().JsonInfo());
// return JsonValue
return root;