2 * Broadcom BM2835 V4L2 driver
4 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file COPYING in the main directory of this archive
10 * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk>
11 * Dave Stevenson <dsteve@broadcom.com>
12 * Simon Mellor <simellor@broadcom.com>
13 * Luke Diamand <luked@broadcom.com>
16 #ifndef MMAL_MSG_FORMAT_H
17 #define MMAL_MSG_FORMAT_H
19 #include "mmal-msg-common.h"
21 /* MMAL_ES_FORMAT_T */
23 struct mmal_audio_format {
24 u32 channels; /**< Number of audio channels */
25 u32 sample_rate; /**< Sample rate */
27 u32 bits_per_sample; /**< Bits per sample */
28 u32 block_align; /**< Size of a block of data */
31 struct mmal_video_format {
32 u32 width; /**< Width of frame in pixels */
33 u32 height; /**< Height of frame in rows of pixels */
34 struct mmal_rect crop; /**< Visible region of the frame */
35 struct mmal_rational frame_rate; /**< Frame rate */
36 struct mmal_rational par; /**< Pixel aspect ratio */
38 /* FourCC specifying the color space of the video stream. See the
39 * \ref MmalColorSpace "pre-defined color spaces" for some examples.
44 struct mmal_subpicture_format {
49 union mmal_es_specific_format {
50 struct mmal_audio_format audio;
51 struct mmal_video_format video;
52 struct mmal_subpicture_format subpicture;
55 /** Definition of an elementary stream format (MMAL_ES_FORMAT_T) */
56 struct mmal_es_format_local {
57 u32 type; /* enum mmal_es_type */
59 u32 encoding; /* FourCC specifying encoding of the elementary stream.*/
60 u32 encoding_variant; /* FourCC specifying the specific
61 * encoding variant of the elementary
65 union mmal_es_specific_format *es; /* Type specific
70 u32 bitrate; /**< Bitrate in bits per second */
71 u32 flags; /**< Flags describing properties of the elementary stream. */
73 u32 extradata_size; /**< Size of the codec specific data */
74 u8 *extradata; /**< Codec specific data */
77 /** Remote definition of an elementary stream format (MMAL_ES_FORMAT_T) */
78 struct mmal_es_format {
79 u32 type; /* enum mmal_es_type */
81 u32 encoding; /* FourCC specifying encoding of the elementary stream.*/
82 u32 encoding_variant; /* FourCC specifying the specific
83 * encoding variant of the elementary
87 u32 es; /* Type specific
92 u32 bitrate; /**< Bitrate in bits per second */
93 u32 flags; /**< Flags describing properties of the elementary stream. */
95 u32 extradata_size; /**< Size of the codec specific data */
96 u32 extradata; /**< Codec specific data */
99 #endif /* MMAL_MSG_FORMAT_H */