My Project
mmal_clock_private.h File Reference

Go to the source code of this file.

Classes

struct  MMAL_CLOCK_T
 

Typedefs

typedef struct MMAL_CLOCK_T MMAL_CLOCK_T
 
typedef void(* MMAL_CLOCK_VOID_FP) (void)
 
typedef void(* MMAL_CLOCK_REQUEST_CB) (MMAL_CLOCK_T *clock, int64_t media_time, void *cb_data, MMAL_CLOCK_VOID_FP priv)
 

Functions

MMAL_STATUS_T mmal_clock_create (MMAL_CLOCK_T **clock)
 
MMAL_STATUS_T mmal_clock_destroy (MMAL_CLOCK_T *clock)
 
MMAL_STATUS_T mmal_clock_request_add (MMAL_CLOCK_T *clock, int64_t media_time, MMAL_CLOCK_REQUEST_CB cb, void *cb_data, MMAL_CLOCK_VOID_FP priv)
 
MMAL_STATUS_T mmal_clock_request_flush (MMAL_CLOCK_T *clock)
 
MMAL_STATUS_T mmal_clock_media_time_set (MMAL_CLOCK_T *clock, int64_t media_time)
 
MMAL_STATUS_T mmal_clock_scale_set (MMAL_CLOCK_T *clock, MMAL_RATIONAL_T scale)
 
MMAL_STATUS_T mmal_clock_active_set (MMAL_CLOCK_T *clock, MMAL_BOOL_T active)
 
MMAL_RATIONAL_T mmal_clock_scale_get (MMAL_CLOCK_T *clock)
 
int64_t mmal_clock_media_time_get (MMAL_CLOCK_T *clock)
 
MMAL_BOOL_T mmal_clock_is_active (MMAL_CLOCK_T *clock)
 
MMAL_STATUS_T mmal_clock_update_threshold_get (MMAL_CLOCK_T *clock, MMAL_CLOCK_UPDATE_THRESHOLD_T *update_threshold)
 
MMAL_STATUS_T mmal_clock_update_threshold_set (MMAL_CLOCK_T *clock, const MMAL_CLOCK_UPDATE_THRESHOLD_T *update_threshold)
 
MMAL_STATUS_T mmal_clock_discont_threshold_get (MMAL_CLOCK_T *clock, MMAL_CLOCK_DISCONT_THRESHOLD_T *discont)
 
MMAL_STATUS_T mmal_clock_discont_threshold_set (MMAL_CLOCK_T *clock, const MMAL_CLOCK_DISCONT_THRESHOLD_T *discont)
 
MMAL_STATUS_T mmal_clock_request_threshold_get (MMAL_CLOCK_T *clock, MMAL_CLOCK_REQUEST_THRESHOLD_T *req)
 
MMAL_STATUS_T mmal_clock_request_threshold_set (MMAL_CLOCK_T *clock, const MMAL_CLOCK_REQUEST_THRESHOLD_T *req)
 

Typedef Documentation

◆ MMAL_CLOCK_REQUEST_CB

typedef void(* MMAL_CLOCK_REQUEST_CB) (MMAL_CLOCK_T *clock, int64_t media_time, void *cb_data, MMAL_CLOCK_VOID_FP priv)

Definition at line 70 of file mmal_clock_private.h.

◆ MMAL_CLOCK_T

typedef struct MMAL_CLOCK_T MMAL_CLOCK_T

Handle to a clock.

◆ MMAL_CLOCK_VOID_FP

typedef void(* MMAL_CLOCK_VOID_FP) (void)

Definition of a clock request callback. This is invoked when the media-time requested by the client is reached.

Parameters
clockThe clock which serviced the request
media_timeThe current media-time
cb_dataClient-supplied data
privFunction pointer used by the framework

Definition at line 69 of file mmal_clock_private.h.

Function Documentation

◆ mmal_clock_active_set()

MMAL_STATUS_T mmal_clock_active_set ( MMAL_CLOCK_T clock,
MMAL_BOOL_T  active 
)

Set the clock state.

Parameters
clockThe clock
activeTRUE -> clock is active and media-time is advancing
Returns
MMAL_SUCCESS on success

◆ mmal_clock_create()

MMAL_STATUS_T mmal_clock_create ( MMAL_CLOCK_T **  clock)

Create a new instance of a clock.

Parameters
clockReturned clock
Returns
MMAL_SUCCESS on success

◆ mmal_clock_destroy()

MMAL_STATUS_T mmal_clock_destroy ( MMAL_CLOCK_T clock)

Destroy a previously created clock.

Parameters
clockThe clock to destroy
Returns
MMAL_SUCCESS on success

◆ mmal_clock_discont_threshold_get()

MMAL_STATUS_T mmal_clock_discont_threshold_get ( MMAL_CLOCK_T clock,
MMAL_CLOCK_DISCONT_THRESHOLD_T discont 
)

Get the clock's discontinuity threshold values.

Parameters
clockThe clock
discontPointer to clock discontinuity threshold values to fill
Returns
MMAL_SUCCESS on success

◆ mmal_clock_discont_threshold_set()

MMAL_STATUS_T mmal_clock_discont_threshold_set ( MMAL_CLOCK_T clock,
const MMAL_CLOCK_DISCONT_THRESHOLD_T discont 
)

Set the clock's discontinuity threshold values.

Parameters
clockThe clock
discontPointer to new clock discontinuity threshold values
Returns
MMAL_SUCCESS on success

◆ mmal_clock_is_active()

MMAL_BOOL_T mmal_clock_is_active ( MMAL_CLOCK_T clock)

Get the clock's state.

Parameters
clockThe clock to query
Returns
TRUE if clock is running (i.e. local media-time is advancing)

◆ mmal_clock_media_time_get()

int64_t mmal_clock_media_time_get ( MMAL_CLOCK_T clock)

Get the clock's current media-time. This takes the clock scale and media-time offset into account.

Parameters
clockThe clock to query
Returns
Current media-time in microseconds

◆ mmal_clock_media_time_set()

MMAL_STATUS_T mmal_clock_media_time_set ( MMAL_CLOCK_T clock,
int64_t  media_time 
)

Update the clock's media-time.

Parameters
clockThe clock to update
media_timeNew media-time to be applied (microseconds)
Returns
MMAL_SUCCESS on success

◆ mmal_clock_request_add()

MMAL_STATUS_T mmal_clock_request_add ( MMAL_CLOCK_T clock,
int64_t  media_time,
MMAL_CLOCK_REQUEST_CB  cb,
void *  cb_data,
MMAL_CLOCK_VOID_FP  priv 
)

Register a request with the clock. When the specified media-time is reached, the clock will invoke the supplied callback.

Parameters
clockThe clock
media_timeThe media-time at which the callback should be invoked (microseconds)
cbCallback to invoke
cb_dataClient-supplied callback data
privFunction pointer used by the framework
Returns
MMAL_SUCCESS on success

◆ mmal_clock_request_flush()

MMAL_STATUS_T mmal_clock_request_flush ( MMAL_CLOCK_T clock)

Remove all previously registered clock requests.

Parameters
clockThe clock
Returns
MMAL_SUCCESS on success

◆ mmal_clock_request_threshold_get()

MMAL_STATUS_T mmal_clock_request_threshold_get ( MMAL_CLOCK_T clock,
MMAL_CLOCK_REQUEST_THRESHOLD_T req 
)

Get the clock's request threshold values.

Parameters
clockThe clock
futurePointer to clock request threshold values to fill
Returns
MMAL_SUCCESS on success

◆ mmal_clock_request_threshold_set()

MMAL_STATUS_T mmal_clock_request_threshold_set ( MMAL_CLOCK_T clock,
const MMAL_CLOCK_REQUEST_THRESHOLD_T req 
)

Set the clock's request threshold values.

Parameters
clockThe clock
discontPointer to new clock request threshold values
Returns
MMAL_SUCCESS on success

◆ mmal_clock_scale_get()

MMAL_RATIONAL_T mmal_clock_scale_get ( MMAL_CLOCK_T clock)

Get the clock's scale.

Parameters
clockThe clock
Returns
Current clock scale

◆ mmal_clock_scale_set()

MMAL_STATUS_T mmal_clock_scale_set ( MMAL_CLOCK_T clock,
MMAL_RATIONAL_T  scale 
)

Set the clock's scale.

Parameters
clockThe clock
scaleScale factor
Returns
MMAL_SUCCESS on success

◆ mmal_clock_update_threshold_get()

MMAL_STATUS_T mmal_clock_update_threshold_get ( MMAL_CLOCK_T clock,
MMAL_CLOCK_UPDATE_THRESHOLD_T update_threshold 
)

Get the clock's media-time update threshold values.

Parameters
clockThe clock
update_thresholdPointer to clock update threshold values to fill
Returns
MMAL_SUCCESS on success

◆ mmal_clock_update_threshold_set()

MMAL_STATUS_T mmal_clock_update_threshold_set ( MMAL_CLOCK_T clock,
const MMAL_CLOCK_UPDATE_THRESHOLD_T update_threshold 
)

Set the clock's media-time update threshold values.

Parameters
clockThe clock
update_thresholdPointer to new clock update threshold values
Returns
MMAL_SUCCESS on success