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

Events class. More...

Public Member Functions

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

Data Fields

mlt_properties listeners
 
mlt_properties owner
 

Private Member Functions

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

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 *  listener_data 
)

Block all events for a given listener_data.

Parameters
selfa properties list
listener_datathe listener's opaque data pointer

◆ mlt_events_close()

static void mlt_events_close ( mlt_events  events)
private

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 *  listener_data 
)

Disconnect all events for a given listener_data.

Parameters
selfa properties list
listener_datathe listener's opaque data pointer

◆ mlt_events_fetch()

static mlt_events mlt_events_fetch ( mlt_properties  self)
private

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,
mlt_event_data  event_data 
)

Fire an event.

Parameters
selfa properties list
idthe name of an event
event_dataan event data object
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 *  listener_data,
const char *  id,
mlt_listener  listener 
)

Register a listener.

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

◆ mlt_events_listen_for()

static void mlt_events_listen_for ( mlt_properties  self,
condition_pair pair 
)
private

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 
)

Register an event.

Parameters
selfa properties list
idthe name of an event
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 *  listener_data 
)

Unblock all events for a given listener_data.

Parameters
selfa properties list
listener_datathe listener's opaque data 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

◆ listeners

mlt_properties mlt_events_struct::listeners

◆ owner

mlt_properties mlt_events_struct::owner

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