OpenShot Library | libopenshot
0.2.5
|
Go to the documentation of this file.
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,
const Keyframe* keyframe,
float min_value,
float max_value,
bool readonly, int64_t requested_frame)
const;
76 std::string
Id()
const {
return id; }
77 float Position()
const {
return position; }
78 int Layer()
const {
return layer; }
79 float Start()
const {
return start; }
80 float End()
const {
return end; }
81 float Duration()
const {
return end -
start; }
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()
const = 0;
92 virtual void SetJson(
const std::string value) = 0;
93 virtual Json::Value
JsonValue()
const = 0;
98 virtual std::string
PropertiesJSON(int64_t requested_frame)
const = 0;
Json::Value add_property_json(std::string name, float value, std::string type, std::string memo, const Keyframe *keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame) const
Generate JSON for a property.
virtual ~ClipBase()=default
Header file for Point class.
This namespace is the default namespace for all code in the openshot library.
Json::Value add_property_choice_json(std::string name, int value, int selected_value) const
Generate JSON choice for a property (dropdown properties)
virtual std::string Json() const =0
Get and Set JSON methods.
bool operator>(ClipBase &a)
Header file for the Keyframe class.
virtual void SetJson(const std::string value)=0
Load JSON string into this object.
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.
float position
The position on the timeline where this clip should start playing.
ClipBase()
Constructor for the base clip.
bool operator<(ClipBase &a)
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
bool operator<=(ClipBase &a)
float end
The position in seconds to end playing (used to trim the ending of a clip)
float start
The position in seconds to start playing (used to trim the beginning of a clip)
std::string id
ID Property for all derived Clip and Effect classes.
int layer
The layer this clip is on. Lower clips are covered up by higher clips.
virtual std::string PropertiesJSON(int64_t requested_frame) const =0
void Id(std::string value)
Set basic properties.
std::string previous_properties
This string contains the previous JSON properties.
Header file for JSON class.
This abstract class is the base class, used by all clips in libopenshot.
bool operator>=(ClipBase &a)
Header file for all Exception classes.