MLT  7.22.0
Public Member Functions | Data Fields | Private Member Functions
mlt_property_s Struct Reference

Property class. More...

Public Member Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void mlt_property_clear (mlt_property self)
 Clear (0/null) a property. More...
 
void mlt_property_close (mlt_property self)
 Destroy a property and free all related resources. More...
 
mlt_animation mlt_property_get_animation (mlt_property self)
 Get an object's animation object. More...
 
mlt_color mlt_property_get_color (mlt_property self, double fps, mlt_locale_t locale)
 Get the property as a color. More...
 
void * mlt_property_get_data (mlt_property self, int *length)
 Get the binary data from a property. More...
 
double mlt_property_get_double (mlt_property self, double fps, mlt_locale_t locale)
 Get the property as a floating point. More...
 
int mlt_property_get_int (mlt_property self, double fps, mlt_locale_t locale)
 Get the property as an integer. More...
 
int64_t mlt_property_get_int64 (mlt_property self)
 Get the property as a signed integer. More...
 
mlt_position mlt_property_get_position (mlt_property self, double fps, mlt_locale_t locale)
 Get the property as a position. More...
 
mlt_properties mlt_property_get_properties (mlt_property self)
 Get a nested properties object. More...
 
mlt_rect mlt_property_get_rect (mlt_property self, mlt_locale_t locale)
 Get the property as a rectangle. More...
 
char * mlt_property_get_string (mlt_property self)
 Get the property as a string. More...
 
char * mlt_property_get_string_l (mlt_property self, mlt_locale_t locale)
 Get the property as a string (with locale). More...
 
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). More...
 
char * mlt_property_get_string_tf (mlt_property self, mlt_time_format time_format)
 Get the property as a string (with time format). More...
 
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. More...
 
mlt_property mlt_property_init ()
 Construct a property and initialize it. More...
 
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. More...
 
int mlt_property_is_anim (mlt_property self)
 Check if a property is animated. More...
 
int mlt_property_is_clear (mlt_property self)
 Check if a property is cleared. More...
 
int mlt_property_is_color (mlt_property self)
 Check if a property is a color. More...
 
int mlt_property_is_numeric (mlt_property self, mlt_locale_t locale)
 Determine if the property holds a numeric or numeric string value. More...
 
int mlt_property_is_rect (mlt_property self)
 Check if a property is a rect. More...
 
void mlt_property_pass (mlt_property self, mlt_property that)
 Copy a property. More...
 
int mlt_property_set_color (mlt_property self, mlt_color value)
 Set the property to a color value. More...
 
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. More...
 
int mlt_property_set_double (mlt_property self, double value)
 Set the property to a floating point value. More...
 
int mlt_property_set_int (mlt_property self, int value)
 Set the property to an integer value. More...
 
int mlt_property_set_int64 (mlt_property self, int64_t value)
 Set the property to a 64-bit integer value. More...
 
int mlt_property_set_position (mlt_property self, mlt_position value)
 Set the property to a position value. More...
 
int mlt_property_set_properties (mlt_property self, mlt_properties properties)
 Set a nested properties object. More...
 
int mlt_property_set_rect (mlt_property self, mlt_rect value)
 Set a property to a mlt_rect rectangle. More...
 
int mlt_property_set_string (mlt_property self, const char *value)
 Set the property to a string value. More...
 

Data Fields

mlt_animation animation
 
void * data
 Generic type handling. More...
 
mlt_destructor destructor
 
int length
 
pthread_mutex_t mutex
 
double prop_double
 
int prop_int
 Atomic type handling. More...
 
int64_t prop_int64
 
mlt_position prop_position
 
char * prop_string
 String handling. More...
 
mlt_properties properties
 
mlt_serialiser serialiser
 
mlt_property_type types
 Stores a bit pattern of types available for this property. More...
 

Private Member Functions

static double catmull_rom_interpolate (double y0, double y1, double y2, double y3, double t)
 A smooth spline interpolation for animation. More...
 
static void clear_property (mlt_property self)
 Clear (0/null) a property. More...
 
static double linear_interpolate (double y1, double y2, double t)
 A linear interpolation function for animation. More...
 
