31 #ifndef OPENSHOT_CLIPBASE_H 32 #define OPENSHOT_CLIPBASE_H 59 Json::Value
add_property_json(std::string name,
float value, std::string type, std::string memo,
Keyframe* keyframe,
float min_value,
float max_value,
bool readonly, int64_t requested_frame);
76 std::string
Id() {
return id; }
84 void Id(std::string value) {
id = value; }
85 void Position(
float value) { position = value; }
86 void Layer(
int value) { layer = value; }
87 void Start(
float value) { start = value; }
88 void End(
float value) { end = value; }
91 virtual std::string
Json() = 0;
92 virtual void SetJson(std::string value) = 0;
bool operator>(ClipBase &a)
void Layer(int value)
Set layer of clip on timeline (lower number is covered by higher numbers)
bool operator<=(ClipBase &a)
void Start(float value)
Set start position (in seconds) of clip (trim start of video)
std::string id
ID Property for all derived Clip and Effect classes.
Header file for Point class.
float position
The position on the timeline where this clip should start playing.
float End()
Get end position (in seconds) of clip (trim end of video)
int Layer()
Get layer of clip on timeline (lower number is covered by higher numbers)
Header file for the Keyframe class.
int layer
The layer this clip is on. Lower clips are covered up by higher clips.
Header file for all Exception classes.
virtual void SetJsonValue(Json::Value root)=0
Load Json::JsonValue into this object.
std::string Id()
Get basic properties.
float Position()
Get position on timeline (in seconds)
Header file for JSON class.
void Position(float value)
Set the Id of this clip object
float start
The position in seconds to start playing (used to trim the beginning of a clip)
ClipBase()
Constructor for the base clip.
This abstract class is the base class, used by all clips in libopenshot.
Json::Value add_property_choice_json(std::string name, int value, int selected_value)
Generate JSON choice for a property (dropdown properties)
void End(float value)
Set end position (in seconds) of clip (trim end of video)
virtual ~ClipBase()=default
virtual std::string PropertiesJSON(int64_t requested_frame)=0
float end
The position in seconds to end playing (used to trim the ending of a clip)
Json::Value add_property_json(std::string name, float value, std::string type, std::string memo, Keyframe *keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame)
Generate JSON for a property.
This namespace is the default namespace for all code in the openshot library.
bool operator>=(ClipBase &a)
virtual Json::Value JsonValue()=0
Generate Json::JsonValue for this object.
std::string previous_properties
This string contains the previous JSON properties.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time...
void Id(std::string value)
Set basic properties.
float Duration()
Get the length of this clip (in seconds)
bool operator<(ClipBase &a)
float Start()
Get start position (in seconds) of clip (trim start of video)
virtual void SetJson(std::string value)=0
Load JSON string into this object.
virtual std::string Json()=0
Get and Set JSON methods.