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

Repository class. More...

Inheritance diagram for mlt_repository_s:
mlt_properties_s

Public Member Functions

void mlt_repository_close (mlt_repository self)
 Destroy a repository and free its resources. More...
 
mlt_properties mlt_repository_consumers (mlt_repository self)
 Get the list of registered consumers. More...
 
void * mlt_repository_create (mlt_repository self, mlt_profile profile, mlt_service_type type, const char *service, const void *input)
 Construct a new instance of a service. More...
 
mlt_properties mlt_repository_filters (mlt_repository self)
 Get the list of registered filters. More...
 
mlt_repository mlt_repository_init (const char *directory)
 Construct a new repository. More...
 
mlt_properties mlt_repository_languages (mlt_repository self)
 Return a list of user-preferred language codes taken from environment variables. More...
 
mlt_properties mlt_repository_links (mlt_repository self)
 Get the list of registered links. More...
 
mlt_properties mlt_repository_metadata (mlt_repository self, mlt_service_type type, const char *service)
 Get the metadata about a service. More...
 
mlt_properties mlt_repository_presets ()
 Get the list of presets. More...
 
mlt_properties mlt_repository_producers (mlt_repository self)
 Get the list of registered producers. More...
 
void mlt_repository_register (mlt_repository self, mlt_service_type service_type, const char *service, mlt_register_callback symbol)
 Register a service with the repository. More...
 
void mlt_repository_register_metadata (mlt_repository self, mlt_service_type type, const char *service, mlt_metadata_callback callback, void *callback_data)
 Register the metadata for a service. More...
 
mlt_properties mlt_repository_transitions (mlt_repository self)
 Get the list of registered transitions. More...
 
- Public Member Functions inherited from mlt_properties_s
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_properties consumers
 a list of object files More...
 
mlt_properties filters
 a list of entry points for consumers More...
 
mlt_properties links
 a list of entry points for filters More...
 
struct mlt_properties_s parent
 
mlt_properties producers
 a list of entry points for links More...
 
mlt_properties transitions
 a list of entry points for producers More...
 
- Data Fields inherited from mlt_properties_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 

Private Member Functions

static mlt_properties get_service_properties (mlt_repository self, mlt_service_type type, const char *service)
 Get the repository properties for particular service class. More...
 
static char * getenv_locale ()
 Try to determine the locale from some commonly used environment variables. More...
 
static mlt_properties new_service (void *symbol)
 Create a properties list for a service holding a function pointer to its constructor function. More...
 

Detailed Description

Repository class.

The Repository is a collection of plugin modules and their services and service metadata.

Property:
language a cached list of user locales

Member Function Documentation

◆ get_service_properties()

static mlt_properties get_service_properties ( mlt_repository  self,
mlt_service_type  type,
const char *  service 
)
private

Get the repository properties for particular service class.

Parameters
selfa repository
typea service class
servicethe name of a service
Returns
a properties list or NULL if error

◆ getenv_locale()

static char * getenv_locale ( )
private

Try to determine the locale from some commonly used environment variables.

Returns
a string containing the locale id or NULL if unknown

◆ mlt_repository_close()

void mlt_repository_close ( mlt_repository  self)

Destroy a repository and free its resources.

Parameters
selfa repository

◆ mlt_repository_consumers()

mlt_properties mlt_repository_consumers ( mlt_repository  self)

Get the list of registered consumers.

Parameters
selfa repository
Returns
a properties list containing all of the consumers

◆ mlt_repository_create()

void * mlt_repository_create ( mlt_repository  self,
mlt_profile  profile,
mlt_service_type  type,
const char *  service,
const void *  input 
)

Construct a new instance of a service.

Parameters
selfa repository
profilea mlt_profile to give the service
typea service class
servicethe name of the service
inputan optional argument to the service constructor

◆ mlt_repository_filters()

mlt_properties mlt_repository_filters ( mlt_repository  self)

Get the list of registered filters.

Parameters
selfa repository
Returns
a properties list of all of the filters

◆ mlt_repository_init()

mlt_repository mlt_repository_init ( const char *  directory)

Construct a new repository.

Parameters
directorythe full path of a directory from which to read modules
Returns
a new repository or NULL if failed

◆ mlt_repository_languages()

mlt_properties mlt_repository_languages ( mlt_repository  self)

Return a list of user-preferred language codes taken from environment variables.

A module should use this to locate a localized YAML Tiny file from which to build its metadata strucutured properties.

Parameters
selfa repository
Returns
a properties list that is a list (not a map) of locales, defaults to "en" if not overridden by environment variables, in order: LANGUAGE, LC_ALL, LC_MESSAGES, LANG

◆ mlt_repository_links()

mlt_properties mlt_repository_links ( mlt_repository  self)

Get the list of registered links.

Parameters
selfa repository
Returns
a properties list of all of the links

◆ mlt_repository_metadata()

mlt_properties mlt_repository_metadata ( mlt_repository  self,
mlt_service_type  type,
const char *  service 
)

Get the metadata about a service.

Returns NULL if service or its metadata are unavailable.

Parameters
selfa repository
typea service class
servicethe name of a service
Returns
the service metadata as a structured properties list

◆ mlt_repository_presets()

mlt_properties mlt_repository_presets ( )

Get the list of presets.

Returns
a properties list of all the presets

◆ mlt_repository_producers()

mlt_properties mlt_repository_producers ( mlt_repository  self)

Get the list of registered producers.

Parameters
selfa repository
Returns
a properties list of all of the producers

◆ mlt_repository_register()

void mlt_repository_register ( mlt_repository  self,
mlt_service_type  service_type,
const char *  service,
mlt_register_callback  symbol 
)

Register a service with the repository.

Typically, this is invoked by a module within its mlt_register().

Parameters
selfa repository
service_typea service class
servicethe name of a service
symbola pointer to a function to create the service

◆ mlt_repository_register_metadata()

void mlt_repository_register_metadata ( mlt_repository  self,
mlt_service_type  type,
const char *  service,
mlt_metadata_callback  callback,
void *  callback_data 
)

Register the metadata for a service.

IMPORTANT: mlt_repository will take responsibility for deallocating the metadata properties that you supply!

Parameters
selfa repository
typea service class
servicethe name of a service
callbackthe pointer to a function that can supply metadata
callback_dataan opaque user data pointer to be supplied on the callback

◆ mlt_repository_transitions()

mlt_properties mlt_repository_transitions ( mlt_repository  self)

Get the list of registered transitions.

Parameters
selfa repository
Returns
a properties list of all of the transitions

◆ new_service()

static mlt_properties new_service ( void *  symbol)
private

Create a properties list for a service holding a function pointer to its constructor function.

Parameters
symbola pointer to a function that can create the service.
Returns
a properties list

Field Documentation

◆ consumers

mlt_properties mlt_repository_s::consumers

a list of object files

◆ filters

mlt_properties mlt_repository_s::filters

a list of entry points for consumers

◆ links

mlt_properties mlt_repository_s::links

a list of entry points for filters

◆ parent

struct mlt_properties_s mlt_repository_s::parent

◆ producers

mlt_properties mlt_repository_s::producers

a list of entry points for links

◆ transitions

mlt_properties mlt_repository_s::transitions

a list of entry points for producers


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