static double mlt_property_atof (mlt_property self, double fps, mlt_locale_t locale)
 Convert a string to a floating point number. More...
 
static int mlt_property_atoi (mlt_property self, double fps, mlt_locale_t locale)
 Convert a string to an integer. More...
 
static int64_t mlt_property_atoll (const char *value)
 Convert a string to a 64-bit integer. More...
 
static void refresh_animation (mlt_property self, double fps, mlt_locale_t locale, int length)
 Create a new animation or refresh an existing one. More...
 
static char * serialise_mlt_rect (mlt_rect *rect, int length)
 Convert a rectangle value into a string. More...
 
static void time_clock_from_frames (int frames, double fps, char *s)
 Convert frame count to a SMIL clock value string. More...
 
static int time_clock_to_frames (mlt_property self, const char *s, double fps, mlt_locale_t locale)
 Parse a SMIL clock value. More...
 
static int time_code_to_frames (mlt_property self, const char *s, double fps)
 Parse a SMPTE timecode string. More...
 
static void time_smpte_from_frames (int frames, double fps, char *s, int drop)
 Convert frame count to a SMPTE timecode string. More...
 

Detailed Description

Property class.

A property is like a variant or dynamic type. They are used for many things in MLT, but in particular they are the parameter mechanism for the plugins.

Member Function Documentation

◆ catmull_rom_interpolate()

static double catmull_rom_interpolate ( double  y0,
double  y1,
double  y2,
double  y3,
double  t 
)
inlineprivate

A smooth spline interpolation for animation.

Deprecated:
For non-closed curves, you need to also supply the tangent vector at the first and last control point. This is commonly done: T(P[0]) = P[1] - P[0] and T(P[n]) = P[n] - P[n-1].

◆ clear_property()

static void clear_property ( mlt_property  self)
private

Clear (0/null) a property.

Frees up any associated resources in the process.

Parameters
selfa property

◆ linear_interpolate()

static double linear_interpolate ( double  y1,
double  y2,
double  t 
)
inlineprivate

A linear interpolation function for animation.

Deprecated:

◆ mlt_property_anim_get_color()

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.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
the color

◆ mlt_property_anim_get_double()

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.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
the real number

◆ mlt_property_anim_get_int()

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.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
an integer value

◆ mlt_property_anim_get_rect()

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.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
the rectangle

◆ mlt_property_anim_get_string()

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.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
the string representation of the property or NULL if failed

◆ mlt_property_anim_set_color()

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.

Parameters
selfa property
valuea color
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
keyframe_typethe interpolation method for this keyframe
Returns
false if successful, true to indicate error

◆ mlt_property_anim_set_double()

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.

Parameters
selfa property
valuea double precision floating point value
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
keyframe_typethe interpolation method for this keyframe
Returns
false if successful, true to indicate error

◆ mlt_property_anim_set_int()

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.

Parameters
selfa property
valuean integer
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
keyframe_typethe interpolation method for this keyframe
Returns
false if successful, true to indicate error

◆ mlt_property_anim_set_rect()

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.

Parameters
selfa property
valuea rectangle
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
keyframe_typethe interpolation method for this keyframe
Returns
false if successful, true to indicate error

◆ mlt_property_anim_set_string()

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.

Strings only support discrete animation. Do not use this to set a property's animation string that contains a semicolon-delimited set of values; use mlt_property_set() for that.

Parameters
selfa property
valuea string
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
positionthe frame number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that
Returns
false if successful, true to indicate error

◆ mlt_property_atof()

static double mlt_property_atof ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)
private

Convert a string to a floating point number.

If the string contains a colon it is interpreted as a time value. If it also contains a period or comma character, the string is parsed as a clock value: HH:MM:SS. Otherwise, the time value is parsed as a SMPTE timecode: HH:MM:SS:FF. If the numeric string ends with '' then the value is divided by 100 to convert it into a ratio.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use when converting from time clock value
Returns
the resultant real number

◆ mlt_property_atoi()

static int mlt_property_atoi ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)
private

Convert a string to an integer.

The string must begin with '0x' to be interpreted as hexadecimal. Otherwise, it is interpreted as base 10.

