My Project
mmal_vc_msgs.h File Reference
#include "interface/vcos/vcos.h"
#include "interface/mmal/mmal.h"
#include "mmal_vc_api.h"

Go to the source code of this file.

Classes

struct  mmal_worker_msg_header
 
struct  mmal_worker_service_closed
 
struct  mmal_worker_version
 
struct  mmal_worker_component_create
 
struct  mmal_worker_component_create_reply
 
struct  mmal_worker_component_destroy
 
struct  mmal_worker_component_enable
 
struct  mmal_worker_component_disable
 
struct  mmal_worker_port_info_get
 
struct  mmal_worker_port_info_set
 
struct  mmal_worker_port_info
 
struct  mmal_worker_reply
 
struct  mmal_worker_drm_get_lhs32_reply
 
struct  mmal_worker_drm_get_time_reply
 
struct  mmal_worker_port_action
 
struct  mmal_worker_port_param_set
 
struct  mmal_worker_port_param_get
 
struct  mmal_worker_port_param_get_old
 
struct  mmal_worker_port_param_get_reply
 
struct  MMAL_DRIVER_BUFFER_T
 
struct  mmal_worker_buffer_from_host
 
struct  mmal_worker_event_to_host
 
struct  mmal_worker_stats
 
struct  mmal_worker_opaque_allocator
 
struct  mmal_worker_get_core_stats_for_port
 
struct  mmal_worker_get_core_stats_for_port_reply
 
struct  mmal_worker_consume_mem
 
struct  mmal_worker_compact
 
struct  mmal_worker_host_log
 
struct  mmal_worker_lmk
 

Macros

#define MMAL_CONTROL_FOURCC()   VCHIQ_MAKE_FOURCC('m','m','a','l')
 
#define WORKER_VER_MAJOR   16
 
#define WORKER_VER_MINIMUM   10
 
#define WORKER_VER_MINOR   1
 
#define VIDEOCORE_PREFIX   "vc"
 
#define MMAL_MAX_PORTS   8
 
#define MMAL_WORKER_MAX_MSG_LEN   512
 
#define MMAL_VC_CORE_STATS_NAME_MAX   32
 
#define MMAL_WORKER_MSG_LEN   28
 
#define MMAL_FORMAT_EXTRADATA_MAX_SIZE   128
 
#define MMAL_VC_SHORT_DATA   128
 
#define MMAL_WORKER_PORT_PARAMETER_SPACE   96
 
#define MMAL_WORKER_PORT_PARAMETER_SET_MAX   (MMAL_WORKER_PORT_PARAMETER_SPACE*sizeof(uint32_t)+sizeof(MMAL_PARAMETER_HEADER_T))
 
#define MMAL_WORKER_PORT_PARAMETER_GET_MAX   MMAL_WORKER_PORT_PARAMETER_SET_MAX
 
#define MMAL_WORKER_EVENT_SPACE   256
 

Typedefs

typedef struct mmal_worker_buffer_from_host mmal_worker_buffer_from_host
 
typedef struct mmal_worker_event_to_host mmal_worker_event_to_host
 

Enumerations

enum  MMAL_WORKER_CMD_T {
  MMAL_WORKER_QUIT = 1, MMAL_WORKER_SERVICE_CLOSED, MMAL_WORKER_GET_VERSION, MMAL_WORKER_COMPONENT_CREATE,
  MMAL_WORKER_COMPONENT_DESTROY, MMAL_WORKER_COMPONENT_ENABLE, MMAL_WORKER_COMPONENT_DISABLE, MMAL_WORKER_PORT_INFO_GET,
  MMAL_WORKER_PORT_INFO_SET, MMAL_WORKER_PORT_ACTION, MMAL_WORKER_BUFFER_FROM_HOST, MMAL_WORKER_BUFFER_TO_HOST,
  MMAL_WORKER_GET_STATS, MMAL_WORKER_PORT_PARAMETER_SET, MMAL_WORKER_PORT_PARAMETER_GET, MMAL_WORKER_EVENT_TO_HOST,
  MMAL_WORKER_GET_CORE_STATS_FOR_PORT, MMAL_WORKER_OPAQUE_ALLOCATOR, MMAL_WORKER_CONSUME_MEM, MMAL_WORKER_LMK,
  MMAL_WORKER_OPAQUE_ALLOCATOR_DESC, MMAL_WORKER_DRM_GET_LHS32, MMAL_WORKER_DRM_GET_TIME, MMAL_WORKER_BUFFER_FROM_HOST_ZEROLEN,
  MMAL_WORKER_PORT_FLUSH, MMAL_WORKER_HOST_LOG, MMAL_WORKER_COMPACT, MMAL_WORKER_MSG_LAST
}
 
