31 #include "../include/EffectBase.h"
53 std::cout << std::fixed << std::setprecision(2) << std::boolalpha;
54 std::cout <<
"----------------------------" << std::endl;
55 std::cout <<
"----- Effect Information -----" << std::endl;
56 std::cout <<
"----------------------------" << std::endl;
57 std::cout <<
"--> Name: " <<
info.
name << std::endl;
59 std::cout <<
"--> Has Video: " <<
info.
has_video << std::endl;
60 std::cout <<
"--> Has Audio: " <<
info.
has_audio << std::endl;
61 std::cout <<
"----------------------------" << std::endl;
70 else if (color_value > 255)
93 root[
"order"] =
Order();
109 catch (
const std::exception& e)
112 throw InvalidJSON(
"JSON is invalid (missing keys or invalid data types)");
123 if (!root[
"order"].isNull())
124 Order(root[
"order"].asInt());
Json::Value JsonInfo() const
Generate JSON object of meta data / info.
virtual std::string Json() const =0
Get and Set JSON methods.
void DisplayInfo()
Display effect information in the standard output stream (stdout)
int Layer() const
Get layer of clip on timeline (lower number is covered by higher numbers)
const Json::Value stringToJson(const std::string value)
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
float Position() const
Get position on timeline (in seconds)
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
bool has_audio
Determines if this effect manipulates the audio of a frame.
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
virtual void SetJson(const std::string value)=0
Load JSON string into this object.
std::string class_name
The class name of the effect.
std::string name
The name of the effect.
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
This namespace is the default namespace for all code in the openshot library.
int Order() const
Get the order that this effect should be executed.
std::string description
The description of this effect and what it does.
bool has_video
Determines if this effect manipulates the image of a frame.
Exception for invalid JSON.
int constrain(int color_value)
Constrain a color value from 0 to 255.
float End() const
Get end position (in seconds) of clip (trim end of video)
float Start() const
Get start position (in seconds) of clip (trim start of video)
EffectInfoStruct info
Information about the current effect.