|
OpenShot Library | libopenshot
0.1.1
|
This class represents a clip (used to arrange readers on the timeline) More...
#include <Clip.h>
Public Member Functions | |
| void | AddEffect (EffectBase *effect) |
| Add an effect to the clip. More... | |
| Clip () | |
| Default Constructor. More... | |
| Clip (string path) | |
| Constructor with filepath (reader is automatically created... by guessing file extensions) More... | |
| Clip (ReaderBase *new_reader) | |
| Constructor with reader. More... | |
| void | Close () throw (ReaderClosed) |
| Close the internal reader. More... | |
| list< EffectBase * > | Effects () |
| Return the list of effects on the timeline. More... | |
| float | End () throw (ReaderClosed) |
| Override End() method. More... | |
| void | End (float value) |
| Set end position (in seconds) of clip (trim end of video) More... | |
| tr1::shared_ptr< Frame > | GetFrame (long int requested_frame) throw (ReaderClosed) |
| Get an openshot::Frame object for a specific frame number of this timeline. More... | |
| string | Json () |
| Get and Set JSON methods. More... | |
| Json::Value | JsonValue () |
| Generate Json::JsonValue for this object. More... | |
| void | Open () throw (InvalidFile, ReaderClosed) |
| Open the internal reader. More... | |
| string | PropertiesJSON (long int requested_frame) |
| void | Reader (ReaderBase *new_reader) |
| Set the current reader. More... | |
| ReaderBase * | Reader () throw (ReaderClosed) |
| Get the current reader. More... | |
| void | RemoveEffect (EffectBase *effect) |
| Remove an effect from the clip. More... | |
| void | SetJson (string value) throw (InvalidJSON) |
| Load JSON string into this object. More... | |
| void | SetJsonValue (Json::Value root) |
| Load Json::JsonValue into this object. More... | |
| bool | Waveform () |
| Waveform property. More... | |
| void | Waveform (bool value) |
| Set the waveform property of this clip. More... | |
| ~Clip () | |
| Destructor. More... | |
Public Member Functions inherited from openshot::ClipBase | |
| float | Duration () |
| Get the length of this clip (in seconds) More... | |
| float | End () |
| 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... | |
| string | Id () |
| Get basic properties. More... | |
| void | Id (string value) |
| Set basic properties. More... | |
| int | Layer () |
| 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 () |
| Get position on timeline (in seconds) More... | |
| void | Position (float value) |
More... | |
| float | Start () |
| 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... | |
Public Attributes | |
| Keyframe | alpha |
| Curve representing the alpha (1 to 0) More... | |
| AnchorType | anchor |
| The anchor determines what parent a clip should snap to. More... | |
| GravityType | crop_gravity |
| Cropping needs to have a gravity to determine what side we are cropping. More... | |
| Keyframe | crop_height |
| Curve representing height in percent (0.0=0%, 1.0=100%) More... | |
| Keyframe | crop_width |
| Curve representing width in percent (0.0=0%, 1.0=100%) More... | |
| Keyframe | crop_x |
| Curve representing X offset in percent (-1.0=-100%, 0.0=0%, 1.0=100%) More... | |
| Keyframe | crop_y |
| Curve representing Y offset in percent (-1.0=-100%, 0.0=0%, 1.0=100%) More... | |
| GravityType | gravity |
| The gravity of a clip determines where it snaps to it's parent. More... | |
| Keyframe | location_x |
| Curve representing the relative X position in percent based on the gravity (-100 to 100) More... | |
| Keyframe | location_y |
| Curve representing the relative Y position in percent based on the gravity (-100 to 100) More... | |
| Keyframe | perspective_c1_x |
| Curves representing X for coordinate 1. More... | |
| Keyframe | perspective_c1_y |
| Curves representing Y for coordinate 1. More... | |
| Keyframe | perspective_c2_x |
| Curves representing X for coordinate 2. More... | |
| Keyframe | perspective_c2_y |
| Curves representing Y for coordinate 2. More... | |
| Keyframe | perspective_c3_x |
| Curves representing X for coordinate 3. More... | |
| Keyframe | perspective_c3_y |
| Curves representing Y for coordinate 3. More... | |
| Keyframe | perspective_c4_x |
| Curves representing X for coordinate 4. More... | |
| Keyframe | perspective_c4_y |
| Curves representing Y for coordinate 4. More... | |
| Keyframe | rotation |
| Curve representing the rotation (0 to 360) More... | |
| ScaleType | scale |
| The scale determines how a clip should be resized to fit it's parent. More... | |
| Keyframe | scale_x |
| Curve representing the horizontal scaling in percent (0 to 100) More... | |
| Keyframe | scale_y |
| Curve representing the vertical scaling in percent (0 to 100) More... | |
| Keyframe | shear_x |
| Curve representing X shear angle in degrees (-45.0=left, 45.0=right) More... | |
| Keyframe | shear_y |
| Curve representing Y shear angle in degrees (-45.0=down, 45.0=up) More... | |
| Keyframe | time |
| Curve representing the frames over time to play (used for speed and direction of video) More... | |
| Keyframe | volume |
| Curve representing the volume (0 to 1) More... | |
| Color | wave_color |
| Curve representing the color of the audio wave form. More... | |
Protected Attributes | |
| CriticalSection | getFrameCriticalSection |
| Section lock for multiple threads. More... | |
Protected Attributes inherited from openshot::ClipBase | |
| float | end |
| The position in seconds to end playing (used to trim the ending of a clip) More... | |
| 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... | |
| 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from openshot::ClipBase | |
| Json::Value | add_property_choice_json (string name, int value, int selected_value) |
| Generate JSON choice for a property (dropdown properties) More... | |
| Json::Value | add_property_json (string name, float value, string type, string memo, bool contains_point, int number_of_points, float min_value, float max_value, InterpolationType intepolation, int closest_point_x, bool readonly) |
| Generate JSON for a property. More... | |
This class represents a clip (used to arrange readers on the timeline)
Each image, video, or audio file is represented on a layer as a clip. A clip has many properties that affect how it behaves on the timeline, such as its size, position, transparency, rotation, speed, volume, etc...
| Clip::Clip | ( | string | path | ) |
| Clip::Clip | ( | ReaderBase * | new_reader | ) |
| void Clip::AddEffect | ( | EffectBase * | effect | ) |
Add an effect to the clip.
| effect | Add an effect to the clip. An effect can modify the audio or video of an openshot::Frame. |
| void Clip::Close | ( | ) | ||
| throw | ( | ReaderClosed | ||
| ) | ||||
|
inline |
| float Clip::End | ( | ) | ||
| throw | ( | ReaderClosed | ||
| ) | ||||
|
inline |
| tr1::shared_ptr< Frame > Clip::GetFrame | ( | long int | requested_frame | ) | |
| throw | ( | ReaderClosed | |||
| ) | |||||
Get an openshot::Frame object for a specific frame number of this timeline.
| requested_frame | The frame number that is requested |
|
virtual |
|
virtual |
Generate Json::JsonValue for this object.
Implements openshot::ClipBase.
| void Clip::Open | ( | ) | ||
| throw | ( | InvalidFile, | ||
| ReaderClosed | ||||
| ) | ||||
|
virtual |
Get all properties for a specific frame (perfect for a UI to display the current state of all properties at any time)
Implements openshot::ClipBase.
| void Clip::Reader | ( | ReaderBase * | new_reader | ) |
| ReaderBase * Clip::Reader | ( | ) | ||
| throw | ( | ReaderClosed | ||
| ) | ||||
| void Clip::RemoveEffect | ( | EffectBase * | effect | ) |
|
virtual | ||||||||||||||
Load JSON string into this object.
Implements openshot::ClipBase.
|
virtual |
Load Json::JsonValue into this object.
Implements openshot::ClipBase.
|
inline |
|
inline |
| Keyframe openshot::Clip::alpha |
| AnchorType openshot::Clip::anchor |
| GravityType openshot::Clip::crop_gravity |
| Keyframe openshot::Clip::crop_height |
| Keyframe openshot::Clip::crop_width |
| Keyframe openshot::Clip::crop_x |
| Keyframe openshot::Clip::crop_y |
|
protected |
| GravityType openshot::Clip::gravity |
| Keyframe openshot::Clip::location_x |
| Keyframe openshot::Clip::location_y |
| Keyframe openshot::Clip::perspective_c1_x |
| Keyframe openshot::Clip::perspective_c1_y |
| Keyframe openshot::Clip::perspective_c2_x |
| Keyframe openshot::Clip::perspective_c2_y |
| Keyframe openshot::Clip::perspective_c3_x |
| Keyframe openshot::Clip::perspective_c3_y |
| Keyframe openshot::Clip::perspective_c4_x |
| Keyframe openshot::Clip::perspective_c4_y |
| Keyframe openshot::Clip::rotation |
| ScaleType openshot::Clip::scale |
| Keyframe openshot::Clip::scale_x |
| Keyframe openshot::Clip::scale_y |
| Keyframe openshot::Clip::shear_x |
| Keyframe openshot::Clip::shear_y |
| Keyframe openshot::Clip::time |
| Keyframe openshot::Clip::volume |
| Color openshot::Clip::wave_color |
1.8.6