1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Broadcom BM2835 V4L2 driver
5 * Copyright © 2013 Raspberry Pi (Trading) Ltd.
7 * Authors: Vincent Sanders @ Collabora
8 * Dave Stevenson @ Broadcom
9 * (now dave.stevenson@raspberrypi.org)
10 * Simon Mellor @ Broadcom
11 * Luke Diamand @ Broadcom
14 #ifndef MMAL_MSG_FORMAT_H
15 #define MMAL_MSG_FORMAT_H
17 #include "mmal-msg-common.h"
19 /* MMAL_ES_FORMAT_T */
21 struct mmal_audio_format {
22 u32 channels; /* Number of audio channels */
23 u32 sample_rate; /* Sample rate */
25 u32 bits_per_sample; /* Bits per sample */
26 u32 block_align; /* Size of a block of data */
29 struct mmal_video_format {
30 u32 width; /* Width of frame in pixels */
31 u32 height; /* Height of frame in rows of pixels */
32 struct mmal_rect crop; /* Visible region of the frame */
33 struct mmal_rational frame_rate; /* Frame rate */
34 struct mmal_rational par; /* Pixel aspect ratio */
37 * FourCC specifying the color space of the video stream. See the
38 * MmalColorSpace "pre-defined color spaces" for some examples.
43 struct mmal_subpicture_format {
48 union mmal_es_specific_format {
49 struct mmal_audio_format audio;
50 struct mmal_video_format video;
51 struct mmal_subpicture_format subpicture;
54 /* Definition of an elementary stream format (MMAL_ES_FORMAT_T) */
55 struct mmal_es_format_local {
56 u32 type; /* enum mmal_es_type */
58 u32 encoding; /* FourCC specifying encoding of the elementary
61 u32 encoding_variant; /* FourCC specifying the specific
62 * encoding variant of the elementary
66 union mmal_es_specific_format *es; /* Type specific
71 u32 bitrate; /* Bitrate in bits per second */
72 u32 flags; /* Flags describing properties of the elementary
76 u32 extradata_size; /* Size of the codec specific data */
77 u8 *extradata; /* Codec specific data */
80 /* Remote definition of an elementary stream format (MMAL_ES_FORMAT_T) */
81 struct mmal_es_format {
82 u32 type; /* enum mmal_es_type */
84 u32 encoding; /* FourCC specifying encoding of the elementary
87 u32 encoding_variant; /* FourCC specifying the specific
88 * encoding variant of the elementary
92 u32 es; /* Type specific
97 u32 bitrate; /* Bitrate in bits per second */
98 u32 flags; /* Flags describing properties of the elementary
102 u32 extradata_size; /* Size of the codec specific data */
103 u32 extradata; /* Codec specific data */
106 #endif /* MMAL_MSG_FORMAT_H */