MLT
7.28.0
|
Properties class. More...
#include <mlt_properties.h>
Public Member Functions | |
char * | mlt_properties_anim_get (mlt_properties self, const char *name, int position, int length) |
Get a string value by name at a frame position. More... | |
mlt_color | mlt_properties_anim_get_color (mlt_properties self, const char *name, int position, int length) |
Get a color associated to the name at a frame position. More... | |
double | mlt_properties_anim_get_double (mlt_properties self, const char *name, int position, int length) |
Get a real number associated to the name at a frame position. More... | |
int | mlt_properties_anim_get_int (mlt_properties self, const char *name, int position, int length) |
Get an integer associated to the name at a frame position. More... | |
mlt_rect | mlt_properties_anim_get_rect (mlt_properties self, const char *name, int position, int length) |
Get a rectangle associated to the name at a frame position. More... | |
int | mlt_properties_anim_set (mlt_properties self, const char *name, const char *value, int position, int length) |
Set a property to a string at a frame position. More... | |
int | mlt_properties_anim_set_color (mlt_properties self, const char *name, mlt_color value, int position, int length, mlt_keyframe_type keyframe_type) |
Set a property to an integer value by color at a frame position. More... | |
int | mlt_properties_anim_set_double (mlt_properties self, const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type) |
Set a property to a real number at a frame position. More... | |
int | mlt_properties_anim_set_int (mlt_properties self, const char *name, int value, int position, int length, mlt_keyframe_type keyframe_type) |
Set a property to an integer value at a frame position. More... | |
int | mlt_properties_anim_set_rect (mlt_properties self, const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type) |
Set a property to a rectangle value at a frame position. More... | |
void | mlt_properties_clear (mlt_properties self, const char *name) |
Remove the value for a property. More... | |
void | mlt_properties_close (mlt_properties self) |
Close a properties object. More... | |
int | mlt_properties_copy (mlt_properties self, mlt_properties that, const char *prefix) |
Copy all serializable properties that match a prefix to another properties object. More... | |
int | mlt_properties_count (mlt_properties self) |
Return the number of items in the list. More... | |
void | mlt_properties_debug (mlt_properties self, const char *title, FILE *output) |
Output the properties to a file handle. More... | |
int | mlt_properties_dec_ref (mlt_properties self) |
Decrement the reference count. More... | |
int | mlt_properties_dir_list (mlt_properties self, const char *dirname, const char *pattern, int sort) |
Get the contents of a directory. More... | |
void | mlt_properties_dump (mlt_properties self, FILE *output) |
Dump the properties to a file handle. More... | |
int | mlt_properties_exists (mlt_properties self, const char *name) |
Check if a property exists. More... | |
char * | mlt_properties_frames_to_time (mlt_properties self, mlt_position frames, mlt_time_format format) |
Convert a frame count to a time string. More... | |
int | mlt_properties_from_utf8 (mlt_properties properties, const char *name_from, const char *name_to) |
Convert UTF-8 property to the locale-defined encoding. More... | |
char * | mlt_properties_get (mlt_properties self, const char *name) |
Get a string value by name. More... | |
mlt_animation | mlt_properties_get_animation (mlt_properties self, const char *name) |
Get the animation associated to the name. More... | |
mlt_color | mlt_properties_get_color (mlt_properties self, const char *name) |
Convert a numeric property to a tuple of color components. More... | |
void * | mlt_properties_get_data (mlt_properties self, const char *name, int *length) |
Get a binary data value associated to the name. More... | |
void * | mlt_properties_get_data_at (mlt_properties self, int index, int *size) |
Get a data value by index. More... | |
double | mlt_properties_get_double (mlt_properties self, const char *name) |
Get a floating point value associated to the name. More... | |
int | mlt_properties_get_int (mlt_properties self, const char *name) |
Get an integer associated to the name. More... | |
int64_t | mlt_properties_get_int64 (mlt_properties self, const char *name) |
Get a 64-bit integer associated to the name. More... | |
const char * | mlt_properties_get_lcnumeric (mlt_properties self) |
Get the numeric locale for this properties object. More... | |
char * | mlt_properties_get_name (mlt_properties self, int index) |
Get a property name by index. More... | |
mlt_position | mlt_properties_get_position (mlt_properties self, const char *name) |
Get a position value associated to the name. More... | |
mlt_properties | mlt_properties_get_properties (mlt_properties self, const char *name) |
Get a nested properties object by name. More... | |
mlt_properties | mlt_properties_get_properties_at (mlt_properties self, int index) |
Get a nested properties object by index. More... | |
mlt_rect | mlt_properties_get_rect (mlt_properties self, const char *name) |
Get a rectangle associated to the name. More... | |
char * | mlt_properties_get_time (mlt_properties self, const char *name, mlt_time_format format) |
Get a time string associated to the name. More... | |
char * | mlt_properties_get_value (mlt_properties self, int index) |
Get a property's string value by index. More... | |
char * | mlt_properties_get_value_tf (mlt_properties self, int index, mlt_time_format time_format) |
Get a property's string value by index (with time format). More... | |
int | mlt_properties_inc_ref (mlt_properties self) |
Increment the reference count. More... | |
int | mlt_properties_inherit (mlt_properties self, mlt_properties that) |
Copy all serializable properties to another properties list. More... | |
int | mlt_properties_init (mlt_properties self, void *child) |
Initialize a properties object that was already allocated. More... | |
int | mlt_properties_is_anim (mlt_properties self, const char *name) |
Check if a property is animated. More... | |
int | mlt_properties_is_sequence (mlt_properties properties) |
Determine if the properties list is really just a sequence or ordered list. More... | |
mlt_properties | mlt_properties_load (const char *filename) |
Create a properties object by reading a .properties text file. More... | |
void | mlt_properties_lock (mlt_properties self) |
Protect a properties list against concurrent access. More... | |
void | mlt_properties_mirror (mlt_properties self, mlt_properties that) |
Set a properties list to be a mirror copy of another. More... | |
mlt_properties | mlt_properties_new () |
Create a properties object. More... | |
int | mlt_properties_parse (mlt_properties self, const char *namevalue) |
Set a value by parsing a name=value string. More... | |
mlt_properties | mlt_properties_parse_yaml (const char *filename) |
Parse a YAML Tiny file by name. More... | |
int | mlt_properties_pass (mlt_properties self, mlt_properties that, const char *prefix) |
Pass all serializable properties that match a prefix to another properties object. More... | |
int | mlt_properties_pass_list (mlt_properties self, mlt_properties that, const char *list) |
Copy all properties specified in a comma-separated list to another properties list. More... | |
void | mlt_properties_pass_property (mlt_properties self, mlt_properties that, const char *name) |
Copy a property to another properties list. More... | |
int | mlt_properties_preset (mlt_properties self, const char *name) |
Set properties from a preset. More... | |
int | mlt_properties_ref_count (mlt_properties self) |
Get the reference count. More... | |
int | mlt_properties_rename (mlt_properties self, const char *source, const char *dest) |
Rename a property. More... | |
int | mlt_properties_save (mlt_properties self, const char *filename) |
Save the properties to a file by name. More... | |
char * | mlt_properties_serialise_yaml (mlt_properties self) |
Serialize a properties list as a string of YAML Tiny. More... | |
int | mlt_properties_set (mlt_properties self, const char *name, const char *value) |
Set a property to a string. More... | |
int | mlt_properties_set_color (mlt_properties self, const char *name, mlt_color color) |
Set a property to an integer value by color. More... | |
int | mlt_properties_set_data (mlt_properties self, const char *name, void *value, int length, mlt_destructor destroy, mlt_serialiser serialise) |
Store binary data as a property. More... | |
int | mlt_properties_set_double (mlt_properties self, const char *name, double value) |
Set a property to a floating point value. More... | |
int | mlt_properties_set_int (mlt_properties self, const char *name, int value) |
Set a property to an integer value. More... | |
int | mlt_properties_set_int64 (mlt_properties self, const char *name, int64_t value) |
Set a property to a 64-bit integer value. More... | |
int | mlt_properties_set_lcnumeric (mlt_properties self, const char *locale) |
Set the numeric locale used for string/double conversions. More... | |
int | mlt_properties_set_or_default (mlt_properties self, const char *name, const char *value, const char *def) |
Set or default a property to a string. More... | |
int | mlt_properties_set_position (mlt_properties self, const char *name, mlt_position value) |
Set a property to a position value. More... | |
int | mlt_properties_set_properties (mlt_properties self, const char *name, mlt_properties properties) |
Set a property to a nested properties object. More... | |
int | mlt_properties_set_rect (mlt_properties self, const char *name, mlt_rect value) |
Set a property to a rectangle value. More... | |
int | mlt_properties_set_string (mlt_properties self, const char *name, const char *value) |
Set a property to a string. More... | |
mlt_position | mlt_properties_time_to_frames (mlt_properties self, const char *time) |
Convert a time string to a frame count. More... | |
void | mlt_properties_unlock (mlt_properties self) |
End protecting a properties list against concurrent access. More... | |
Data Fields | |
mlt_destructor | close |
the destructor virtual function More... | |
void * | close_object |
the object supplied to the close virtual function More... | |
Private Member Functions | |
static int | generate_hash (const char *name) |
Generate a hash key. More... | |
static int | mlt_compare (const void *self, const void *that) |
Compare the string or serialized value of two properties. More... | |
static int | mlt_fnmatch (const char *wild, const char *file) |
Test whether a filename or pathname matches a shell-style pattern. More... | |
static mlt_property | mlt_properties_add (mlt_properties self, const char *name) |
Add a new property. More... | |
static void | mlt_properties_do_mirror (mlt_properties self, const char *name) |
Copy a serializable property to a properties list that is mirroring this one. More... | |
static mlt_property | mlt_properties_fetch (mlt_properties self, const char *name) |
Fetch a property by name and add one if not found. More... | |
static mlt_property | mlt_properties_find (mlt_properties self, const char *name) |
Locate a property by name. More... | |
static void | serialise_yaml (mlt_properties self, strbuf output, int indent, int is_parent_sequence) |
Recursively serialize a properties list into a string buffer as YAML Tiny. More... | |
Private Attributes | |
void * | child |
the object of a subclass More... | |
void * | local |
instance object More... | |
Properties class.
Properties is a combination list/dictionary of name/mlt_property pairs. It is also a base class for many of the other MLT classes.
|
inlineprivate |
Generate a hash key.
name | a string |
|
private |
Compare the string or serialized value of two properties.
self | a property |
that | a property |
self
less than that
, 0 if equal, or > 0 if self
is greater than that
|
private |
Test whether a filename or pathname matches a shell-style pattern.
wild | a string containing a wildcard pattern |
file | the name of a file to test against |
|
private |
Add a new property.
self | a properties list |
name | the name of the new property |
char * mlt_properties_anim_get | ( | mlt_properties | self, |
const char * | name, | ||
int | position, | ||
int | length | ||
) |
Get a string value by name at a frame position.
Do not free the returned string. It's lifetime is controlled by the property and this properties object. Enclose a string property value in double quotation marks to prevent mlt_properties_anim_get() from interpreting the string as animation. The double-quotes are removed when retrieved through mlt_properties_anim_get(). The same rule applies to string keyframe values: to protect a keyframed-string value containing a semicolon or equal sign, enclose it in double-quotes.
self | a properties list |
name | the property to get |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
mlt_color mlt_properties_anim_get_color | ( | mlt_properties | self, |
const char * | name, | ||
int | position, | ||
int | length | ||
) |
Get a color associated to the name at a frame position.
self | a properties list |
name | the property to get |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
double mlt_properties_anim_get_double | ( | mlt_properties | self, |
const char * | name, | ||
int | position, | ||
int | length | ||
) |
Get a real number associated to the name at a frame position.
self | a properties list |
name | the property to get |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
int mlt_properties_anim_get_int | ( | mlt_properties | self, |
const char * | name, | ||
int | position, | ||
int | length | ||
) |
Get an integer associated to the name at a frame position.
self | a properties list |
name | the property to get |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
mlt_rect mlt_properties_anim_get_rect | ( | mlt_properties | self, |
const char * | name, | ||
int | position, | ||
int | length | ||
) |
Get a rectangle associated to the name at a frame position.
self | a properties list |
name | the property to get |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
int mlt_properties_anim_set | ( | mlt_properties | self, |
const char * | name, | ||
const char * | value, | ||
int | position, | ||
int | length | ||
) |
Set a property to a string at a frame position.
The event "property-changed" is fired after the property has been set.
This makes a copy of the string value you supply.
self | a properties list |
name | the property to set |
value | the property's new value |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
int mlt_properties_anim_set_color | ( | mlt_properties | self, |
const char * | name, | ||
mlt_color | value, | ||
int | position, | ||
int | length, | ||
mlt_keyframe_type | keyframe_type | ||
) |
Set a property to an integer value by color at a frame position.
self | a properties list |
name | the property to set |
value | the color |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
keyframe_type | the interpolation method for this keyframe |
int mlt_properties_anim_set_double | ( | mlt_properties | self, |
const char * | name, | ||
double | value, | ||
int | position, | ||
int | length, | ||
mlt_keyframe_type | keyframe_type | ||
) |
Set a property to a real number at a frame position.
self | a properties list |
name | the property to set |
value | the real number |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
keyframe_type | the interpolation method for this keyframe |
int mlt_properties_anim_set_int | ( | mlt_properties | self, |
const char * | name, | ||
int | value, | ||
int | position, | ||
int | length, | ||
mlt_keyframe_type | keyframe_type | ||
) |
Set a property to an integer value at a frame position.
self | a properties list |
name | the property to set |
value | the integer |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
keyframe_type | the interpolation method for this keyframe |
int mlt_properties_anim_set_rect | ( | mlt_properties | self, |
const char * | name, | ||
mlt_rect | value, | ||
int | position, | ||
int | length, | ||
mlt_keyframe_type | keyframe_type | ||
) |
Set a property to a rectangle value at a frame position.
self | a properties list |
name | the property to set |
value | the rectangle |
position | the frame number |
length | the maximum number of frames when interpreting negative keyframe times, <=0 if you don't care or need that |
keyframe_type | the interpolation method for this keyframe |
void mlt_properties_clear | ( | mlt_properties | self, |
const char * | name | ||
) |
Remove the value for a property.
This initializes the value to zero and removes any string, data, or animation. This is especially useful when you want to reset an animation.
self | a properties list |
name | the name of the property to clear |
void mlt_properties_close | ( | mlt_properties | self | ) |
Close a properties object.
Deallocates the properties object and everything it contains.
self | a properties object |
int mlt_properties_copy | ( | mlt_properties | self, |
mlt_properties | that, | ||
const char * | prefix | ||
) |
Copy all serializable properties that match a prefix to another properties object.
self | the properties to copy to |
that | The properties to copy from |
prefix | the property names to match (required) |
int mlt_properties_count | ( | mlt_properties | self | ) |
Return the number of items in the list.
self | a properties list |
void mlt_properties_debug | ( | mlt_properties | self, |
const char * | title, | ||
FILE * | output | ||
) |
Output the properties to a file handle.
This version includes reference counts and does not put each property on a new line.
self | a properties pointer |
title | a string to preface the output |
output | a file handle |
int mlt_properties_dec_ref | ( | mlt_properties | self | ) |
Decrement the reference count.
self | a properties list |
int mlt_properties_dir_list | ( | mlt_properties | self, |
const char * | dirname, | ||
const char * | pattern, | ||
int | sort | ||
) |
Get the contents of a directory.
Obtains an optionally sorted list of the files found in a directory with a specific wild card. Entries in the list have a numeric name (running from 0 to count - 1). Only values change position if sort is enabled. Designed to be posix compatible (linux, os/x, mingw etc).
self | a properties list |
dirname | the name of the directory |
pattern | a wildcard pattern to filter the directory listing |
sort | Do you want to sort the directory listing? |
|
inlineprivate |
Copy a serializable property to a properties list that is mirroring this one.
Special case - when a container (such as loader) is protecting another producer, we need to ensure that properties are passed through to the real producer.
self | a properties list |
name | the name of the property to copy |
void mlt_properties_dump | ( | mlt_properties | self, |
FILE * | output | ||
) |
Dump the properties to a file handle.
self | a properties list |
output | a file handle |
int mlt_properties_exists | ( | mlt_properties | self, |
const char * | name | ||
) |
Check if a property exists.
This function is not a substitute for checking for NULL as a property could be set to NULL.
This function will return false immediately after a call to mlt_properties_clear() or if the property has never been created.
self | a properties list |
name | the name of the property to query |
|
private |
Fetch a property by name and add one if not found.
self | a properties list |
name | the property to lookup or add |
|
inlineprivate |
Locate a property by name.
self | a properties list |
name | the property to lookup by name |
char * mlt_properties_frames_to_time | ( | mlt_properties | self, |
mlt_position | frames, | ||
mlt_time_format | format | ||
) |
Convert a frame count to a time string.
Do not free the returned string. It's lifetime is controlled by the property.
self | a properties list |
frames | the frame count to convert |
format | the time format that you want |
int mlt_properties_from_utf8 | ( | mlt_properties | properties, |
const char * | name_from, | ||
const char * | name_to | ||
) |
Convert UTF-8 property to the locale-defined encoding.
MLT uses UTF-8 for strings, but Windows cannot accept UTF-8 for a filename. Windows uses code pages for the locale encoding.
self | a properties list |
name_from | the property to read whose value is a UTF-8 string |
name_to | the name of the new property that will contain converted string |
char * mlt_properties_get | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a string value by name.
Do not free the returned string. It's lifetime is controlled by the property and this properties object.
self | a properties list |
name | the property to get |
mlt_animation mlt_properties_get_animation | ( | mlt_properties | self, |
const char * | name | ||
) |
Get the animation associated to the name.
self | a properties list |
name | the property to get |
mlt_color mlt_properties_get_color | ( | mlt_properties | self, |
const char * | name | ||
) |
Convert a numeric property to a tuple of color components.
If the property's string is red, green, blue, white, or black, then it is converted to the corresponding opaque color tuple. Otherwise, the property is fetched as an integer and then converted.
self | a properties list |
name | the property to get |
void * mlt_properties_get_data | ( | mlt_properties | self, |
const char * | name, | ||
int * | length | ||
) |
Get a binary data value associated to the name.
Do not free the returned pointer if you supplied a destructor function when you set this property.
self | a properties list | |
name | the property to get | |
[out] | length | The size of the binary data in bytes, if available (often it is not, you should know) |
void * mlt_properties_get_data_at | ( | mlt_properties | self, |
int | index, | ||
int * | size | ||
) |
Get a data value by index.
Do not free the returned pointer if you supplied a destructor function when you set this property.
self | a properties list | |
index | the numeric index of the property | |
[out] | size | the size of the binary data in bytes or NULL if the index is out of range |
double mlt_properties_get_double | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a floating point value associated to the name.
self | a properties list |
name | the property to get |
int mlt_properties_get_int | ( | mlt_properties | self, |
const char * | name | ||
) |
Get an integer associated to the name.
self | a properties list |
name | the property to get |
int64_t mlt_properties_get_int64 | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a 64-bit integer associated to the name.
self | a properties list |
name | the property to get |
const char * mlt_properties_get_lcnumeric | ( | mlt_properties | self | ) |
Get the numeric locale for this properties object.
Do not free the result.
self | a properties list |
char * mlt_properties_get_name | ( | mlt_properties | self, |
int | index | ||
) |
Get a property name by index.
Do not free the returned string.
self | a properties list |
index | the numeric index of the property |
mlt_position mlt_properties_get_position | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a position value associated to the name.
self | a properties list |
name | the property to get |
mlt_properties mlt_properties_get_properties | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a nested properties object by name.
self | a properties list |
name | the property to get |
mlt_properties mlt_properties_get_properties_at | ( | mlt_properties | self, |
int | index | ||
) |
Get a nested properties object by index.
self | a properties list |
index | the 0-based index value of the list item |
mlt_rect mlt_properties_get_rect | ( | mlt_properties | self, |
const char * | name | ||
) |
Get a rectangle associated to the name.
self | a properties list |
name | the property to get |
char * mlt_properties_get_time | ( | mlt_properties | self, |
const char * | name, | ||
mlt_time_format | format | ||
) |
Get a time string associated to the name.
Do not free the returned string. It's lifetime is controlled by the property.
self | a properties list |
name | the property to get |
format | the time format that you want |
name
does not exist or there is no profile char * mlt_properties_get_value | ( | mlt_properties | self, |
int | index | ||
) |
Get a property's string value by index.
Do not free the returned string.
self | a properties list |
index | the numeric index of the property |
char * mlt_properties_get_value_tf | ( | mlt_properties | self, |
int | index, | ||
mlt_time_format | time_format | ||
) |
Get a property's string value by index (with time format).
Do not free the returned string.
self | a properties list |
index | the numeric index of the property |
time_format | the time format to use for animation |
int mlt_properties_inc_ref | ( | mlt_properties | self | ) |
Increment the reference count.
self | a properties list |
int mlt_properties_inherit | ( | mlt_properties | self, |
mlt_properties | that | ||
) |
Copy all serializable properties to another properties list.
self | The properties to copy to |
that | The properties to copy from |
int mlt_properties_init | ( | mlt_properties | self, |
void * | child | ||
) |
Initialize a properties object that was already allocated.
This does allocate its property_list, and it adds a reference count.
self | the properties structure to initialize |
child | an opaque pointer to a subclass object |
int mlt_properties_is_anim | ( | mlt_properties | self, |
const char * | name | ||
) |
Check if a property is animated.
self | a properties list |
name | the property to get |
int mlt_properties_is_sequence | ( | mlt_properties | properties | ) |
Determine if the properties list is really just a sequence or ordered list.
properties | a properties list |
mlt_properties mlt_properties_load | ( | const char * | filename | ) |
Create a properties object by reading a .properties text file.
Free the properties object with mlt_properties_close().
filename | the absolute file name |
void mlt_properties_lock | ( | mlt_properties | self | ) |
Protect a properties list against concurrent access.
self | a properties list |
void mlt_properties_mirror | ( | mlt_properties | self, |
mlt_properties | that | ||
) |
Set a properties list to be a mirror copy of another.
Note that this does not copy all existing properties. Rather, you must call this before setting the properties that you wish to copy.
that | the properties which will receive copies of the properties as they are set. |
self | the properties to mirror |
mlt_properties mlt_properties_new | ( | ) |
Create a properties object.
This allocates the properties structure and calls mlt_properties_init() on it. Free the properties object with mlt_properties_close().
int mlt_properties_parse | ( | mlt_properties | self, |
const char * | namevalue | ||
) |
Set a value by parsing a name=value string.
self | a properties list |
namevalue | a string containing name and value delimited by '=' |
mlt_properties mlt_properties_parse_yaml | ( | const char * | filename | ) |
Parse a YAML Tiny file by name.
filename | the name of a text file containing YAML Tiny |
int mlt_properties_pass | ( | mlt_properties | self, |
mlt_properties | that, | ||
const char * | prefix | ||
) |
Pass all serializable properties that match a prefix to another properties object.
self
properties list! For example a property named "foo.bar" will match prefix "foo.", but the property will be named simply "bar" on the receiving properties object.self | the properties to copy to |
that | The properties to copy from |
prefix | the property names to match (required) |
int mlt_properties_pass_list | ( | mlt_properties | self, |
mlt_properties | that, | ||
const char * | list | ||
) |
Copy all properties specified in a comma-separated list to another properties list.
White space is also a delimiter.
self | the properties to copy to |
that | the properties to copy from |
list | a delimited list of property names |
void mlt_properties_pass_property | ( | mlt_properties | self, |
mlt_properties | that, | ||
const char * | name | ||
) |
Copy a property to another properties list.
self | the properties to copy to |
that | the properties to copy from |
name | the name of the property to copy |
int mlt_properties_preset | ( | mlt_properties | self, |
const char * | name | ||
) |
Set properties from a preset.
Presets are typically installed to $prefix/share/mlt/presets/{type}/{service}/[{profile}/]{name}. For example, "/usr/share/mlt/presets/consumer/avformat/dv_ntsc_wide/DVD" could be an encoding preset for a widescreen NTSC DVD Video. Do not specify the type and service in the preset name parameter; these are inferred automatically from the service to which you are applying the preset. Using the example above and assuming you are calling this function on the avformat consumer, the name passed to the function should simply be DVD. Note that the profile portion of the path is optional, but a profile-specific preset with the same name as a more generic one is given a higher priority.
self | a properties list |
name | the name of a preset in a well-known location or the explicit path |
int mlt_properties_ref_count | ( | mlt_properties | self | ) |
Get the reference count.
self | a properties list |
int mlt_properties_rename | ( | mlt_properties | self, |
const char * | source, | ||
const char * | dest | ||
) |
Rename a property.
self | a properties list |
source | the property to rename |
dest | the new name |
int mlt_properties_save | ( | mlt_properties | self, |
const char * | filename | ||
) |
Save the properties to a file by name.
This uses the dump format - one line per property.
self | a properties list |
filename | the name of a file to create or overwrite |
char * mlt_properties_serialise_yaml | ( | mlt_properties | self | ) |
Serialize a properties list as a string of YAML Tiny.
The caller MUST free the returned string! This operates on properties containing properties as a hierarchical data structure.
self | a properties list |
int mlt_properties_set | ( | mlt_properties | self, |
const char * | name, | ||
const char * | value | ||
) |
Set a property to a string.
The property name "properties" is reserved to load the preset in value
. When the value begins with '@' then it is interpreted as a very simple math expression containing only the +, -, *, and / operators. The event "property-changed" is fired after the property has been set.
This makes a copy of the string value you supply.
self | a properties list |
name | the property to set |
value | the property's new value |
int mlt_properties_set_color | ( | mlt_properties | self, |
const char * | name, | ||
mlt_color | color | ||
) |
Set a property to an integer value by color.
self | a properties list |
name | the property to set |
color | the color |
int mlt_properties_set_data | ( | mlt_properties | self, |
const char * | name, | ||
void * | value, | ||
int | length, | ||
mlt_destructor | destroy, | ||
mlt_serialiser | serialise | ||
) |
Store binary data as a property.
self | a properties list |
name | the property to set |
value | an opaque pointer to binary data |
length | the size of the binary data in bytes (optional) |
destroy | a function to deallocate the binary data when the property is closed (optional) |
serialise | a function that can serialize the binary data as text (optional) |
int mlt_properties_set_double | ( | mlt_properties | self, |
const char * | name, | ||
double | value | ||
) |
Set a property to a floating point value.
self | a properties list |
name | the property to set |
value | the floating point value |
int mlt_properties_set_int | ( | mlt_properties | self, |
const char * | name, | ||
int | value | ||
) |
Set a property to an integer value.
self | a properties list |
name | the property to set |
value | the integer |
int mlt_properties_set_int64 | ( | mlt_properties | self, |
const char * | name, | ||
int64_t | value | ||
) |
Set a property to a 64-bit integer value.
self | a properties list |
name | the property to set |
value | the integer |
int mlt_properties_set_lcnumeric | ( | mlt_properties | self, |
const char * | locale | ||
) |
Set the numeric locale used for string/double conversions.
self | a properties list |
locale | the locale name |
int mlt_properties_set_or_default | ( | mlt_properties | self, |
const char * | name, | ||
const char * | value, | ||
const char * | def | ||
) |
Set or default a property to a string.
This makes a copy of the string value you supply.
self | a properties list |
name | the property to set |
value | the string value to set or NULL to use the default |
def | the default string if value is NULL |
int mlt_properties_set_position | ( | mlt_properties | self, |
const char * | name, | ||
mlt_position | value | ||
) |
Set a property to a position value.
self | a properties list |
name | the property to get |
value | the position |
int mlt_properties_set_properties | ( | mlt_properties | self, |
const char * | name, | ||
mlt_properties | properties | ||
) |
Set a property to a nested properties object.
self | a properties list |
name | the property to get |
properties | the properties list to nest into self with name |
int mlt_properties_set_rect | ( | mlt_properties | self, |
const char * | name, | ||
mlt_rect | value | ||
) |
Set a property to a rectangle value.
self | a properties list |
name | the property to set |
value | the rectangle |
int mlt_properties_set_string | ( | mlt_properties | self, |
const char * | name, | ||
const char * | value | ||
) |
Set a property to a string.
Unlike \mlt_properties_set this function does not attempt to interpret an expression. The property name "properties" is reserved to load the preset in value
. The event "property-changed" is fired after the property has been set.
This makes a copy of the string value you supply.
self | a properties list |
name | the property to set |
value | the property's new value |
mlt_position mlt_properties_time_to_frames | ( | mlt_properties | self, |
const char * | time | ||
) |
Convert a time string to a frame count.
self | a properties list |
time | the time string to convert |
void mlt_properties_unlock | ( | mlt_properties | self | ) |
End protecting a properties list against concurrent access.
self | a properties list |
|
private |
Recursively serialize a properties list into a string buffer as YAML Tiny.
self | a properties list |
output | a string buffer to hold the serialized YAML Tiny |
indent | the number of spaces to indent (for recursion, initialize to 0) |
is_parent_sequence | Is this properties list really just a sequence (for recursion, initialize to 0)? |
|
private |
the object of a subclass
mlt_destructor mlt_properties_s::close |
the destructor virtual function
void* mlt_properties_s::close_object |
the object supplied to the close virtual function
|
private |
instance object