enum  MMAL_WORKER_PORT_ACTIONS {
  MMAL_WORKER_PORT_ACTION_UNKNOWN = 0, MMAL_WORKER_PORT_ACTION_ENABLE, MMAL_WORKER_PORT_ACTION_DISABLE, MMAL_WORKER_PORT_ACTION_FLUSH,
  MMAL_WORKER_PORT_ACTION_CONNECT, MMAL_WORKER_PORT_ACTION_DISCONNECT, MMAL_WORKER_PORT_ACTION_SET_REQUIREMENTS, MMAL_WORKER_PORT_ACTION_MAX = 0x7fffffff
}
 
enum  MMAL_WORKER_OPAQUE_MEM_OP { MMAL_WORKER_OPAQUE_MEM_ALLOC, MMAL_WORKER_OPAQUE_MEM_RELEASE, MMAL_WORKER_OPAQUE_MEM_ACQUIRE, MMAL_WORKER_OPAQUE_MEM_MAX = 0x7fffffff }
 

Functions

 vcos_static_assert (!(sizeof(mmal_worker_msg_header) &0x7))
 
 vcos_static_assert (sizeof(mmal_worker_service_closed)<=MMAL_WORKER_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_component_create_reply)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_info_get)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_info_set)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_info)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_drm_get_lhs32_reply)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_drm_get_time_reply)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_action)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_param_set)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_param_get)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_port_param_get_reply)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_buffer_from_host)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_event_to_host)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_stats)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_consume_mem)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_compact)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_host_log)<=MMAL_WORKER_MAX_MSG_LEN)
 
 vcos_static_assert (sizeof(mmal_worker_lmk)<=MMAL_WORKER_MAX_MSG_LEN)
 

Detailed Description

Private message definitions, defining the message API between the host and VideoCore.

Definition in file mmal_vc_msgs.h.

Macro Definition Documentation

◆ MMAL_CONTROL_FOURCC

#define MMAL_CONTROL_FOURCC ( )    VCHIQ_MAKE_FOURCC('m','m','a','l')

Definition at line 40 of file mmal_vc_msgs.h.

◆ MMAL_FORMAT_EXTRADATA_MAX_SIZE

#define MMAL_FORMAT_EXTRADATA_MAX_SIZE   128

Maximum size of the format extradata. FIXME: should probably be made bigger and maybe be passed separately from the info.

Definition at line 66 of file mmal_vc_msgs.h.

◆ MMAL_MAX_PORTS

#define MMAL_MAX_PORTS   8

Max ports per component

Definition at line 53 of file mmal_vc_msgs.h.

◆ MMAL_VC_CORE_STATS_NAME_MAX

#define MMAL_VC_CORE_STATS_NAME_MAX   32

Length of the name in the core stats message

Definition at line 56 of file mmal_vc_msgs.h.

◆ MMAL_VC_SHORT_DATA

#define MMAL_VC_SHORT_DATA   128

Size of space reserved in a buffer message for short messages.

Definition at line 70 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_EVENT_SPACE

#define MMAL_WORKER_EVENT_SPACE   256

Maximum number of event data bytes that can be passed in the message. More than this and the data is passed in a bulk message.

Definition at line 403 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_MAX_MSG_LEN

#define MMAL_WORKER_MAX_MSG_LEN   512

Definition at line 55 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_MSG_LEN

#define MMAL_WORKER_MSG_LEN   28

A MMAL_CONTROL_SERVICE_T gets space for a single message. This is the space allocated for these messages.

Definition at line 61 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_PORT_PARAMETER_GET_MAX

#define MMAL_WORKER_PORT_PARAMETER_GET_MAX   MMAL_WORKER_PORT_PARAMETER_SET_MAX

Definition at line 304 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_PORT_PARAMETER_SET_MAX

#define MMAL_WORKER_PORT_PARAMETER_SET_MAX   (MMAL_WORKER_PORT_PARAMETER_SPACE*sizeof(uint32_t)+sizeof(MMAL_PARAMETER_HEADER_T))

Definition at line 301 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_PORT_PARAMETER_SPACE

#define MMAL_WORKER_PORT_PARAMETER_SPACE   96

Definition at line 299 of file mmal_vc_msgs.h.

◆ VIDEOCORE_PREFIX

#define VIDEOCORE_PREFIX   "vc"

Definition at line 51 of file mmal_vc_msgs.h.

◆ WORKER_VER_MAJOR

#define WORKER_VER_MAJOR   16

Definition at line 43 of file mmal_vc_msgs.h.

◆ WORKER_VER_MINIMUM

#define WORKER_VER_MINIMUM   10

Definition at line 44 of file mmal_vc_msgs.h.

◆ WORKER_VER_MINOR

#define WORKER_VER_MINOR   1

Definition at line 47 of file mmal_vc_msgs.h.

Typedef Documentation

◆ mmal_worker_buffer_from_host

Receive a buffer from the host.

See also
mmal_port_send_buffer()

◆ mmal_worker_event_to_host

Send an event buffer from the host.

See also
mmal_port_send_event()

Enumeration Type Documentation

◆ MMAL_WORKER_CMD_T

