My Project
Classes | Typedefs | Enumerations | Functions
Elementary stream format

Classes

struct  MMAL_VIDEO_FORMAT_T
struct  MMAL_AUDIO_FORMAT_T
struct  MMAL_SUBPICTURE_FORMAT_T
union  MMAL_ES_SPECIFIC_FORMAT_T
struct  MMAL_ES_FORMAT_T

Typedefs

typedef struct MMAL_AUDIO_FORMAT_T MMAL_AUDIO_FORMAT_T
typedef struct MMAL_ES_FORMAT_T MMAL_ES_FORMAT_T

Enumerations

enum  MMAL_ES_TYPE_T {
  MMAL_ES_TYPE_UNKNOWN, MMAL_ES_TYPE_CONTROL, MMAL_ES_TYPE_AUDIO, MMAL_ES_TYPE_VIDEO,
  MMAL_ES_TYPE_SUBPICTURE
}

Functions

MMAL_ES_FORMAT_Tmmal_format_alloc (void)
void mmal_format_free (MMAL_ES_FORMAT_T *format)
MMAL_STATUS_T mmal_format_extradata_alloc (MMAL_ES_FORMAT_T *format, unsigned int size)
void mmal_format_copy (MMAL_ES_FORMAT_T *format_dest, MMAL_ES_FORMAT_T *format_src)
MMAL_STATUS_T mmal_format_full_copy (MMAL_ES_FORMAT_T *format_dest, MMAL_ES_FORMAT_T *format_src)
uint32_t mmal_format_compare (MMAL_ES_FORMAT_T *format_1, MMAL_ES_FORMAT_T *format_2)

Elementary stream flags

The following flags describe properties of an elementary stream

#define MMAL_ES_FORMAT_FLAG_FRAMED   0x1

Undefined encoding value.

This value indicates an unknown encoding

#define MMAL_ENCODING_UNKNOWN   0

Default encoding variant value.

This value indicates the default encoding variant is used

#define MMAL_ENCODING_VARIANT_DEFAULT   0

Comparison flags

The following flags describe the differences between 2 format structures

#define MMAL_ES_FORMAT_COMPARE_FLAG_TYPE   0x01
#define MMAL_ES_FORMAT_COMPARE_FLAG_ENCODING   0x02
#define MMAL_ES_FORMAT_COMPARE_FLAG_BITRATE   0x04
#define MMAL_ES_FORMAT_COMPARE_FLAG_FLAGS   0x08
#define MMAL_ES_FORMAT_COMPARE_FLAG_EXTRADATA   0x10
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_RESOLUTION   0x0100
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_CROPPING   0x0200
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_FRAME_RATE   0x0400
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_ASPECT_RATIO   0x0800
#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_COLOR_SPACE   0x1000
#define MMAL_ES_FORMAT_COMPARE_FLAG_ES_OTHER   0x10000000

Detailed Description

Definition of an elementary stream format and its associated API


Define Documentation

The bitrate is different

The encoding is different

#define MMAL_ES_FORMAT_COMPARE_FLAG_ES_OTHER   0x10000000

Other ES specific parameters are different

The extradata is different

The flags are different

The type is different

The video aspect ratio is different

The video color space is different

The video cropping is different

The video frame rate is different

The video resolution is different

#define MMAL_ES_FORMAT_FLAG_FRAMED   0x1

The elementary stream will already be framed


Typedef Documentation

Definition of an audio format. This describes the properties specific to an audio stream

Definition of an elementary stream format


Enumeration Type Documentation

Enumeration of the different types of elementary streams. This divides elementary streams into 4 big categories, plus an invalid type.

Enumerator:
MMAL_ES_TYPE_UNKNOWN 

Unknown elementary stream type

MMAL_ES_TYPE_CONTROL 

Elementary stream of control commands

MMAL_ES_TYPE_AUDIO 

Audio elementary stream

MMAL_ES_TYPE_VIDEO 

Video elementary stream

MMAL_ES_TYPE_SUBPICTURE 

Sub-picture elementary stream (e.g. subtitles, overlays)


Function Documentation

Allocate and initialise a MMAL_ES_FORMAT_T structure.

Returns:
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.

Parameters:
format_1first MMAL_ES_FORMAT_T to compare
format_2second MMAL_ES_FORMAT_T to compare
Returns:
set of flags describing the differences

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.

Parameters:
format_destdestination MMAL_ES_FORMAT_T for the copy
format_srcsource 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.

Parameters:
formatformat structure for which the extradata buffer will be allocated
sizesize of the extradata buffer to allocate
Returns:
MMAL_SUCCESS on success
void mmal_format_free ( MMAL_ES_FORMAT_T format)

Free a MMAL_ES_FORMAT_T structure allocated by mmal_format_alloc.

Parameters:
formatthe MMAL_ES_FORMAT_T structure to free

Free a format structure

Fully copy a format structure, including the extradata buffer.

Parameters:
format_destdestination MMAL_ES_FORMAT_T for the copy
format_srcsource MMAL_ES_FORMAT_T for the copy
Returns:
MMAL_SUCCESS on success

Full copy of a format structure (including extradata)

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines