a-mediastreamer2  5.2.0
Typedefs | Functions
Ticker API - manage mediastreamer2 graphs.

Ticker API to manage mediastreamer2 graphs. More...

Typedefs

typedef uint64_t(* MSTickerTimeFunc) (void *)
 
typedef struct _MSTickerTask MSTickerTask
 
typedef struct _MSTicker MSTicker
 

Functions

MSTickerms_ticker_new (void)
 
MSTickerms_ticker_new_withname (const char *name)
 
void ms_ticker_set_name (MSTicker *ticker, const char *name)
 
int ms_ticker_attach (MSTicker *ticker, MSFilter *f)
 
int ms_ticker_detach (MSTicker *ticker, MSFilter *f)
 
void ms_ticker_destroy (MSTicker *ticker)
 
void ms_ticker_set_time_func (MSTicker *ticker, MSTickerTimeFunc func, void *user_data)
 
void ms_ticker_print_graphs (MSTicker *ticker)
 
uint64_t ms_timems_get (void *unused)
 
uint64_t ms_timeus_get (void)
 

Detailed Description

Ticker API to manage mediastreamer2 graphs.

This file provide the API needed to create, start and stop a graph.

Typedef Documentation

◆ MSTickerTimeFunc

MSTickerTimeFunc

Structure for method getting time in miliseconds from an external source.

◆ MSTickerTask

Structure for task object in a ticker.

◆ MSTicker

Structure for ticker object.

Function Documentation

◆ ms_ticker_new()

MSTicker* ms_ticker_new ( void  )

Create a ticker that will be used to start and stop a graph.

Returns: MSTicker * if successful, NULL otherwise.

◆ ms_ticker_new_withname()

MSTicker* ms_ticker_new_withname ( const char *  name)

Create a ticker that will be used to start and stop a graph.

Returns: MSTicker * if successful, NULL otherwise.

◆ ms_ticker_set_name()

void ms_ticker_set_name ( MSTicker ticker,
const char *  name 
)

Set a name to the ticker (used for logging)

◆ ms_ticker_attach()

int ms_ticker_attach ( MSTicker ticker,
MSFilter f 
)

Attach a chain of filters to a ticker. The processing chain will be executed until ms_ticker_detach will be called.

Parameters
tickerA MSTicker object.
fA MSFilter object.

Returns: 0 if successful, -1 otherwise.

◆ ms_ticker_detach()

int ms_ticker_detach ( MSTicker ticker,
MSFilter f 
)

Dettach a chain of filters to a ticker. The processing chain will no more be executed.

Parameters
tickerA MSTicker object.
fA MSFilter object.

Returns: 0 if successful, -1 otherwise.

◆ ms_ticker_destroy()

void ms_ticker_destroy ( MSTicker ticker)

Destroy a ticker.

Parameters
tickerA MSTicker object.

◆ ms_ticker_set_time_func()

void ms_ticker_set_time_func ( MSTicker ticker,
MSTickerTimeFunc  func,
void *  user_data 
)

Override MSTicker's time function. This can be used to control the ticker from an external time provider, for example the clock of a sound card.

Parameters
tickerA MSTicker object.
funcA replacement method for calculating "current time"
user_dataAny pointer to user private data.

◆ ms_ticker_print_graphs()

void ms_ticker_print_graphs ( MSTicker ticker)

Print on stdout all filters of a ticker. (INTERNAL: DO NOT USE)

Parameters
tickerA MSTicker object.

◆ ms_timems_get()

uint64_t ms_timems_get ( void *  unused)

Get time in ms

Parameters
unusedunused parameter

◆ ms_timeus_get()

uint64_t ms_timeus_get ( void  )

Get time in us

Parameters
unusedunused parameter