|
mlt 0.7.6
|
Service abstract base class. More...
#include <mlt_service.h>
Public Member Functions | |
| void | mlt_service_apply_filters (mlt_service self, mlt_frame frame, int index) |
| Recursively apply attached filters. | |
| int | mlt_service_attach (mlt_service self, mlt_filter filter) |
| Attach a filter. | |
| mlt_cache_item | mlt_service_cache_get (mlt_service self, const char *name) |
| Get an object from a service's cache. | |
| int | mlt_service_cache_get_size (mlt_service self, const char *name) |
| Get the current maximum size of the named cache. | |
| void | mlt_service_cache_put (mlt_service self, const char *name, void *data, int size, mlt_destructor destructor) |
| Put an object into a service's cache. | |
| void | mlt_service_cache_set_size (mlt_service self, const char *name, int size) |
| Set the number of items to cache for the named cache. | |
| void | mlt_service_close (mlt_service self) |
| Destroy a service. | |
| int | mlt_service_connect_producer (mlt_service self, mlt_service producer, int index) |
| Connect a producer to the service. | |
| mlt_service | mlt_service_consumer (mlt_service self) |
| Obtain the consumer a service is connected to. | |
| int | mlt_service_detach (mlt_service self, mlt_filter filter) |
| Detach a filter. | |
| static void | mlt_service_disconnect (mlt_service self) |
| Disconnect a service from its consumer. | |
| mlt_filter | mlt_service_filter (mlt_service self, int index) |
| Retrieve a filter. | |
| int | mlt_service_get_frame (mlt_service self, mlt_frame_ptr frame, int index) |
| Obtain a frame. | |
| mlt_service | mlt_service_get_producer (mlt_service self) |
| Get the first connected producer. | |
| mlt_service_type | mlt_service_identify (mlt_service self) |
| Identify the subclass of the service. | |
| int | mlt_service_init (mlt_service self, void *child) |
| Initialize a service. | |
| void | mlt_service_lock (mlt_service self) |
| Acquire a mutual exclusion lock on this service. | |
| mlt_service | mlt_service_producer (mlt_service self) |
| Obtain the producer a service is connected to. | |
| mlt_profile | mlt_service_profile (mlt_service self) |
| Retrieve the profile. | |
| mlt_properties | mlt_service_properties (mlt_service self) |
| Return the properties object. | |
| void | mlt_service_unlock (mlt_service self) |
| Release a mutual exclusion lock on this service. | |
Data Fields | |
| mlt_destructor | close |
| the destructor virtual function | |
| void * | close_object |
| the object supplied to the close virtual function | |
| int(* | get_frame )(mlt_service self, mlt_frame_ptr frame, int index) |
| Get a frame of data (virtual function). | |
Private Member Functions | |
| static mlt_cache | get_cache (mlt_service self, const char *name) |
| Lookup the cache object for a service. | |
| void | mlt_service_cache_purge (mlt_service self) |
| Release a service's cache items. | |
| static void | mlt_service_connect (mlt_service self, mlt_service that) |
| Associate a service to a consumer. | |
| static void | mlt_service_filter_changed (mlt_service owner, mlt_service self) |
| The service-changed event handler. | |
| static void | mlt_service_property_changed (mlt_listener listener, mlt_properties owner, mlt_service self, void **args) |
| The transmitter for property changes. | |
| static int | service_get_frame (mlt_service self, mlt_frame_ptr frame, int index) |
| Default implementation of the get_frame virtual function. | |
Private Attributes | |
| void * | child |
| the object of a subclass | |
| void * | local |
| instance object | |
| struct mlt_properties_s | parent |
| A service extends properties. | |
Service abstract base class.
The service is the base class for all of the interesting classes and plugins for MLT. A service can have multiple inputs connections to other services called its "producers" but only a single output to another service called its "consumer." A service that has both producer and consumer connections is called a filter. Any service can have zero or more filters "attached" to it. We call any collection of services and their connections a "service network," which is similar to what DirectShow calls a filter graph or what gstreamer calls an element pipeline.
mlt_service_get_frame | static mlt_cache get_cache | ( | mlt_service | self, |
| const char * | name | ||
| ) | [private] |
Lookup the cache object for a service.
| self | a service |
| name | a name for the object |
| void mlt_service_apply_filters | ( | mlt_service | self, |
| mlt_frame | frame, | ||
| int | index | ||
| ) |
Recursively apply attached filters.
| self | a service |
| frame | a frame |
| index | used to track depth of recursion, top caller should supply 0 |
| int mlt_service_attach | ( | mlt_service | self, |
| mlt_filter | filter | ||
| ) |
Attach a filter.
| self | a service |
| filter | the filter to attach |
| mlt_cache_item mlt_service_cache_get | ( | mlt_service | self, |
| const char * | name | ||
| ) |
Get an object from a service's cache.
| self | a service |
| name | a name for the object that is unique to the service class, but not to the instance |
| int mlt_service_cache_get_size | ( | mlt_service | self, |
| const char * | name | ||
| ) |
Get the current maximum size of the named cache.
| self | a service |
| name | a name for the object that is unique to the service class, but not to the instance |
| void mlt_service_cache_purge | ( | mlt_service | self | ) | [private] |
Release a service's cache items.
| self | a service |
| void mlt_service_cache_put | ( | mlt_service | self, |
| const char * | name, | ||
| void * | data, | ||
| int | size, | ||
| mlt_destructor | destructor | ||
| ) |
Put an object into a service's cache.
| self | a service |
| name | a name for the object that is unique to the service class, but not to the instance |
| data | an opaque pointer to the object to put into the cache |
| size | the number of bytes pointed to by data |
| destructor | a function that releases the data |
| void mlt_service_cache_set_size | ( | mlt_service | self, |
| const char * | name, | ||
| int | size | ||
| ) |
Set the number of items to cache for the named cache.
| self | a service |
| name | a name for the object that is unique to the service class, but not to the instance |
| size | the number of items to cache |
| void mlt_service_close | ( | mlt_service | self | ) |
Destroy a service.
| self | the service to destroy |
| static void mlt_service_connect | ( | mlt_service | self, |
| mlt_service | that | ||
| ) | [private] |
Associate a service to a consumer.
Overwrites connection to any existing consumer.
| self | a service |
| that | a consumer |
| int mlt_service_connect_producer | ( | mlt_service | self, |
| mlt_service | producer, | ||
| int | index | ||
| ) |
Connect a producer to the service.
| self | a service |
| producer | a producer |
| index | which of potentially multiple producers to this service (0 based) |
| mlt_service mlt_service_consumer | ( | mlt_service | self | ) |
Obtain the consumer a service is connected to.
| self | a service |
| int mlt_service_detach | ( | mlt_service | self, |
| mlt_filter | filter | ||
| ) |
Detach a filter.
| self | a service |
| filter | the filter to detach |
| static void mlt_service_disconnect | ( | mlt_service | self | ) |
Disconnect a service from its consumer.
| self | a service |
| mlt_filter mlt_service_filter | ( | mlt_service | self, |
| int | index | ||
| ) |
Retrieve a filter.
| self | a service |
| index | which one of potentially multiple filters |
| static void mlt_service_filter_changed | ( | mlt_service | owner, |
| mlt_service | self | ||
| ) | [private] |
The service-changed event handler.
| owner | ignored |
| self | the service on which the "service-changed" event is fired |
| int mlt_service_get_frame | ( | mlt_service | self, |
| mlt_frame_ptr | frame, | ||
| int | index | ||
| ) |
Obtain a frame.
| self | a service | |
| [out] | frame | a frame by reference |
| index | as determined by the producer |
| mlt_service mlt_service_get_producer | ( | mlt_service | self | ) |
Get the first connected producer.
| self | a service |
| mlt_service_type mlt_service_identify | ( | mlt_service | self | ) |
Identify the subclass of the service.
| self | a service |
| int mlt_service_init | ( | mlt_service | self, |
| void * | child | ||
| ) |
Initialize a service.
| self | the service structure to initialize |
| child | pointer to the child object for the subclass |
| void mlt_service_lock | ( | mlt_service | self | ) |
Acquire a mutual exclusion lock on this service.
| self | the service to lock |
| mlt_service mlt_service_producer | ( | mlt_service | self | ) |
Obtain the producer a service is connected to.
| self | a service |
| mlt_profile mlt_service_profile | ( | mlt_service | self | ) |
Retrieve the profile.
| self | a service |
| mlt_properties mlt_service_properties | ( | mlt_service | self | ) |
Return the properties object.
| self | a service |
| static void mlt_service_property_changed | ( | mlt_listener | listener, |
| mlt_properties | owner, | ||
| mlt_service | self, | ||
| void ** | args | ||
| ) | [private] |
The transmitter for property changes.
Invokes the listener.
| listener | a function pointer that will be invoked |
| owner | a properties list that will be passed to listener |
| self | a service that will be passed to listener |
| args | an array of pointers - the first entry is passed as a string to listener |
| void mlt_service_unlock | ( | mlt_service | self | ) |
Release a mutual exclusion lock on this service.
| self | the service to unlock |
| static int service_get_frame | ( | mlt_service | self, |
| mlt_frame_ptr | frame, | ||
| int | index | ||
| ) | [private] |
Default implementation of the get_frame virtual function.
| self | a service | |
| [out] | frame | a frame by reference |
| index | as determined by the producer |
void* mlt_service_s::child [private] |
the object of a subclass
Reimplemented from mlt_properties_s.
Reimplemented in mlt_consumer_s, mlt_filter_s, mlt_producer_s, and mlt_transition_s.
the destructor virtual function
Reimplemented from mlt_properties_s.
Reimplemented in mlt_consumer_s, mlt_filter_s, mlt_producer_s, and mlt_transition_s.
the object supplied to the close virtual function
Reimplemented from mlt_properties_s.
Reimplemented in mlt_producer_s.
| int( * mlt_service_s::get_frame)(mlt_service self, mlt_frame_ptr frame, int index) |
Get a frame of data (virtual function).
| mlt_producer | a producer |
| mlt_frame_ptr | a frame pointer by reference |
| int | an index |
Reimplemented in mlt_producer_s.
void* mlt_service_s::local [private] |
instance object
Reimplemented from mlt_properties_s.
Reimplemented in mlt_consumer_s, and mlt_producer_s.
struct mlt_properties_s mlt_service_s::parent [private] |
A service extends properties.
Reimplemented in mlt_consumer_s, mlt_filter_s, mlt_multitrack_s, mlt_playlist_s, mlt_producer_s, mlt_tractor_s, and mlt_transition_s.
1.7.3