MMAL_3-15-2015
mmal_vc_api.h File Reference
#include "interface/mmal/mmal_types.h"
#include "interface/mmal/mmal_parameters.h"
#include "interface/mmal/mmal_port.h"

Go to the source code of this file.

Classes

struct  MMAL_VC_COMP_STATS_T
 
struct  MMAL_VC_STATS_T
 
struct  MMAL_VC_STATS_T::service
 
struct  MMAL_VC_STATS_T::commands
 
struct  MMAL_VC_HOST_LOG_T
 

Typedefs

typedef struct MMAL_VC_STATS_T MMAL_VC_STATS_T
 
typedef struct MMAL_VC_HOST_LOG_T MMAL_VC_HOST_LOG_T
 

Enumerations

enum  MMAL_STATS_COMP_STATE_T {
  MMAL_STATS_COMP_IDLE, MMAL_STATS_COMP_CREATED, MMAL_STATS_COMP_DESTROYING, MMAL_STATS_COMP_DESTROYED,
  MMAL_STATS_COMP_UNUSED = 0xffffffff
}
 
enum  MMAL_STATS_RESULT_T { MMAL_STATS_FOUND, MMAL_STATS_COMPONENT_NOT_FOUND, MMAL_STATS_PORT_NOT_FOUND, MMAL_STATS_INVALID = 0x7fffffff }
 
enum  MMAL_VC_COMPACT_MODE_T {
  MMAL_VC_COMPACT_NONE = 0, MMAL_VC_COMPACT_NORMAL = 1, MMAL_VC_COMPACT_DISCARD = 2, MMAL_VC_COMPACT_AGGRESSIVE = 4,
  MMAL_VC_COMPACT_SHUFFLE = 0x80, MMAL_VC_COMPACT_ALL = MMAL_VC_COMPACT_NORMAL | MMAL_VC_COMPACT_DISCARD | MMAL_VC_COMPACT_AGGRESSIVE
}
 

Functions

MMAL_STATUS_T mmal_vc_init (void)
 
void mmal_vc_deinit (void)
 
MMAL_STATUS_T mmal_vc_use (void)
 
MMAL_STATUS_T mmal_vc_release (void)
 
MMAL_STATUS_T mmal_vc_get_version (uint32_t *major, uint32_t *minor, uint32_t *minimum)
 
MMAL_STATUS_T mmal_vc_get_stats (MMAL_VC_STATS_T *stats, int reset)
 
MMAL_STATUS_T mmal_vc_get_core_stats (MMAL_CORE_STATISTICS_T *stats, MMAL_STATS_RESULT_T *result, char *name, size_t namelen, MMAL_PORT_TYPE_T type, unsigned component, unsigned port, MMAL_CORE_STATS_DIR dir, MMAL_BOOL_T reset)
 
MMAL_STATUS_T mmal_vc_host_log (const char *msg)
 
MMAL_STATUS_T mmal_vc_consume_mem (size_t size, uint32_t *handle)
 
MMAL_STATUS_T mmal_vc_compact (MMAL_VC_COMPACT_MODE_T mode, uint32_t *duration)
 
MMAL_STATUS_T mmal_vc_lmk (uint32_t alloc_size)
 

Detailed Description

Public API for MMAL VC client. Most functionality is exposed via MMAL itself.

Enumeration Type Documentation

State of components created by the VC adaptation layer, used for statistics reporting.

Status from querying MMAL core statistics.

Function Documentation

MMAL_STATUS_T mmal_vc_compact ( MMAL_VC_COMPACT_MODE_T  mode,
uint32_t *  duration 
)

Trigger relocatable heap compaction.

MMAL_STATUS_T mmal_vc_consume_mem ( size_t  size,
uint32_t *  handle 
)

Consumes memory in the relocatable heap.

The existing reserved memory is freed first then the new chunk is allocated. If zero is specified for the size then the previously reserved memory is freed and no allocation occurs.

At startup no memory is reserved.

Parameters
sizeSize of memory to consume in bytes.
handleSet to the mem handle for the reserved memory or zero if no memory was allocated.
Returns
MMAL_SUCCESS if memory was reserved (or size zero requested), MMAL_ENOSPC if the allocation failed or MMAL_ENOSYS if the API is not supported e.g in release mode VC images.
MMAL_STATUS_T mmal_vc_get_core_stats ( MMAL_CORE_STATISTICS_T stats,
MMAL_STATS_RESULT_T result,
char *  name,
size_t  namelen,
MMAL_PORT_TYPE_T  type,
unsigned  component,
unsigned  port,
MMAL_CORE_STATS_DIR  dir,
MMAL_BOOL_T  reset 
)

Return the MMAL core statistics for a given component/port.

Parameters
statsUpdated with given port statistics
resultWhether the port/component was found
nameFilled in with the name of the port
namelenLength of name
componentWhich component (indexed from zero)
port_typeWhich type of port
portWhich port (index from zero)
resetReset the stats.
MMAL_STATUS_T mmal_vc_host_log ( const char *  msg)

Stores an arbitrary text message in a circular buffer inside the MMAL VC server. The purpose of this message is to log high level events from the host in order to diagnose problems that require multiple actions to reproduce. e.g. taking multiple pictures with different settings.

Parameters
msgThe message text.
Returns
MMAL_SUCCESS if the message was logged or MMAL_ENOSYS if the API if not supported.
MMAL_STATUS_T mmal_vc_lmk ( uint32_t  alloc_size)

Trigger LMK action from VC, for diagnostics.