Message ids sent to worker thread.

Enumerator
MMAL_WORKER_QUIT 
MMAL_WORKER_SERVICE_CLOSED 
MMAL_WORKER_GET_VERSION 
MMAL_WORKER_COMPONENT_CREATE 
MMAL_WORKER_COMPONENT_DESTROY 
MMAL_WORKER_COMPONENT_ENABLE 
MMAL_WORKER_COMPONENT_DISABLE 
MMAL_WORKER_PORT_INFO_GET 
MMAL_WORKER_PORT_INFO_SET 
MMAL_WORKER_PORT_ACTION 
MMAL_WORKER_BUFFER_FROM_HOST 
MMAL_WORKER_BUFFER_TO_HOST 
MMAL_WORKER_GET_STATS 
MMAL_WORKER_PORT_PARAMETER_SET 
MMAL_WORKER_PORT_PARAMETER_GET 
MMAL_WORKER_EVENT_TO_HOST 
MMAL_WORKER_GET_CORE_STATS_FOR_PORT 
MMAL_WORKER_OPAQUE_ALLOCATOR 
MMAL_WORKER_CONSUME_MEM 
MMAL_WORKER_LMK 
MMAL_WORKER_OPAQUE_ALLOCATOR_DESC 
MMAL_WORKER_DRM_GET_LHS32 
MMAL_WORKER_DRM_GET_TIME 
MMAL_WORKER_BUFFER_FROM_HOST_ZEROLEN 
MMAL_WORKER_PORT_FLUSH 
MMAL_WORKER_HOST_LOG 
MMAL_WORKER_COMPACT 
MMAL_WORKER_MSG_LAST 

Definition at line 77 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_OPAQUE_MEM_OP

Enumerator
MMAL_WORKER_OPAQUE_MEM_ALLOC 
MMAL_WORKER_OPAQUE_MEM_RELEASE 
MMAL_WORKER_OPAQUE_MEM_ACQUIRE 
MMAL_WORKER_OPAQUE_MEM_MAX 

Definition at line 433 of file mmal_vc_msgs.h.

◆ MMAL_WORKER_PORT_ACTIONS

List of actions for a port

Enumerator
MMAL_WORKER_PORT_ACTION_UNKNOWN 

Unknown action

MMAL_WORKER_PORT_ACTION_ENABLE 

Enable a port

MMAL_WORKER_PORT_ACTION_DISABLE 

Disable a port

MMAL_WORKER_PORT_ACTION_FLUSH 

Flush a port

MMAL_WORKER_PORT_ACTION_CONNECT 

Connect 2 ports together

MMAL_WORKER_PORT_ACTION_DISCONNECT 

Disconnect 2 ports connected together

MMAL_WORKER_PORT_ACTION_SET_REQUIREMENTS 

Set buffer requirements

MMAL_WORKER_PORT_ACTION_MAX 

Make the enum 32bits

Definition at line 264 of file mmal_vc_msgs.h.

Function Documentation

◆ vcos_static_assert() [1/19]

vcos_static_assert ( sizeof(mmal_worker_msg_header) &0x7)

◆ vcos_static_assert() [2/19]

vcos_static_assert ( sizeof(mmal_worker_service_closed)<=  MMAL_WORKER_MSG_LEN)

◆ vcos_static_assert() [3/19]

vcos_static_assert ( sizeof(mmal_worker_component_create_reply)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [4/19]

vcos_static_assert ( sizeof(mmal_worker_port_info_get)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [5/19]

vcos_static_assert ( sizeof(mmal_worker_port_info_set)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [6/19]

vcos_static_assert ( sizeof(mmal_worker_port_info)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [7/19]

vcos_static_assert ( sizeof(mmal_worker_drm_get_lhs32_reply)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [8/19]

vcos_static_assert ( sizeof(mmal_worker_drm_get_time_reply)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [9/19]

vcos_static_assert ( sizeof(mmal_worker_port_action)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [10/19]

vcos_static_assert ( sizeof(mmal_worker_port_param_set)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [11/19]

vcos_static_assert ( sizeof(mmal_worker_port_param_get)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [12/19]

vcos_static_assert ( sizeof(mmal_worker_port_param_get_reply)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [13/19]

vcos_static_assert ( sizeof(mmal_worker_buffer_from_host)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [14/19]

vcos_static_assert ( sizeof(mmal_worker_event_to_host)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [15/19]

vcos_static_assert ( sizeof(mmal_worker_stats)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [16/19]

vcos_static_assert ( sizeof(mmal_worker_consume_mem)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [17/19]

vcos_static_assert ( sizeof(mmal_worker_compact)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [18/19]

vcos_static_assert ( sizeof(mmal_worker_host_log)<=  MMAL_WORKER_MAX_MSG_LEN)

◆ vcos_static_assert() [19/19]

vcos_static_assert ( sizeof(mmal_worker_lmk)<=  MMAL_WORKER_MAX_MSG_LEN)