OpenShot Library | libopenshot
0.2.5
|
Go to the documentation of this file.
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());
const Json::Value stringToJson(const std::string value)
EffectInfoStruct info
Information about the current effect.
Json::Value JsonInfo() const
Generate JSON object of meta data / info.
This namespace is the default namespace for all code in the openshot library.
void DisplayInfo()
Display effect information in the standard output stream (stdout)
float End() const
Get end position (in seconds) of clip (trim end of video)
virtual void SetJsonValue(const Json::Value root)=0
Load Json::Value into this object.
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.
virtual Json::Value JsonValue() const =0
Generate Json::Value for this object.
Exception for invalid JSON.
bool has_audio
Determines if this effect manipulates the audio of a frame.
virtual void SetJson(const std::string value)=0
Load JSON string into this object.
int Order() const
Get the order that this effect should be executed.
std::string class_name
The class name of the effect.
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.
int constrain(int color_value)
Constrain a color value from 0 to 255.
float Position() const
Get position on timeline (in seconds)
std::string name
The name of the effect.
float Start() const
Get start position (in seconds) of clip (trim start of video)
virtual std::string Json() const =0
Get and Set JSON methods.