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());
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)
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
int Layer() const
Get layer of clip on timeline (lower number is covered by higher numbers)
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
float Position() const
Get position on timeline (in seconds)
void DisplayInfo()
Display effect information in the standard output stream (stdout)
virtual std::string Json() const =0
Get and Set JSON methods.
Json::Value JsonInfo() const
Generate JSON object of meta data / info.
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
int constrain(int color_value)
Constrain a color value from 0 to 255.
virtual void SetJson(const std::string value)=0
Load JSON string into this object.
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
int Order() const
Get the order that this effect should be executed.
EffectInfoStruct info
Information about the current effect.
Exception for invalid JSON.
This namespace is the default namespace for all code in the openshot library.
const Json::Value stringToJson(const std::string value)
bool has_video
Determines if this effect manipulates the image of a frame.
bool has_audio
Determines if this effect manipulates the audio of a frame.
std::string class_name
The class name of the effect.
std::string name
The name of the effect.
std::string description
The description of this effect and what it does.