MLT  7.34.0
mlt_property.h
Go to the documentation of this file.
1 
23 #ifndef MLT_PROPERTY_H
24 #define MLT_PROPERTY_H
25 
26 #include "mlt_export.h"
27 #include "mlt_types.h"
28 
29 #if defined(__FreeBSD__)
30 /* This header has existed since 1994 and defines __FreeBSD_version below. */
31 #include <sys/param.h>
32 #endif
33 
34 #if defined(__GLIBC__)
35 #include <locale.h>
36 typedef locale_t mlt_locale_t;
37 #elif defined(__APPLE__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 900506)
38 #include <xlocale.h>
39 typedef locale_t mlt_locale_t;
40 #elif defined(__OpenBSD__)
41 /* XXX matches __nop_locale glue in libc++ */
42 typedef void *mlt_locale_t;
43 #elif (defined _WIN32 && defined _LIBCPP_VERSION)
44 struct mlt_locale_t;
45 #else
46 typedef char *mlt_locale_t;
47 #endif
48 
50 MLT_EXPORT void mlt_property_clear(mlt_property self);
51 MLT_EXPORT int mlt_property_is_clear(mlt_property self);
52 MLT_EXPORT int mlt_property_set_int(mlt_property self, int value);
53 MLT_EXPORT int mlt_property_set_double(mlt_property self, double value);
55 MLT_EXPORT int mlt_property_set_int64(mlt_property self, int64_t value);
56 MLT_EXPORT int mlt_property_set_string(mlt_property self, const char *value);
57 MLT_EXPORT int mlt_property_set_data(mlt_property self,
58  void *value,
59  int length,
60  mlt_destructor destructor,
61  mlt_serialiser serialiser);
62 MLT_EXPORT int mlt_property_get_int(mlt_property self, double fps, mlt_locale_t);
63 MLT_EXPORT double mlt_property_get_double(mlt_property self, double fps, mlt_locale_t);
65 MLT_EXPORT int64_t mlt_property_get_int64(mlt_property self);
67 MLT_EXPORT char *mlt_property_get_string(mlt_property self);
70 MLT_EXPORT void *mlt_property_get_data(mlt_property self, int *length);
71 MLT_EXPORT void mlt_property_close(mlt_property self);
72 MLT_EXPORT void mlt_property_pass(mlt_property self, mlt_property that);
73 MLT_EXPORT char *mlt_property_get_time(mlt_property self, mlt_time_format, double fps, mlt_locale_t);
74 
76  mlt_property points[],
77  double progress,
78  double fps,
79  mlt_locale_t locale,
80  mlt_keyframe_type interp);
81 MLT_EXPORT double mlt_property_anim_get_double(
82  mlt_property self, double fps, mlt_locale_t locale, int position, int length);
84  mlt_property self, double fps, mlt_locale_t locale, int position, int length);
86  mlt_property self, double fps, mlt_locale_t locale, int position, int length);
88  double value,
89  double fps,
90  mlt_locale_t locale,
91  int position,
92  int length,
93  mlt_keyframe_type keyframe_type);
95  int value,
96  double fps,
97  mlt_locale_t locale,
98  int position,
99  int length,
100  mlt_keyframe_type keyframe_type);
102  mlt_property self, const char *value, double fps, mlt_locale_t locale, int position, int length);
104 MLT_EXPORT int mlt_property_is_anim(mlt_property self);
105 
106 MLT_EXPORT int mlt_property_set_color(mlt_property self, mlt_color value);
107 MLT_EXPORT mlt_color mlt_property_get_color(mlt_property self, double fps, mlt_locale_t locale);
109  mlt_color value,
110  double fps,
111  mlt_locale_t locale,
112  int position,
113  int length,
114  mlt_keyframe_type keyframe_type);
116  mlt_property self, double fps, mlt_locale_t locale, int position, int length);
117 
118 MLT_EXPORT int mlt_property_set_rect(mlt_property self, mlt_rect value);
121  mlt_rect value,
122  double fps,
123  mlt_locale_t locale,
124  int position,
125  int length,
126  mlt_keyframe_type keyframe_type);
128  mlt_property self, double fps, mlt_locale_t locale, int position, int length);
129 
130 MLT_EXPORT int mlt_property_set_properties(mlt_property self, mlt_properties properties);
132 MLT_EXPORT int mlt_property_is_color(mlt_property self);
133 MLT_EXPORT int mlt_property_is_numeric(mlt_property self, mlt_locale_t locale);
134 MLT_EXPORT int mlt_property_is_rect(mlt_property self);
135 
136 #endif
char * mlt_locale_t
Definition: mlt_property.h:46
Provides forward definitions of all public types.
char *(* mlt_serialiser)(void *, int length)
pointer to serialization function
Definition: mlt_types.h:308
mlt_time_format
The time string formats.
Definition: mlt_types.h:172
int32_t mlt_position
Definition: mlt_types.h:255
void(* mlt_destructor)(void *)
pointer to destructor function
Definition: mlt_types.h:307
mlt_keyframe_type
Interpolation methods for animation keyframes.
Definition: mlt_types.h:181
Property Animation class.
Definition: mlt_animation.c:51
A tuple of color components.
Definition: mlt_types.h:272
Properties class.
Definition: mlt_properties.h:41
Property class.
Definition: mlt_property.c:73
int mlt_property_set_position(mlt_property self, mlt_position value)
Set the property to a position value.
Definition: mlt_property.c:226
mlt_animation mlt_property_get_animation(mlt_property self)
Get an object's animation object.
Definition: mlt_property.c:1697
int mlt_property_get_int(mlt_property self, double fps, mlt_locale_t locale)
Get the property as an integer.
Definition: mlt_property.c:485
mlt_rect mlt_property_anim_get_rect(mlt_property self, double fps, mlt_locale_t locale, int position, int length)
Get a rectangle at a frame position.
Definition: mlt_property.c:2051
int mlt_property_set_data(mlt_property self, void *value, int length, mlt_destructor destructor, mlt_serialiser serialiser)
Set a property to an opaque binary value.
Definition: mlt_property.c:294
mlt_properties mlt_property_get_properties(mlt_property self)
Get a nested properties object.
Definition: mlt_property.c:2099
char * mlt_property_get_string_tf(mlt_property self, mlt_time_format time_format)
Get the property as a string (with time format).
Definition: mlt_property.c:723
int mlt_property_anim_set_int(mlt_property self, int value, double fps, mlt_locale_t locale, int position, int length, mlt_keyframe_type keyframe_type)
Set a property animation keyframe to an integer value.
Definition: mlt_property.c:1625
double mlt_property_anim_get_double(mlt_property self, double fps, mlt_locale_t locale, int position, int length)
Get the real number at a frame position.
Definition: mlt_property.c:1470
double mlt_property_get_double(mlt_property self, double fps, mlt_locale_t locale)
Get the property as a floating point.
Definition: mlt_property.c:604
mlt_rect mlt_property_get_rect(mlt_property self, mlt_locale_t locale)
Get the property as a rectangle.
Definition: mlt_property.c:1912
void * mlt_property_get_data(mlt_property self, int *length)
Get the binary data from a property.
Definition: mlt_property.c:899
mlt_property mlt_property_init()
Construct a property and initialize it.
Definition: mlt_property.c:101
int mlt_property_anim_set_color(mlt_property self, mlt_color value, double fps, mlt_locale_t locale, int position, int length, mlt_keyframe_type keyframe_type)
Set a property animation keyframe to a color.
Definition: mlt_property.c:1791
int mlt_property_anim_get_int(mlt_property self, double fps, mlt_locale_t locale, int position, int length)
Get the property as an integer number at a frame position.
Definition: mlt_property.c:1504
int mlt_property_set_int(mlt_property self, int value)
Set the property to an integer value.
Definition: mlt_property.c:189
int mlt_property_anim_set_string(mlt_property self, const char *value, double fps, mlt_locale_t locale, int position, int length)
Set a property animation keyframe to a string.
Definition: mlt_property.c:1667
int mlt_property_set_color(mlt_property self, mlt_color value)
Set the property to a color value.
Definition: mlt_property.c:1713
mlt_color mlt_property_get_color(mlt_property self, double fps, mlt_locale_t locale)
Get the property as a color.
Definition: mlt_property.c:1733
char * mlt_property_get_time(mlt_property self, mlt_time_format format, double fps, mlt_locale_t locale)
Get the property as a time string.
Definition: mlt_property.c:1090
int mlt_property_is_color(mlt_property self)
Check if a property is a color.
Definition: mlt_property.c:2129
void mlt_property_pass(mlt_property self, mlt_property that)
Copy a property.
Definition: mlt_property.c:934
char * mlt_property_get_string_l_tf(mlt_property self, mlt_locale_t locale, mlt_time_format time_format)
Get the property as a string (with locale and time format).
Definition: mlt_property.c:799
char * mlt_property_get_string(mlt_property self)
Get the property as a string.
Definition: mlt_property.c:781
int mlt_property_set_int64(mlt_property self, int64_t value)
Set the property to a 64-bit integer value.
Definition: mlt_property.c:269
int mlt_property_anim_set_double(mlt_property self, double value, double fps, mlt_locale_t locale, int position, int length, mlt_keyframe_type keyframe_type)
Set a property animation keyframe to a real number.
Definition: mlt_property.c:1585
int mlt_property_interpolate(mlt_property self, mlt_property p[], double progress, double fps, mlt_locale_t locale, mlt_keyframe_type interp)
Interpolate a new property value given a set of other properties.
Definition: mlt_property.c:1273
int mlt_property_is_anim(mlt_property self)
Check if a property is animated.
Definition: mlt_property.c:2117
void mlt_property_clear(mlt_property self)
Clear (0/null) a property.
Definition: mlt_property.c:156
int mlt_property_is_rect(mlt_property self)
Check if a property is a rect.
Definition: mlt_property.c:2156
int mlt_property_is_numeric(mlt_property self, mlt_locale_t locale)
Determine if the property holds a numeric or numeric string value.
Definition: mlt_property.c:1183
int64_t mlt_property_get_int64(mlt_property self)
Get the property as a signed integer.
Definition: mlt_property.c:687
int mlt_property_set_properties(mlt_property self, mlt_properties properties)
Set a nested properties object.
Definition: mlt_property.c:2082
int mlt_property_set_double(mlt_property self, double value)
Set the property to a floating point value.
Definition: mlt_property.c:207
int mlt_property_anim_set_rect(mlt_property self, mlt_rect value, double fps, mlt_locale_t locale, int position, int length, mlt_keyframe_type keyframe_type)
Set a property animation keyframe to a rectangle.
Definition: mlt_property.c:2013
int mlt_property_is_clear(mlt_property self)
Check if a property is cleared.
Definition: mlt_property.c:170
int mlt_property_set_rect(mlt_property self, mlt_rect value)
Set a property to a mlt_rect rectangle.
Definition: mlt_property.c:1887
char * mlt_property_anim_get_string(mlt_property self, double fps, mlt_locale_t locale, int position, int length)
Get the string at certain a frame position.
Definition: mlt_property.c:1538
mlt_position mlt_property_get_position(mlt_property self, double fps, mlt_locale_t locale)
Get the property as a position.
Definition: mlt_property.c:638
char * mlt_property_get_string_l(mlt_property self, mlt_locale_t locale)
Get the property as a string (with locale).
Definition: mlt_property.c:880
mlt_color mlt_property_anim_get_color(mlt_property self, double fps, mlt_locale_t locale, int position, int length)
Get a color at a frame position.
Definition: mlt_property.c:1829
int mlt_property_set_string(mlt_property self, const char *value)
Set the property to a string value.
Definition: mlt_property.c:246
void mlt_property_close(mlt_property self)
Destroy a property and free all related resources.
Definition: mlt_property.c:918
A rectangle type with coordinates, size, and opacity.
Definition: mlt_types.h:261