|
MLT
7.38.0
Multimedia Framework
|
C++ wrapper for mlt_animation — keyframe animation data. More...
#include <MltAnimation.h>

Public Member Functions | |
| Animation () | |
| Animation (const Animation &) | |
| Animation (mlt_animation animation) | |
| Wrap an existing mlt_animation handle (does not take ownership). More... | |
| mlt_animation | get_animation () const |
| int | get_item (int position, bool &is_key, mlt_keyframe_type &) |
Get the interpolated value and keyframe type at position. More... | |
| void | interpolate () |
| Recalculate intermediate values between keyframes. More... | |
| bool | is_key (int position) |
Return true if position is exactly a keyframe. More... | |
| bool | is_valid () const |
| Return true if the underlying handle is non-null. More... | |
| int | key_count () |
| Return the total number of keyframes. More... | |
| int | key_get (int index, int &frame, mlt_keyframe_type &) |
Get the frame and type of the keyframe at index. More... | |
| int | key_get_frame (int index) |
Return the frame number of the keyframe at index. More... | |
| mlt_keyframe_type | key_get_type (int index) |
Return the interpolation type of the keyframe at index. More... | |
| int | key_set_frame (int index, int frame) |
Move the keyframe at index to frame. More... | |
| int | key_set_type (int index, mlt_keyframe_type type) |
Set the interpolation type of the keyframe at index. More... | |
| mlt_keyframe_type | keyframe_type (int position) |
Return the interpolation type of the keyframe at position. More... | |
| int | length () |
| Return the animation length in frames. More... | |
| int | next_key (int position) |
Return the next keyframe position at or after position. More... | |
| bool | next_key (int position, int &key) |
| Get the keyfame at the position or the next following. More... | |
| Animation & | operator= (const Animation &) |
| int | previous_key (int position) |
Return the previous keyframe position at or before position. More... | |
| bool | previous_key (int position, int &key) |
| Get the keyfame at the position or the previous before. More... | |
| int | remove (int position) |
Remove the keyframe at position. More... | |
| char * | serialize_cut (int in=-1, int out=-1) |
Serialize the animation as a string, optionally clipped to [in, out]. More... | |
| char * | serialize_cut (mlt_time_format format, int in=-1, int out=-1) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| void | set_length (int length) |
| Set a new total length, scaling keyframe positions proportionally. More... | |
| void | shift_frames (int shift) |
Shift all keyframe positions by shift frames. More... | |
| ~Animation () | |
Private Attributes | |
| mlt_animation | instance |
C++ wrapper for mlt_animation — keyframe animation data.
An animation holds a set of keyframes that define how a property value changes over time. Obtain one from Properties via the anim_get / anim_set family of methods.
| Animation::Animation | ( | ) |
| Animation::Animation | ( | mlt_animation | animation | ) |
Wrap an existing mlt_animation handle (does not take ownership).
| Animation::Animation | ( | const Animation & | animation | ) |
| Animation::~Animation | ( | ) |
| mlt_animation Animation::get_animation | ( | ) | const |
| int Animation::get_item | ( | int | position, |
| bool & | is_key, | ||
| mlt_keyframe_type & | type | ||
| ) |
Get the interpolated value and keyframe type at position.
| void Animation::interpolate | ( | ) |
Recalculate intermediate values between keyframes.
| bool Animation::is_key | ( | int | position | ) |
Return true if position is exactly a keyframe.
| bool Animation::is_valid | ( | ) | const |
Return true if the underlying handle is non-null.
| int Animation::key_count | ( | ) |
Return the total number of keyframes.
| int Animation::key_get | ( | int | index, |
| int & | frame, | ||
| mlt_keyframe_type & | type | ||
| ) |
Get the frame and type of the keyframe at index.
| int Animation::key_get_frame | ( | int | index | ) |
Return the frame number of the keyframe at index.
| mlt_keyframe_type Animation::key_get_type | ( | int | index | ) |
Return the interpolation type of the keyframe at index.
| int Animation::key_set_frame | ( | int | index, |
| int | frame | ||
| ) |
Move the keyframe at index to frame.
| int Animation::key_set_type | ( | int | index, |
| mlt_keyframe_type | type | ||
| ) |
Set the interpolation type of the keyframe at index.
| mlt_keyframe_type Animation::keyframe_type | ( | int | position | ) |
Return the interpolation type of the keyframe at position.
| int Animation::length | ( | ) |
Return the animation length in frames.
| int Animation::next_key | ( | int | position | ) |
Return the next keyframe position at or after position.
Get the keyfame at the position or the next following.
If no keyframe exists at or after the position, the return value is invalid
| position | the frame number at which to start looking for the next keyframe |
| bool Animation::next_key | ( | int | position, |
| int & | key | ||
| ) |
Get the keyfame at the position or the next following.
On error, key is not modified.
| position | the frame number at which to start looking for the next keyframe |
| key | the returned position of the next keyframe |
| int Animation::previous_key | ( | int | position | ) |
Return the previous keyframe position at or before position.
Get the keyfame at the position or the previous keyframe before.
If no keyframe exists at or before the position, the return value is invalid
| position | the frame number at which to start looking for the previous keyframe |
| bool Animation::previous_key | ( | int | position, |
| int & | key | ||
| ) |
Get the keyfame at the position or the previous before.
On error, key is not modified.
| position | the frame number at which to start looking for the previous keyframe |
| key | the returned position of the previous keyframe |
| int Animation::remove | ( | int | position | ) |
Remove the keyframe at position.
| char * Animation::serialize_cut | ( | int | in = -1, |
| int | out = -1 |
||
| ) |
Serialize the animation as a string, optionally clipped to [in, out].
Caller must free() the returned string.
| char * Animation::serialize_cut | ( | mlt_time_format | format, |
| int | in = -1, |
||
| int | out = -1 |
||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void Animation::set_length | ( | int | length | ) |
Set a new total length, scaling keyframe positions proportionally.
| void Animation::shift_frames | ( | int | shift | ) |
Shift all keyframe positions by shift frames.
|
private |