My Project
mmal_port_private.h File Reference

Go to the source code of this file.

Classes

struct  MMAL_PORT_PRIVATE_T
 

Typedefs

typedef struct MMAL_PORT_PRIVATE_T MMAL_PORT_PRIVATE_T
 
typedef void(* MMAL_PORT_CLOCK_EVENT_CB) (MMAL_PORT_T *port, const MMAL_CLOCK_EVENT_T *event)
 
typedef void(* MMAL_PORT_CLOCK_REQUEST_CB) (MMAL_PORT_T *port, int64_t media_time, void *cb_data)
 

Functions

void mmal_port_buffer_header_callback (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
 
void mmal_port_event_send (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
 
MMAL_PORT_Tmmal_port_alloc (MMAL_COMPONENT_T *, MMAL_PORT_TYPE_T type, unsigned int extra_size)
 
void mmal_port_free (MMAL_PORT_T *port)
 
MMAL_PORT_T ** mmal_ports_alloc (MMAL_COMPONENT_T *, unsigned int ports_num, MMAL_PORT_TYPE_T type, unsigned int extra_size)
 
void mmal_ports_free (MMAL_PORT_T **ports, unsigned int ports_num)
 
void mmal_port_acquire (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_release (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_pause (MMAL_PORT_T *port, MMAL_BOOL_T pause)
 
MMAL_BOOL_T mmal_port_is_connected (MMAL_PORT_T *port)
 
MMAL_PORT_Tmmal_port_clock_alloc (MMAL_COMPONENT_T *component, unsigned int extra_size, MMAL_PORT_CLOCK_EVENT_CB event_cb)
 
void mmal_port_clock_free (MMAL_PORT_T *port)
 
MMAL_PORT_T ** mmal_ports_clock_alloc (MMAL_COMPONENT_T *component, unsigned int ports_num, unsigned int extra_size, MMAL_PORT_CLOCK_EVENT_CB event_cb)
 
void mmal_ports_clock_free (MMAL_PORT_T **ports, unsigned int ports_num)
 
MMAL_STATUS_T mmal_port_clock_request_add (MMAL_PORT_T *port, int64_t media_time, MMAL_PORT_CLOCK_REQUEST_CB cb, void *cb_data)
 
MMAL_STATUS_T mmal_port_clock_request_flush (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_clock_reference_set (MMAL_PORT_T *port, MMAL_BOOL_T reference)
 
MMAL_BOOL_T mmal_port_clock_reference_get (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_clock_active_set (MMAL_PORT_T *port, MMAL_BOOL_T active)
 
MMAL_BOOL_T mmal_port_clock_active_get (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_clock_scale_set (MMAL_PORT_T *port, MMAL_RATIONAL_T scale)
 
MMAL_RATIONAL_T mmal_port_clock_scale_get (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_clock_media_time_set (MMAL_PORT_T *port, int64_t media_time)
 
int64_t mmal_port_clock_media_time_get (MMAL_PORT_T *port)
 
MMAL_STATUS_T mmal_port_clock_update_threshold_set (MMAL_PORT_T *port, const MMAL_CLOCK_UPDATE_THRESHOLD_T *threshold)
 
MMAL_STATUS_T mmal_port_clock_update_threshold_get (MMAL_PORT_T *port, MMAL_CLOCK_UPDATE_THRESHOLD_T *threshold)
 
MMAL_STATUS_T mmal_port_clock_discont_threshold_set (MMAL_PORT_T *port, const MMAL_CLOCK_DISCONT_THRESHOLD_T *threshold)
 
MMAL_STATUS_T mmal_port_clock_discont_threshold_get (MMAL_PORT_T *port, MMAL_CLOCK_DISCONT_THRESHOLD_T *threshold)
 
MMAL_STATUS_T mmal_port_clock_request_threshold_set (MMAL_PORT_T *port, const MMAL_CLOCK_REQUEST_THRESHOLD_T *threshold)
 
MMAL_STATUS_T mmal_port_clock_request_threshold_get (MMAL_PORT_T *port, MMAL_CLOCK_REQUEST_THRESHOLD_T *threshold)
 
void mmal_port_clock_input_buffer_info (MMAL_PORT_T *port, const MMAL_CLOCK_BUFFER_INFO_T *info)
 
void mmal_port_clock_output_buffer_info (MMAL_PORT_T *port, const MMAL_CLOCK_BUFFER_INFO_T *info)
 

Typedef Documentation

◆ MMAL_PORT_CLOCK_EVENT_CB

typedef void(* MMAL_PORT_CLOCK_EVENT_CB) (MMAL_PORT_T *port, const MMAL_CLOCK_EVENT_T *event)

Definition of a clock port event callback. Used to inform the client of a clock event that has occurred.

Parameters
portThe clock port where the event occurred
eventThe event that has occurred

Definition at line 103 of file mmal_port_private.h.

◆ MMAL_PORT_CLOCK_REQUEST_CB

typedef void(* MMAL_PORT_CLOCK_REQUEST_CB) (MMAL_PORT_T *port, int64_t media_time, void *cb_data)

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

Parameters
portThe clock port which serviced the request
media_timeThe current media-time
cb_dataClient-supplied data

Definition at line 148 of file mmal_port_private.h.

◆ MMAL_PORT_PRIVATE_T

Definition of a port.

Function Documentation

◆ mmal_port_acquire()

void mmal_port_acquire ( MMAL_PORT_T port)

Acquire a reference on a port

◆ mmal_port_alloc()

MMAL_PORT_T* mmal_port_alloc ( MMAL_COMPONENT_T ,
MMAL_PORT_TYPE_T  type,
unsigned int  extra_size 
)

Allocate a port structure

◆ mmal_port_buffer_header_callback()

void mmal_port_buffer_header_callback ( MMAL_PORT_T port,
MMAL_BUFFER_HEADER_T buffer 
)

Callback called by components when a MMAL_BUFFER_HEADER_T needs to be sent back to the user

◆ mmal_port_clock_active_get()

MMAL_BOOL_T mmal_port_clock_active_get ( MMAL_PORT_T port)

◆ mmal_port_clock_active_set()

MMAL_STATUS_T mmal_port_clock_active_set ( MMAL_PORT_T port,
MMAL_BOOL_T  active 
)

Get/set the clock port's active state

◆ mmal_port_clock_alloc()

MMAL_PORT_T* mmal_port_clock_alloc ( MMAL_COMPONENT_T component,
unsigned int  extra_size,
MMAL_PORT_CLOCK_EVENT_CB  event_cb 
)

Allocate a clock port.

Parameters
componentThe component requesting the alloc
extra_sizeSize of the port module
event_cbClock event callback
Returns
Pointer to new clock port or NULL on failure.

◆ mmal_port_clock_discont_threshold_get()

MMAL_STATUS_T mmal_port_clock_discont_threshold_get ( MMAL_PORT_T port,
MMAL_CLOCK_DISCONT_THRESHOLD_T threshold 
)

◆ mmal_port_clock_discont_threshold_set()

MMAL_STATUS_T mmal_port_clock_discont_threshold_set ( MMAL_PORT_T port,
const MMAL_CLOCK_DISCONT_THRESHOLD_T threshold 
)

Get/set the clock port's discontinuity threshold

◆ mmal_port_clock_free()

void mmal_port_clock_free ( MMAL_PORT_T port)

Free a clock port.

Parameters
portThe clock port to free

◆ mmal_port_clock_input_buffer_info()

void mmal_port_clock_input_buffer_info ( MMAL_PORT_T port,
const MMAL_CLOCK_BUFFER_INFO_T info 
)

Provide information regarding a buffer received on the component's input/output port

◆ mmal_port_clock_media_time_get()

int64_t mmal_port_clock_media_time_get ( MMAL_PORT_T port)

◆ mmal_port_clock_media_time_set()

MMAL_STATUS_T mmal_port_clock_media_time_set ( MMAL_PORT_T port,
int64_t  media_time 
)

Get/set the clock port's media-time

◆ mmal_port_clock_output_buffer_info()

void mmal_port_clock_output_buffer_info ( MMAL_PORT_T port,
const MMAL_CLOCK_BUFFER_INFO_T info 
)

◆ mmal_port_clock_reference_get()

MMAL_BOOL_T mmal_port_clock_reference_get ( MMAL_PORT_T port)

◆ mmal_port_clock_reference_set()

MMAL_STATUS_T mmal_port_clock_reference_set ( MMAL_PORT_T port,
MMAL_BOOL_T  reference 
)

Get/set the clock port's reference state

◆ mmal_port_clock_request_add()

MMAL_STATUS_T mmal_port_clock_request_add ( MMAL_PORT_T port,
int64_t  media_time,
MMAL_PORT_CLOCK_REQUEST_CB  cb,
void *  cb_data 
)

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

Parameters
portThe clock port
media_timeThe media-time at which the callback should be invoked (microseconds)
cbCallback to invoke
cb_dataClient-supplied callback data
Returns
MMAL_SUCCESS on success

◆ mmal_port_clock_request_flush()

MMAL_STATUS_T mmal_port_clock_request_flush ( MMAL_PORT_T port)

Remove all previously registered clock port requests.

Parameters
portThe clock port
Returns
MMAL_SUCCESS on success

◆ mmal_port_clock_request_threshold_get()

MMAL_STATUS_T mmal_port_clock_request_threshold_get ( MMAL_PORT_T port,
MMAL_CLOCK_REQUEST_THRESHOLD_T threshold 
)

◆ mmal_port_clock_request_threshold_set()

MMAL_STATUS_T mmal_port_clock_request_threshold_set ( MMAL_PORT_T port,
const MMAL_CLOCK_REQUEST_THRESHOLD_T threshold 
)

Get/set the clock port's request threshold

◆ mmal_port_clock_scale_get()

MMAL_RATIONAL_T mmal_port_clock_scale_get ( MMAL_PORT_T port)

◆ mmal_port_clock_scale_set()

MMAL_STATUS_T mmal_port_clock_scale_set ( MMAL_PORT_T port,
MMAL_RATIONAL_T  scale 
)

Get/set the clock port's scale

◆ mmal_port_clock_update_threshold_get()

MMAL_STATUS_T mmal_port_clock_update_threshold_get ( MMAL_PORT_T port,
MMAL_CLOCK_UPDATE_THRESHOLD_T threshold 
)

◆ mmal_port_clock_update_threshold_set()

MMAL_STATUS_T mmal_port_clock_update_threshold_set ( MMAL_PORT_T port,
const MMAL_CLOCK_UPDATE_THRESHOLD_T threshold 
)

Get/set the clock port's update threshold

◆ mmal_port_event_send()

void mmal_port_event_send ( MMAL_PORT_T port,
MMAL_BUFFER_HEADER_T buffer 
)

Callback called by components when an event MMAL_BUFFER_HEADER_T needs to be sent to the user. Events differ from ordinary buffer headers because they originate from the component and do not return data from the client to the component.

◆ mmal_port_free()

void mmal_port_free ( MMAL_PORT_T port)

Free a port structure

◆ mmal_port_is_connected()

MMAL_BOOL_T mmal_port_is_connected ( MMAL_PORT_T port)

Returns whether a port is connected or not

◆ mmal_port_pause()

MMAL_STATUS_T mmal_port_pause ( MMAL_PORT_T port,
MMAL_BOOL_T  pause 
)

Pause processing on a port

◆ mmal_port_release()

MMAL_STATUS_T mmal_port_release ( MMAL_PORT_T port)

Release a reference on a port

◆ mmal_ports_alloc()

MMAL_PORT_T** mmal_ports_alloc ( MMAL_COMPONENT_T ,
unsigned int  ports_num,
MMAL_PORT_TYPE_T  type,
unsigned int  extra_size 
)

Allocate an array of ports

◆ mmal_ports_clock_alloc()

MMAL_PORT_T** mmal_ports_clock_alloc ( MMAL_COMPONENT_T component,
unsigned int  ports_num,
unsigned int  extra_size,
MMAL_PORT_CLOCK_EVENT_CB  event_cb 
)

Allocate an array of clock ports.

Parameters
componentThe component requesting the alloc
ports_numNumber of ports to allocate
extra_sizeSize of the port module
event_cbClock event callback
Returns
Pointer to a new array of clock ports or NULL on failure.

◆ mmal_ports_clock_free()

void mmal_ports_clock_free ( MMAL_PORT_T **  ports,
unsigned int  ports_num 
)

Free an array of clock ports.

Parameters
portsThe clock ports to free
ports_numNumber of ports to free

◆ mmal_ports_free()

void mmal_ports_free ( MMAL_PORT_T **  ports,
unsigned int  ports_num 
)

Free an array of ports