blob: 24b002e8df0cc31b2ff595844520623764805366 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/*
* Broadcom BM2835 V4L2 driver
*
* Copyright © 2013 Raspberry Pi (Trading) Ltd.
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
* Authors: Vincent Sanders <vincent.sanders@collabora.co.uk>
* Dave Stevenson <dsteve@broadcom.com>
* Simon Mellor <simellor@broadcom.com>
* Luke Diamand <luked@broadcom.com>
*/
#ifndef MMAL_MSG_FORMAT_H
#define MMAL_MSG_FORMAT_H
#include "mmal-msg-common.h"
/* MMAL_ES_FORMAT_T */
struct mmal_audio_format {
u32 channels; /**< Number of audio channels */
u32 sample_rate; /**< Sample rate */
u32 bits_per_sample; /**< Bits per sample */
u32 block_align; /**< Size of a block of data */
};
struct mmal_video_format {
u32 width; /**< Width of frame in pixels */
u32 height; /**< Height of frame in rows of pixels */
struct mmal_rect crop; /**< Visible region of the frame */
struct mmal_rational frame_rate; /**< Frame rate */
struct mmal_rational par; /**< Pixel aspect ratio */
/* FourCC specifying the color space of the video stream. See the
* \ref MmalColorSpace "pre-defined color spaces" for some examples.
*/
u32 color_space;
};
struct mmal_subpicture_format {
u32 x_offset;
u32 y_offset;
};
union mmal_es_specific_format {
struct mmal_audio_format audio;
struct mmal_video_format video;
struct mmal_subpicture_format subpicture;
};
/** Definition of an elementary stream format (MMAL_ES_FORMAT_T) */
struct mmal_es_format_local {
u32 type; /* enum mmal_es_type */
u32 encoding; /* FourCC specifying encoding of the elementary stream.*/
u32 encoding_variant; /* FourCC specifying the specific
* encoding variant of the elementary
* stream.
*/
union mmal_es_specific_format *es; /* Type specific
* information for the
* elementary stream
*/
u32 bitrate; /**< Bitrate in bits per second */
u32 flags; /**< Flags describing properties of the elementary stream. */
u32 extradata_size; /**< Size of the codec specific data */
u8 *extradata; /**< Codec specific data */
};
/** Remote definition of an elementary stream format (MMAL_ES_FORMAT_T) */
struct mmal_es_format {
u32 type; /* enum mmal_es_type */
u32 encoding; /* FourCC specifying encoding of the elementary stream.*/
u32 encoding_variant; /* FourCC specifying the specific
* encoding variant of the elementary
* stream.
*/
u32 es; /* Type specific
* information for the
* elementary stream
*/
u32 bitrate; /**< Bitrate in bits per second */
u32 flags; /**< Flags describing properties of the elementary stream. */
u32 extradata_size; /**< Size of the codec specific data */
u32 extradata; /**< Codec specific data */
};
#endif /* MMAL_MSG_FORMAT_H */
|