If the string begins with '#' it is interpreted as a hexadecimal color value in the form RRGGBB or AARRGGBB. Color values that begin with '0x' are always in the form RRGGBBAA where the alpha components are not optional. Applications and services should expect the binary color value in bytes to be in the following order: RGBA. This means they will have to cast the int to an unsigned int. This is especially important when they need to shift right to obtain RGB without alpha in order to make it do a logical instead of arithmetic shift.

If the string contains a colon it is interpreted as a time value. If it also contains a period or comma character, the string is parsed as a clock value: HH:MM:SS. Otherwise, the time value is parsed as a SMPTE timecode: HH:MM:SS:FF.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use when converting from time clock value
Returns
the resultant integer

◆ mlt_property_atoll()

static int64_t mlt_property_atoll ( const char *  value)
inlineprivate

Convert a string to a 64-bit integer.

If the string begins with '0x' it is interpreted as a hexadecimal value.

Parameters
valuea string
Returns
a 64-bit integer

◆ mlt_property_clear()

void mlt_property_clear ( mlt_property  self)

Clear (0/null) a property.

Frees up any associated resources in the process.

Parameters
selfa property

◆ mlt_property_close()

void mlt_property_close ( mlt_property  self)

Destroy a property and free all related resources.

Parameters
selfa property

◆ mlt_property_get_animation()

mlt_animation mlt_property_get_animation ( mlt_property  self)

Get an object's animation object.

You might need to call another mlt_property_anim_ function to actually construct the animation, as this is a simple accessor function.

Parameters
selfa property
Returns
the animation object or NULL if there is no animation

◆ mlt_property_get_color()

mlt_color mlt_property_get_color ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)

Get the property as a color.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use for when converting from a string
Returns
a color value

◆ mlt_property_get_data()

void * mlt_property_get_data ( mlt_property  self,
int *  length 
)

Get the binary data from a property.

This only works if you previously put binary data into the property. This does not return a copy of the data; it returns a pointer to it. If you supplied a destructor function when setting the binary data, the destructor is used when the Property is closed to free the memory. Therefore, only free the returned pointer if you did not supply a destructor function.

Parameters
selfa property
[out]lengththe size of the binary object in bytes (optional)
Returns
an opaque data pointer or NULL if not available

◆ mlt_property_get_double()

double mlt_property_get_double ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)

Get the property as a floating point.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use for this conversion
Returns
a floating point value

◆ mlt_property_get_int()

int mlt_property_get_int ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)

Get the property as an integer.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use when converting from time clock value
Returns
an integer value

◆ mlt_property_get_int64()

int64_t mlt_property_get_int64 ( mlt_property  self)

Get the property as a signed integer.

Parameters
selfa property
Returns
a 64-bit integer

◆ mlt_property_get_position()

mlt_position mlt_property_get_position ( mlt_property  self,
double  fps,
mlt_locale_t  locale 
)

Get the property as a position.

A position is an offset time in terms of frame units.

Parameters
selfa property
fpsframes per second, used when converting from time value
localethe locale to use when converting from time clock value
Returns
the position in frames

◆ mlt_property_get_properties()

mlt_properties mlt_property_get_properties ( mlt_property  self)

Get a nested properties object.

Parameters
selfa property
Returns
the nested properties list

◆ mlt_property_get_rect()

mlt_rect mlt_property_get_rect ( mlt_property  self,
mlt_locale_t  locale 
)

Get the property as a rectangle.

You can use any non-numeric character(s) as a field delimiter. If the number has a '' immediately following it, the number is divided by 100 to convert it into a real number.

Parameters
selfa property
localethe locale to use for when converting from a string
Returns
a rectangle value

◆ mlt_property_get_string()

char * mlt_property_get_string ( mlt_property  self)

Get the property as a string.

The caller is not responsible for deallocating the returned string! The string is deallocated when the Property is closed. This tries its hardest to convert the property to string including using a serialization function for binary data, if supplied.

Parameters
selfa property
Returns
a string representation of the property or NULL if failed

◆ mlt_property_get_string_l()

char * mlt_property_get_string_l ( mlt_property  self,
mlt_locale_t  locale 
)

Get the property as a string (with locale).

The caller is not responsible for deallocating the returned string! The string is deallocated when the Property is closed. This tries its hardest to convert the property to string including using a serialization function for binary data, if supplied.

