My Project
|
Definition of an elementary stream format and its associated API
#define MMAL_ES_FORMAT_COMPARE_FLAG_BITRATE 0x04 |
The bitrate is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_ENCODING 0x02 |
The encoding is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_ES_OTHER 0x10000000 |
Other ES specific parameters are different
#define MMAL_ES_FORMAT_COMPARE_FLAG_EXTRADATA 0x10 |
The extradata is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_FLAGS 0x08 |
The flags are different
#define MMAL_ES_FORMAT_COMPARE_FLAG_TYPE 0x01 |
The type is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_ASPECT_RATIO 0x0800 |
The video aspect ratio is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_COLOR_SPACE 0x1000 |
The video color space is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_CROPPING 0x0200 |
The video cropping is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_FRAME_RATE 0x0400 |
The video frame rate is different
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_RESOLUTION 0x0100 |
The video resolution is different
#define MMAL_ES_FORMAT_FLAG_FRAMED 0x1 |
The elementary stream will already be framed
typedef struct MMAL_AUDIO_FORMAT_T MMAL_AUDIO_FORMAT_T |
Definition of an audio format. This describes the properties specific to an audio stream
typedef struct MMAL_ES_FORMAT_T MMAL_ES_FORMAT_T |
Definition of an elementary stream format
enum MMAL_ES_TYPE_T |
Enumeration of the different types of elementary streams. This divides elementary streams into 4 big categories, plus an invalid type.
MMAL_ES_FORMAT_T* mmal_format_alloc | ( | void | ) |
Allocate and initialise a MMAL_ES_FORMAT_T structure.
Allocate a format structure
uint32_t mmal_format_compare | ( | MMAL_ES_FORMAT_T * | fmt1, |
MMAL_ES_FORMAT_T * | fmt2 | ||
) |
Compare 2 format structures and returns a set of flags describing the differences. The result will be zero if the structures are the same, or a combination of one or more of the Comparison flags if different.
format_1 | first MMAL_ES_FORMAT_T to compare |
format_2 | second MMAL_ES_FORMAT_T to compare |
Compare 2 format structures
void mmal_format_copy | ( | MMAL_ES_FORMAT_T * | fmt_dst, |
MMAL_ES_FORMAT_T * | fmt_src | ||
) |
Shallow copy a format structure. It is worth noting that the extradata buffer will not be copied in the new format.
format_dest | destination MMAL_ES_FORMAT_T for the copy |
format_src | source MMAL_ES_FORMAT_T for the copy |
Copy a format structure
MMAL_STATUS_T mmal_format_extradata_alloc | ( | MMAL_ES_FORMAT_T * | format, |
unsigned int | size | ||
) |
Allocate the extradata buffer in MMAL_ES_FORMAT_T. This buffer will be freed automatically when the format is destroyed or another allocation is done.
format | format structure for which the extradata buffer will be allocated |
size | size of the extradata buffer to allocate |
void mmal_format_free | ( | MMAL_ES_FORMAT_T * | format | ) |
Free a MMAL_ES_FORMAT_T structure allocated by mmal_format_alloc.
format | the MMAL_ES_FORMAT_T structure to free |
Free a format structure
MMAL_STATUS_T mmal_format_full_copy | ( | MMAL_ES_FORMAT_T * | fmt_dst, |
MMAL_ES_FORMAT_T * | fmt_src | ||
) |
Fully copy a format structure, including the extradata buffer.
format_dest | destination MMAL_ES_FORMAT_T for the copy |
format_src | source MMAL_ES_FORMAT_T for the copy |
Full copy of a format structure (including extradata)