MLT 6.26.0
Public Member Functions | Data Fields | Static Private Member Functions
mlt_events_struct Struct Reference

Events class. More...

Public Member Functions

void mlt_events_block (mlt_properties self, void *service)
 Block all events for a given service.
 
void mlt_events_close_wait_for (mlt_properties self, mlt_event event)
 Cleanup after waiting for an event.
 
void mlt_events_disconnect (mlt_properties self, void *service)
 Disconnect all events for a given service.
 
int mlt_events_fire (mlt_properties self, const char *id,...)
 Fire an event.
 
void mlt_events_init (mlt_properties self)
 Initialise the events structure.
 
mlt_event mlt_events_listen (mlt_properties self, void *service, const char *id, mlt_listener listener)
 Register a listener.
 
int mlt_events_register (mlt_properties self, const char *id, mlt_transmitter transmitter)
 Register an event and transmitter.
 
mlt_event mlt_events_setup_wait_for (mlt_properties self, const char *id)
 Prepare to wait for an event.
 
void mlt_events_unblock (mlt_properties self, void *service)
 Unblock all events for a given service.
 
void mlt_events_wait_for (mlt_properties self, mlt_event event)
 Wait for an event.
 

Data Fields

mlt_properties list
 
mlt_properties owner
 

Static Private Member Functions

static void mlt_events_close (mlt_events events)
 Close the events object.
 
static mlt_events mlt_events_fetch (mlt_properties self)
 Fetch the events object.
 
static void mlt_events_listen_for (mlt_properties self, condition_pair *pair)
 The event listener callback for the wait functions.
 

Detailed Description

Events class.

Events provide messages and notifications between services and the application. A service can register an event and fire/send it upon certain conditions or times. Likewise, a service or an application can listen/receive specific events on specific services.

Member Function Documentation

◆ mlt_events_block()

void mlt_events_block ( mlt_properties  self,
void *  service 
)

Block all events for a given service.

Parameters
selfa properties list
servicean opaque pointer

◆ mlt_events_close()

static void mlt_events_close ( mlt_events  events)
staticprivate

Close the events object.

Parameters
eventsan events object

◆ mlt_events_close_wait_for()

void mlt_events_close_wait_for ( mlt_properties  self,
mlt_event  event 
)

Cleanup after waiting for an event.

Parameters
selfa properties list
eventan event

◆ mlt_events_disconnect()

void mlt_events_disconnect ( mlt_properties  self,
void *  service 
)

Disconnect all events for a given service.

Parameters
selfa properties list
servicean opaque pointer

◆ mlt_events_fetch()

static mlt_events mlt_events_fetch ( mlt_properties  self)
staticprivate

Fetch the events object.

Parameters
selfa properties list
Returns
an events object

◆ mlt_events_fire()

int mlt_events_fire ( mlt_properties  self,
const char *  id,
  ... 
)

Fire an event.

This takes a variable number of arguments to supply to the listener.

Parameters
selfa properties list
idthe name of an event
Returns
the number of listeners

◆ mlt_events_init()

void mlt_events_init ( mlt_properties  self)

Initialise the events structure.

Parameters
selfa properties list

◆ mlt_events_listen()

mlt_event mlt_events_listen ( mlt_properties  self,
void *  service,
const char *  id,
mlt_listener  listener 
)

Register a listener.

Parameters
selfa properties list
servicean opaque pointer
idthe name of the event to listen for
listenerthe callback to receive an event message
Returns

◆ mlt_events_listen_for()

static void mlt_events_listen_for ( mlt_properties  self,
condition_pair pair 
)
staticprivate

The event listener callback for the wait functions.

Parameters
selfa properties list
paira condition pair

◆ mlt_events_register()

int mlt_events_register ( mlt_properties  self,
const char *  id,
mlt_transmitter  transmitter 
)

Register an event and transmitter.

Parameters
selfa properties list
idthe name of an event
transmitterthe callback function to send an event message
Returns
true if there was an error

◆ mlt_events_setup_wait_for()

mlt_event mlt_events_setup_wait_for ( mlt_properties  self,
const char *  id 
)

Prepare to wait for an event.

Parameters
selfa properties list
idthe name of the event to wait for
Returns
an event

◆ mlt_events_unblock()

void mlt_events_unblock ( mlt_properties  self,
void *  service 
)

Unblock all events for a given service.

Parameters
selfa properties list
servicean opaque pointer

◆ mlt_events_wait_for()

void mlt_events_wait_for ( mlt_properties  self,
mlt_event  event 
)

Wait for an event.

Parameters
selfa properties list
eventan event

Field Documentation

◆ list

mlt_properties mlt_events_struct::list

◆ owner

mlt_properties mlt_events_struct::owner

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