OpenShot Library | libopenshot
0.2.2
|
Go to the documentation of this file.
28 #ifndef OPENSHOT_CLIPBASE_H
29 #define OPENSHOT_CLIPBASE_H
32 #ifndef __JUCE_UNITTEST_JUCEHEADER__
33 #define __JUCE_UNITTEST_JUCEHEADER__
65 Json::Value add_property_json(
string name,
float value,
string type,
string memo,
Keyframe* keyframe,
float min_value,
float max_value,
bool readonly, int64_t requested_frame);
68 Json::Value add_property_choice_json(
string name,
int value,
int selected_value);
76 bool operator< (
ClipBase&
a) {
return (Position() <
a.Position()); }
77 bool operator<= (
ClipBase&
a) {
return (Position() <=
a.Position()); }
78 bool operator> (
ClipBase&
a) {
return (Position() >
a.Position()); }
79 bool operator>= (
ClipBase&
a) {
return (Position() >=
a.Position()); }
82 string Id() {
return id; }
83 float Position() {
return position; }
84 int Layer() {
return layer; }
85 float Start() {
return start; }
86 float End() {
return end; }
87 float Duration() {
return end - start; }
90 void Id(
string value) {
id = value; }
91 void Position(
float value) { position = value; }
92 void Layer(
int value) { layer = value; }
93 void Start(
float value) { start = value; }
94 void End(
float value) { end = value; }
97 void SetMaxSize(
int width,
int height) { max_width = width; max_height = height; };
100 virtual string Json() = 0;
101 virtual void SetJson(
string value) = 0;
102 virtual Json::Value JsonValue() = 0;
103 virtual void SetJsonValue(Json::Value root) = 0;
107 virtual string PropertiesJSON(int64_t requested_frame) = 0;
int max_width
The maximum image width needed by this clip (used for optimizations)
Header file for Point class.
void Id(string value)
Set basic properties.
This namespace is the default namespace for all code in the openshot library.
string id
ID Property for all derived Clip and Effect classes.
int max_height
The maximium image height needed by this clip (used for optimizations)
string previous_properties
This string contains the previous JSON properties.
Header file for the Keyframe class.
float position
The position on the timeline where this clip should start playing.
ClipBase()
Constructor for the base clip.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time.
void SetMaxSize(int width, int height)
Set Max Image Size (used for performance optimization)
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)
int layer
The layer this clip is on. Lower clips are covered up by higher clips.
Header file for JSON class.
This abstract class is the base class, used by all clips in libopenshot.
Header file for all Exception classes.