OpenShot Library | libopenshot
0.2.5
|
This abstract class is the base class, used by all clips in libopenshot. More...
#include <ClipBase.h>
Public Member Functions | |
ClipBase () | |
Constructor for the base clip. More... | |
float | Duration () const |
Get the length of this clip (in seconds) More... | |
float | End () const |
Get end position (in seconds) of clip (trim end of video) More... | |
void | End (float value) |
Set end position (in seconds) of clip (trim end of video) More... | |
std::string | Id () const |
Get basic properties. More... | |
void | Id (std::string value) |
Set basic properties. More... | |
virtual std::string | Json () const =0 |
Get and Set JSON methods. More... | |
virtual Json::Value | JsonValue () const =0 |
Generate Json::Value for this object. More... | |
int | Layer () const |
Get layer of clip on timeline (lower number is covered by higher numbers) More... | |
void | Layer (int value) |
Set layer of clip on timeline (lower number is covered by higher numbers) More... | |
bool | operator< (ClipBase &a) |
bool | operator<= (ClipBase &a) |
bool | operator> (ClipBase &a) |
bool | operator>= (ClipBase &a) |
float | Position () const |
Get position on timeline (in seconds) More... | |
void | Position (float value) |
More... | |
virtual std::string | PropertiesJSON (int64_t requested_frame) const =0 |
virtual void | SetJson (const std::string value)=0 |
Load JSON string into this object. More... | |
virtual void | SetJsonValue (const Json::Value root)=0 |
Load Json::Value into this object. More... | |
float | Start () const |
Get start position (in seconds) of clip (trim start of video) More... | |
void | Start (float value) |
Set start position (in seconds) of clip (trim start of video) More... | |
virtual | ~ClipBase ()=default |
Protected Member Functions | |
Json::Value | add_property_choice_json (std::string name, int value, int selected_value) const |
Generate JSON choice for a property (dropdown properties) More... | |
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. More... | |
Protected Attributes | |
float | end |
The position in seconds to end playing (used to trim the ending of a clip) More... | |
std::string | id |
ID Property for all derived Clip and Effect classes. More... | |
int | layer |
The layer this clip is on. Lower clips are covered up by higher clips. More... | |
float | position |
The position on the timeline where this clip should start playing. More... | |
std::string | previous_properties |
This string contains the previous JSON properties. More... | |
float | start |
The position in seconds to start playing (used to trim the beginning of a clip) More... | |
This abstract class is the base class, used by all clips in libopenshot.
Clips are objects that attach to the timeline and can be layered and positioned together. There are 2 primary types of clips: Effects and Video/Audio Clips.
Definition at line 49 of file ClipBase.h.
|
inline |
Constructor for the base clip.
Definition at line 67 of file ClipBase.h.
|
virtualdefault |
|
protected |
Generate JSON choice for a property (dropdown properties)
Definition at line 104 of file ClipBase.cpp.
Referenced by openshot::Clip::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), and openshot::Mask::PropertiesJSON().
|
protected |
Generate JSON for a property.
Definition at line 68 of file ClipBase.cpp.
Referenced by openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), and openshot::Wave::PropertiesJSON().
|
inline |
Get the length of this clip (in seconds)
Definition at line 81 of file ClipBase.h.
Referenced by openshot::Timeline::GetFrame(), JsonValue(), openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), and openshot::Wave::PropertiesJSON().
|
inline |
Get end position (in seconds) of clip (trim end of video)
Definition at line 80 of file ClipBase.h.
Referenced by openshot::EffectBase::InitEffectInfo(), JsonValue(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), openshot::Wave::PropertiesJSON(), and SetJsonValue().
|
inline |
Set end position (in seconds) of clip (trim end of video)
Definition at line 88 of file ClipBase.h.
|
inline |
Get basic properties.
Get the Id of this clip object
Definition at line 76 of file ClipBase.h.
Referenced by openshot::Timeline::GetFrame(), JsonValue(), openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), openshot::Wave::PropertiesJSON(), and SetJsonValue().
|
inline |
Set basic properties.
Definition at line 84 of file ClipBase.h.
|
pure virtual |
Get and Set JSON methods.
Generate JSON string of this object
Implemented in openshot::Wave, openshot::Shift, openshot::Saturation, openshot::Pixelate, openshot::Negate, openshot::Mask, openshot::Hue, openshot::Deinterlace, openshot::Crop, openshot::ColorShift, openshot::ChromaKey, openshot::Brightness, openshot::Blur, openshot::Bars, openshot::Clip, and openshot::EffectBase.
|
pure virtual |
Generate Json::Value for this object.
Implemented in openshot::Wave, openshot::Shift, openshot::Saturation, openshot::Pixelate, openshot::Negate, openshot::Mask, openshot::Hue, openshot::Deinterlace, openshot::Crop, openshot::ColorShift, openshot::ChromaKey, openshot::Brightness, openshot::Blur, openshot::Bars, openshot::Clip, and openshot::EffectBase.
Definition at line 36 of file ClipBase.cpp.
Referenced by openshot::EffectBase::JsonValue(), and openshot::Clip::JsonValue().
|
inline |
Get layer of clip on timeline (lower number is covered by higher numbers)
Definition at line 78 of file ClipBase.h.
Referenced by openshot::Timeline::GetFrame(), openshot::EffectBase::InitEffectInfo(), JsonValue(), openshot::CompareClips::operator()(), openshot::CompareEffects::operator()(), openshot::CompareClipEffects::operator()(), openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), openshot::Wave::PropertiesJSON(), and SetJsonValue().
|
inline |
Set layer of clip on timeline (lower number is covered by higher numbers)
Definition at line 86 of file ClipBase.h.
|
inline |
Definition at line 70 of file ClipBase.h.
|
inline |
Definition at line 71 of file ClipBase.h.
|
inline |
Definition at line 72 of file ClipBase.h.
|
inline |
Definition at line 73 of file ClipBase.h.
|
inline |
Get position on timeline (in seconds)
Definition at line 77 of file ClipBase.h.
Referenced by openshot::Timeline::GetFrame(), openshot::EffectBase::InitEffectInfo(), JsonValue(), openshot::CompareClips::operator()(), openshot::CompareEffects::operator()(), openshot::CompareClipEffects::operator()(), operator<(), operator<=(), operator>(), operator>=(), openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), openshot::Wave::PropertiesJSON(), and SetJsonValue().
|
inline |
Set the Id of this clip object
Set position on timeline (in seconds)
Definition at line 85 of file ClipBase.h.
|
pure virtual |
Get all properties for a specific frame (perfect for a UI to display the current state of all properties at any time)
Implemented in openshot::Wave, openshot::Shift, openshot::Saturation, openshot::Pixelate, openshot::Negate, openshot::Mask, openshot::Hue, openshot::Deinterlace, openshot::Crop, openshot::ColorShift, openshot::ChromaKey, openshot::Brightness, openshot::Blur, openshot::Bars, and openshot::Clip.
|
pure virtual |
Load JSON string into this object.
Implemented in openshot::EffectBase, openshot::Wave, openshot::Shift, openshot::Saturation, openshot::Pixelate, openshot::Negate, openshot::Mask, openshot::Hue, openshot::Deinterlace, openshot::Crop, openshot::ColorShift, openshot::ChromaKey, openshot::Brightness, openshot::Blur, openshot::Bars, and openshot::Clip.
|
pure virtual |
Load Json::Value into this object.
Implemented in openshot::EffectBase, openshot::Wave, openshot::Shift, openshot::Saturation, openshot::Pixelate, openshot::Negate, openshot::Mask, openshot::Hue, openshot::Deinterlace, openshot::Crop, openshot::ColorShift, openshot::ChromaKey, openshot::Brightness, openshot::Blur, openshot::Bars, and openshot::Clip.
Definition at line 52 of file ClipBase.cpp.
Referenced by openshot::Clip::SetJsonValue(), and openshot::EffectBase::SetJsonValue().
|
inline |
Get start position (in seconds) of clip (trim start of video)
Definition at line 79 of file ClipBase.h.
Referenced by openshot::Timeline::GetFrame(), openshot::EffectBase::InitEffectInfo(), JsonValue(), openshot::Clip::PropertiesJSON(), openshot::Bars::PropertiesJSON(), openshot::Blur::PropertiesJSON(), openshot::Brightness::PropertiesJSON(), openshot::ChromaKey::PropertiesJSON(), openshot::ColorShift::PropertiesJSON(), openshot::Crop::PropertiesJSON(), openshot::Deinterlace::PropertiesJSON(), openshot::Hue::PropertiesJSON(), openshot::Mask::PropertiesJSON(), openshot::Negate::PropertiesJSON(), openshot::Pixelate::PropertiesJSON(), openshot::Saturation::PropertiesJSON(), openshot::Shift::PropertiesJSON(), openshot::Wave::PropertiesJSON(), and SetJsonValue().
|
inline |
Set start position (in seconds) of clip (trim start of video)
Definition at line 87 of file ClipBase.h.
|
protected |
The position in seconds to end playing (used to trim the ending of a clip)
Definition at line 55 of file ClipBase.h.
Referenced by Duration(), openshot::Clip::End(), End(), and openshot::Clip::Open().
|
protected |
ID Property for all derived Clip and Effect classes.
Definition at line 51 of file ClipBase.h.
Referenced by Id().
|
protected |
The layer this clip is on. Lower clips are covered up by higher clips.
Definition at line 53 of file ClipBase.h.
Referenced by Layer().
|
protected |
The position on the timeline where this clip should start playing.
Definition at line 52 of file ClipBase.h.
Referenced by Position().
|
protected |
This string contains the previous JSON properties.
Definition at line 56 of file ClipBase.h.
|
protected |
The position in seconds to start playing (used to trim the beginning of a clip)
Definition at line 54 of file ClipBase.h.
Referenced by Duration(), openshot::Deinterlace::GetFrame(), and Start().