MLT  7.34.0
mlt_animation.h
Go to the documentation of this file.
1 
23 #ifndef MLT_ANIMATION_H
24 #define MLT_ANIMATION_H
25 
26 #include "mlt_export.h"
27 #include "mlt_property.h"
28 #include "mlt_types.h"
29 
44 {
45  int is_key;
46  int frame;
49 };
53 MLT_EXPORT int mlt_animation_parse(
54  mlt_animation self, const char *data, int length, double fps, mlt_locale_t locale);
55 MLT_EXPORT int mlt_animation_refresh(mlt_animation self, const char *data, int length);
57 MLT_EXPORT void mlt_animation_set_length(mlt_animation self, int length);
59  mlt_animation_item item,
60  const char *data);
61 MLT_EXPORT int mlt_animation_get_item(mlt_animation self, mlt_animation_item item, int position);
63 MLT_EXPORT int mlt_animation_remove(mlt_animation self, int position);
65 MLT_EXPORT int mlt_animation_next_key(mlt_animation self, mlt_animation_item item, int position);
66 MLT_EXPORT int mlt_animation_prev_key(mlt_animation self, mlt_animation_item item, int position);
68  int in,
69  int out,
71 MLT_EXPORT char *mlt_animation_serialize_cut(mlt_animation self, int in, int out);
73 MLT_EXPORT char *mlt_animation_serialize(mlt_animation self);
75 MLT_EXPORT int mlt_animation_key_get(mlt_animation self, mlt_animation_item item, int index);
76 MLT_EXPORT void mlt_animation_close(mlt_animation self);
77 MLT_EXPORT int mlt_animation_key_set_type(mlt_animation self, int index, mlt_keyframe_type type);
78 MLT_EXPORT int mlt_animation_key_set_frame(mlt_animation self, int index, int frame);
79 MLT_EXPORT void mlt_animation_shift_frames(mlt_animation self, int shift);
80 MLT_EXPORT const char *mlt_animation_get_string(mlt_animation self);
81 
82 #endif
struct mlt_animation_item_s * mlt_animation_item
pointer to an animation item
Definition: mlt_animation.h:50
Property class declaration.
char * mlt_locale_t
Definition: mlt_property.h:46
Provides forward definitions of all public types.
mlt_time_format
The time string formats.
Definition: mlt_types.h:172
mlt_keyframe_type
Interpolation methods for animation keyframes.
Definition: mlt_types.h:181
Animation class.
Definition: mlt_animation.h:44
int is_key
a boolean of whether this is a key frame or an interpolated item
Definition: mlt_animation.h:45
int frame
the frame number for this instance of the property
Definition: mlt_animation.h:46
mlt_keyframe_type keyframe_type
the method of interpolation for this key frame
Definition: mlt_animation.h:48
mlt_property property
the property for this point in time
Definition: mlt_animation.h:47
Property Animation class.
Definition: mlt_animation.c:51
const char * mlt_animation_get_string(mlt_animation self)
Get the cached serialization string.
Definition: mlt_animation.c:1011
char * mlt_animation_serialize_tf(mlt_animation self, mlt_time_format time_format)
Serialize the animation (with time format).
Definition: mlt_animation.c:825
mlt_animation mlt_animation_new()
Create a new animation object.
Definition: mlt_animation.c:145
int mlt_animation_parse_item(mlt_animation self, mlt_animation_item item, const char *value)
Parse a string representing an animation keyframe=value.
Definition: mlt_animation.c:396
int mlt_animation_prev_key(mlt_animation self, mlt_animation_item item, int position)
Get the keyfame at the position or the next preceding.
Definition: mlt_animation.c:639
int mlt_animation_parse(mlt_animation self, const char *data, int length, double fps, mlt_locale_t locale)
Parse a string representing an animation.
Definition: mlt_animation.c:253
int mlt_animation_key_set_frame(mlt_animation self, int index, int frame)
Change the frame number for the N-th keyframe.
Definition: mlt_animation.c:960
char * mlt_animation_serialize_cut_tf(mlt_animation self, int in, int out, mlt_time_format time_format)
Serialize a cut of the animation (with time format).
Definition: mlt_animation.c:674
void mlt_animation_set_length(mlt_animation self, int length)
Set the length of the animation.
Definition: mlt_animation.c:371
void mlt_animation_close(mlt_animation self)
Close the animation and deallocate all of its resources.
Definition: mlt_animation.c:910
void mlt_animation_shift_frames(mlt_animation self, int shift)
Shift the frame value for all nodes.
Definition: mlt_animation.c:991
int mlt_animation_insert(mlt_animation self, mlt_animation_item item)
Insert an animation item.
Definition: mlt_animation.c:518
int mlt_animation_key_get(mlt_animation self, mlt_animation_item item, int index)
Get an animation item for the N-th keyframe.
Definition: mlt_animation.c:877
int mlt_animation_get_length(mlt_animation self)
Get the length of the animation.
Definition: mlt_animation.c:344
int mlt_animation_key_count(mlt_animation self)
Get the number of keyframes.
Definition: mlt_animation.c:857
char * mlt_animation_serialize(mlt_animation self)
Serialize the animation.
Definition: mlt_animation.c:845
int mlt_animation_key_set_type(mlt_animation self, int index, mlt_keyframe_type type)
Change the interpolation for the N-th keyframe.
Definition: mlt_animation.c:927
int mlt_animation_remove(mlt_animation self, int position)
Remove the keyframe at the specified position.
Definition: mlt_animation.c:581
int mlt_animation_refresh(mlt_animation self, const char *data, int length)
Conditionally refresh the animation if it is modified.
Definition: mlt_animation.c:325
int mlt_animation_get_item(mlt_animation self, mlt_animation_item item, int position)
Load an animation item for an absolute position.
Definition: mlt_animation.c:453
void mlt_animation_interpolate(mlt_animation self)
Re-interpolate non-keyframe nodes after a series of insertions or removals.
Definition: mlt_animation.c:157
char * mlt_animation_serialize_cut(mlt_animation self, int in, int out)
Serialize a cut of the animation.
Definition: mlt_animation.c:811
int mlt_animation_next_key(mlt_animation self, mlt_animation_item item, int position)
Get the keyfame at the position or the next following.
Definition: mlt_animation.c:609
Property class.
Definition: mlt_property.c:73