Parameters
selfa property
localethe locale to use for this conversion
Returns
a string representation of the property or NULL if failed

◆ mlt_property_get_string_l_tf()

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).

The caller is not responsible for deallocating the returned string! The string is deallocated when the Property is closed. This tries its hardest to convert the property to string including using a serialization function for binary data, if supplied.

Parameters
selfa property
localethe locale to use for this conversion
time_formatthe time format to use for animation
Returns
a string representation of the property or NULL if failed

◆ mlt_property_get_string_tf()

char * mlt_property_get_string_tf ( mlt_property  self,
mlt_time_format  time_format 
)

Get the property as a string (with time format).

The caller is not responsible for deallocating the returned string! The string is deallocated when the Property is closed. This tries its hardest to convert the property to string including using a serialization function for binary data, if supplied.

Parameters
selfa property
time_formatthe time format to use for animation
Returns
a string representation of the property or NULL if failed

◆ mlt_property_get_time()

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.

The time value can be either a SMPTE timecode or SMIL clock value. The caller is not responsible for deallocating the returned string! The string is deallocated when the property is closed.

Parameters
selfa property
formatthe time format that you want
fpsframes per second
localethe locale to use for this conversion
Returns
a string representation of the property or NULL if failed

◆ mlt_property_init()

mlt_property mlt_property_init ( )

Construct a property and initialize it.

◆ mlt_property_interpolate()

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.

Deprecated:
Parameters
selfthe property onto which to set the computed value
pan array of at least 1 value in p[1] if interp is discrete, 2 values in p[1] and p[2] if interp is linear, or 4 values in p[0] - p[3] if interp is smooth
progressa ratio in the range [0, 1] to indicate how far between p[1] and p[2]
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
interpthe interpolation method to use
Returns
true if there was an error

◆ mlt_property_is_anim()

int mlt_property_is_anim ( mlt_property  self)

Check if a property is animated.

This is not a thread-safe function because it is used internally by mlt_property_s under a lock. However, external callers should protect it.

Parameters
selfa property
Returns
true if the property is animated

◆ mlt_property_is_clear()

int mlt_property_is_clear ( mlt_property  self)

Check if a property is cleared.

Parameters
selfa property
Returns
true if a property is clear. false if it has been set.

◆ mlt_property_is_color()

int mlt_property_is_color ( mlt_property  self)

Check if a property is a color.

Parameters
selfa property
Returns
true if the property is color

◆ mlt_property_is_numeric()

int mlt_property_is_numeric ( mlt_property  self,
mlt_locale_t  locale 
)

Determine if the property holds a numeric or numeric string value.

Parameters
selfa property
localethe locale to use for string evaluation
Returns
true if it is numeric

◆ mlt_property_is_rect()

int mlt_property_is_rect ( mlt_property  self)

Check if a property is a rect.

Parameters
selfa property
Returns
true if the property is a rect

◆ mlt_property_pass()

void mlt_property_pass ( mlt_property  self,
mlt_property  that 
)

Copy a property.

A Property holding binary data only copies the data if a serialiser function was supplied when you set the Property.

Author
Zach zacha.nosp@m.ry.d.nosp@m.rew@g.nosp@m.mail.nosp@m..com
Parameters
selfa property
thatanother property

◆ mlt_property_set_color()

int mlt_property_set_color ( mlt_property  self,
mlt_color  value 
)

Set the property to a color value.

Parameters
selfa property
valuean integer
Returns
false

◆ mlt_property_set_data()

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.

This does not make a copy of the data. You can use a Properties object with its reference tracking and the destructor function to control the lifetime of the data. Otherwise, pass NULL for the destructor function and control the lifetime yourself.

Parameters
selfa property
valuean opaque pointer
lengththe number of bytes pointed to by value (optional)
destructora function to use to destroy this binary data (optional, assuming you manage the resource)
serialisera function to use to convert this binary data to a string (optional)
Returns
false

◆ mlt_property_set_double()

int mlt_property_set_double ( mlt_property  self,
double  value 
)

Set the property to a floating point value.

Parameters
selfa property
valuea double precision floating point value
Returns
false

◆ mlt_property_set_int()

