MMAL_3-15-2015
mmal_param_convert.h File Reference

Go to the source code of this file.

Functions

MMAL_STATUS_T mmal_parse_video_size (uint32_t *w, uint32_t *h, const char *str)
 
MMAL_STATUS_T mmal_parse_rational (MMAL_RATIONAL_T *dest, const char *str)
 
MMAL_STATUS_T mmal_parse_int (int *dest, const char *str)
 
MMAL_STATUS_T mmal_parse_uint (unsigned int *dest, const char *str)
 
MMAL_STATUS_T mmal_parse_geometry (MMAL_RECT_T *dest, const char *str)
 
MMAL_STATUS_T mmal_parse_video_codec (uint32_t *dest, const char *str)
 

Detailed Description

Support for setting/getting parameters as string values.

Function Documentation

MMAL_STATUS_T mmal_parse_geometry ( MMAL_RECT_T dest,
const char *  str 
)

Parse a geometry for a rectangle

e.g. 100*100+50+75 or 200*150

Parameters
destfilled in with result
strstring to convert
Returns
MMAL_SUCCESS or error code
MMAL_STATUS_T mmal_parse_int ( int *  dest,
const char *  str 
)

Parse an integer, e.g. -10, 0x1A, etc.

Parameters
destfilled in with result
strstring to convert
Returns
MMAL_SUCCESS or error code
MMAL_STATUS_T mmal_parse_rational ( MMAL_RATIONAL_T dest,
const char *  str 
)

Parse a rational number. e.g. "30000/1001", "30", etc.

Parameters
destfilled in with result
strstring to convert
Returns
MMAL_SUCCESS or error code
MMAL_STATUS_T mmal_parse_uint ( unsigned int *  dest,
const char *  str 
)

Parse an unsigned integer, e.g. 10, 0x1A, etc.

Parameters
destfilled in with result
strstring to convert
Returns
MMAL_SUCCESS or error code
MMAL_STATUS_T mmal_parse_video_codec ( uint32_t *  dest,
const char *  str 
)

Parse a video codec name (something that can be encoded/decoded)

Parameters
strstring to convert
destfilled in with result
Returns
MMAL_SUCCESS or error code
MMAL_STATUS_T mmal_parse_video_size ( uint32_t *  w,
uint32_t *  h,
const char *  str 
)

Parse a video size. e.g. "1080p" gives 1920x1080.

Parameters
wwidth result
hheight result
strstring to convert
Returns
MMAL_SUCCESS or error code