13#ifndef OPENSHOT_EFFECT_BASE_H
14#define OPENSHOT_EFFECT_BASE_H
97 virtual std::string
Json()
const;
98 virtual void SetJson(
const std::string value);
102 virtual std::string
Json(int64_t requested_frame)
const{
105 virtual void SetJson(int64_t requested_frame,
const std::string value) {
119 void Order(
int new_order) { order = new_order; }
Header file for ClipBase class.
Header file for JSON class.
Header file for the TrackedObjectBase class.
This abstract class is the base class, used by all clips in libopenshot.
This abstract class is the base class, used by all effects in libopenshot.
virtual void SetJson(const std::string value)
Load JSON string into this object.
EffectBase * parentEffect
Parent effect (which properties will set this effect properties)
virtual std::string Json(int64_t requested_frame) const
Json::Value JsonInfo() const
Generate JSON object of meta data / info.
virtual void SetJson(int64_t requested_frame, const std::string value)
std::string ParentClipId() const
Return the ID of this effect's parent clip.
void SetParentEffect(std::string parentEffect_id)
Set the parent effect from which this properties will be set to.
virtual Json::Value JsonValue() const
Generate Json::Value for this object.
virtual ~EffectBase()=default
openshot::ClipBase * ParentClip()
Parent clip object of this effect (which can be unparented and NULL)
int constrain(int color_value)
Constrain a color value from 0 to 255.
virtual std::string Json() const
Generate JSON string of this object.
Json::Value BasePropertiesJSON(int64_t requested_frame) const
Generate JSON object of base properties (recommended to be used by all effects)
virtual std::string GetVisibleObjects(int64_t frame_number) const
Get the indexes and IDs of all visible objects in the given frame.
virtual void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
int Order() const
Get the order that this effect should be executed.
void Order(int new_order)
Set the order that this effect should be executed.
openshot::ClipBase * clip
Pointer to the parent clip instance (if any)
EffectInfoStruct info
Information about the current effect.
std::map< int, std::shared_ptr< openshot::TrackedObjectBase > > trackedObjects
Map of Tracked Object's by their indices (used by Effects that track objects on clips)
void DisplayInfo(std::ostream *out=&std::cout)
Display effect information in the standard output stream (stdout)
This namespace is the default namespace for all code in the openshot library.
This struct contains info about an effect, such as the name, video or audio effect,...
bool has_video
Determines if this effect manipulates the image of a frame.
bool apply_before_clip
Apply effect before we evaluate the clip's keyframes.
std::string parent_effect_id
Id of the parent effect (if there is one)
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.
bool has_tracked_object
Determines if this effect track objects through the clip.