int mlt_property_set_int ( mlt_property  self,
int  value 
)

Set the property to an integer value.

Parameters
selfa property
valuean integer
Returns
false

◆ mlt_property_set_int64()

int mlt_property_set_int64 ( mlt_property  self,
int64_t  value 
)

Set the property to a 64-bit integer value.

Parameters
selfa property
valuea 64-bit integer
Returns
false

◆ mlt_property_set_position()

int mlt_property_set_position ( mlt_property  self,
mlt_position  value 
)

Set the property to a position value.

Position is a relative time value in frame units.

Parameters
selfa property
valuea position value
Returns
false

◆ mlt_property_set_properties()

int mlt_property_set_properties ( mlt_property  self,
mlt_properties  properties 
)

Set a nested properties object.

Parameters
selfa property
propertiesthe properties list to nest into self with name
Returns
true if error

◆ mlt_property_set_rect()

int mlt_property_set_rect ( mlt_property  self,
mlt_rect  value 
)

Set a property to a mlt_rect rectangle.

Parameters
selfa property
valuea rectangle
Returns
false

◆ mlt_property_set_string()

int mlt_property_set_string ( mlt_property  self,
const char *  value 
)

Set the property to a string value.

This makes a copy of the string you supply so you do not need to track a new reference to it.

Parameters
selfa property
valuethe string to copy to the property
Returns
true if it failed

◆ refresh_animation()

static void refresh_animation ( mlt_property  self,
double  fps,
mlt_locale_t  locale,
int  length 
)
private

Create a new animation or refresh an existing one.

Parameters
selfa property
fpsthe frame rate, which may be needed for converting a time string to frame units
localethe locale, which may be needed for converting a string to a real number
lengththe maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that

◆ serialise_mlt_rect()

static char * serialise_mlt_rect ( mlt_rect rect,
int  length 
)
private

Convert a rectangle value into a string.

The canonical form of a mlt_rect is a space delimited "x y w h o" even though many kinds of field delimiters may be used to convert a string to a rectangle.

Parameters
rectthe rectangle to convert
lengthnot used
Returns
the string representation of a rectangle

◆ time_clock_from_frames()

static void time_clock_from_frames ( int  frames,
double  fps,
char *  s 
)
private

Convert frame count to a SMIL clock value string.

Parameters
framesa frame count
fpsframes per second
[out]sthe string to write into - must have enough space to hold largest time string

◆ time_clock_to_frames()

static int time_clock_to_frames ( mlt_property  self,
const char *  s,
double  fps,
mlt_locale_t  locale 
)
private

Parse a SMIL clock value.

Parameters
selfa property
sthe string to parse
fpsframes per second
localethe locale to use for parsing a real number value
Returns
position in frames

◆ time_code_to_frames()

static int time_code_to_frames ( mlt_property  self,
const char *  s,
double  fps 
)
private

Parse a SMPTE timecode string.

Parameters
selfa property
sthe string to parse
fpsframes per second
Returns
position in frames

◆ time_smpte_from_frames()

static void time_smpte_from_frames ( int  frames,
double  fps,
char *  s,
int  drop 
)
private

Convert frame count to a SMPTE timecode string.

Parameters
framesa frame count
fpsframes per second
[out]sthe string to write into - must have enough space to hold largest time string

Field Documentation

◆ animation

mlt_animation mlt_property_s::animation

◆ data

void* mlt_property_s::data

Generic type handling.

◆ destructor

mlt_destructor mlt_property_s::destructor

◆ length

int mlt_property_s::length

◆ mutex

pthread_mutex_t mlt_property_s::mutex

◆ prop_double

double mlt_property_s::prop_double

◆ prop_int

int mlt_property_s::prop_int

Atomic type handling.

◆ prop_int64

int64_t mlt_property_s::prop_int64

◆ prop_position

mlt_position mlt_property_s::prop_position

◆ prop_string

char* mlt_property_s::prop_string

String handling.

◆ properties

mlt_properties mlt_property_s::properties

◆ serialiser

mlt_serialiser mlt_property_s::serialiser

◆ types

mlt_property_type mlt_property_s::types

Stores a bit pattern of types available for this property.


The documentation for this struct was generated from the following file: