My Project
mmal_il.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the copyright holder nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef MMAL_IL_H
29 #define MMAL_IL_H
30 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 #include "interface/vmcs_host/khronos/IL/OMX_Core.h"
42 #include "interface/vmcs_host/khronos/IL/OMX_Component.h"
43 #include "interface/vmcs_host/khronos/IL/OMX_Video.h"
44 #include "interface/vmcs_host/khronos/IL/OMX_Audio.h"
45 #include "interface/vmcs_host/khronos/IL/OMX_Broadcom.h"
46 
52 OMX_ERRORTYPE mmalil_error_to_omx(MMAL_STATUS_T status);
53 
59 MMAL_STATUS_T mmalil_error_to_mmal(OMX_ERRORTYPE error);
60 
66 uint32_t mmalil_buffer_flags_to_mmal(OMX_U32 flags);
67 
73 OMX_U32 mmalil_buffer_flags_to_omx(uint32_t flags);
74 
81 uint32_t mmalil_video_buffer_flags_to_mmal(OMX_U32 flags);
82 
89 OMX_U32 mmalil_video_buffer_flags_to_omx(uint32_t flags);
90 
97 void mmalil_buffer_header_to_omx(OMX_BUFFERHEADERTYPE *omx, MMAL_BUFFER_HEADER_T *mmal);
98 
104 void mmalil_buffer_header_to_mmal(MMAL_BUFFER_HEADER_T *mmal, OMX_BUFFERHEADERTYPE *omx);
105 
106 OMX_PORTDOMAINTYPE mmalil_es_type_to_omx_domain(MMAL_ES_TYPE_T type);
107 MMAL_ES_TYPE_T mmalil_omx_domain_to_es_type(OMX_PORTDOMAINTYPE domain);
108 uint32_t mmalil_omx_audio_coding_to_encoding(OMX_AUDIO_CODINGTYPE coding);
109 OMX_AUDIO_CODINGTYPE mmalil_encoding_to_omx_audio_coding(uint32_t encoding);
110 uint32_t mmalil_omx_video_coding_to_encoding(OMX_VIDEO_CODINGTYPE coding);
111 OMX_VIDEO_CODINGTYPE mmalil_encoding_to_omx_video_coding(uint32_t encoding);
112 uint32_t mmalil_omx_image_coding_to_encoding(OMX_IMAGE_CODINGTYPE coding);
113 OMX_IMAGE_CODINGTYPE mmalil_encoding_to_omx_image_coding(uint32_t encoding);
114 uint32_t mmalil_omx_coding_to_encoding(uint32_t encoding, OMX_PORTDOMAINTYPE domain);
115 uint32_t mmalil_omx_color_format_to_encoding(OMX_COLOR_FORMATTYPE coding);
116 OMX_COLOR_FORMATTYPE mmalil_encoding_to_omx_color_format(uint32_t encoding);
117 uint32_t mmalil_omx_bayer_format_order_to_encoding(OMX_BAYERORDERTYPE bayer_order, OMX_COLOR_FORMATTYPE color_format);
118 OMX_BAYERORDERTYPE mmalil_encoding_to_omx_bayer_order(uint32_t encoding);
119 uint32_t mmalil_omx_color_space_to_mmal(OMX_COLORSPACETYPE coding);
120 OMX_COLORSPACETYPE mmalil_color_space_to_omx(uint32_t coding);
121 uint32_t mmalil_omx_video_profile_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding);
122 OMX_U32 mmalil_video_profile_to_omx(uint32_t profile);
123 uint32_t mmalil_omx_video_level_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding);
124 OMX_U32 mmalil_video_level_to_omx(uint32_t level);
125 MMAL_VIDEO_RATECONTROL_T mmalil_omx_video_ratecontrol_to_mmal(OMX_VIDEO_CONTROLRATETYPE omx);
126 OMX_VIDEO_CONTROLRATETYPE mmalil_video_ratecontrol_to_omx(MMAL_VIDEO_RATECONTROL_T mmal);
127 MMAL_VIDEO_INTRA_REFRESH_T mmalil_omx_video_intrarefresh_to_mmal(OMX_VIDEO_INTRAREFRESHTYPE omx);
128 
130 typedef union OMX_FORMAT_PARAM_TYPE {
131  OMX_PARAM_U32TYPE common;
132 
133  /* Video */
134  OMX_VIDEO_PARAM_AVCTYPE avc;
135  OMX_VIDEO_PARAM_H263TYPE h263;
136  OMX_VIDEO_PARAM_MPEG2TYPE mpeg2;
137  OMX_VIDEO_PARAM_MPEG4TYPE mpeg4;
138  OMX_VIDEO_PARAM_WMVTYPE wmv;
139  OMX_VIDEO_PARAM_RVTYPE rv;
140 
141  /* Audio */
142  OMX_AUDIO_PARAM_PCMMODETYPE pcm;
143  OMX_AUDIO_PARAM_MP3TYPE mp3;
144  OMX_AUDIO_PARAM_AACPROFILETYPE aac;
145  OMX_AUDIO_PARAM_VORBISTYPE vorbis;
146  OMX_AUDIO_PARAM_WMATYPE wma;
147  OMX_AUDIO_PARAM_RATYPE ra;
148  OMX_AUDIO_PARAM_SBCTYPE sbc;
149  OMX_AUDIO_PARAM_ADPCMTYPE adpcm;
150  OMX_AUDIO_PARAM_G723TYPE g723;
151  OMX_AUDIO_PARAM_G726TYPE g726;
152  OMX_AUDIO_PARAM_G729TYPE g729;
153  OMX_AUDIO_PARAM_AMRTYPE amr;
154  OMX_AUDIO_PARAM_GSMFRTYPE gsmfr;
155  OMX_AUDIO_PARAM_GSMHRTYPE gsmhr;
156  OMX_AUDIO_PARAM_GSMEFRTYPE gsmefr;
157  OMX_AUDIO_PARAM_TDMAFRTYPE tdmafr;
158  OMX_AUDIO_PARAM_TDMAEFRTYPE tdmaefr;
159  OMX_AUDIO_PARAM_PDCFRTYPE pdcfr;
160  OMX_AUDIO_PARAM_PDCEFRTYPE pdcefr;
161  OMX_AUDIO_PARAM_PDCHRTYPE pdchr;
162  OMX_AUDIO_PARAM_QCELP8TYPE qcelp8;
163  OMX_AUDIO_PARAM_QCELP13TYPE qcelp13;
164  OMX_AUDIO_PARAM_EVRCTYPE evrc;
165  OMX_AUDIO_PARAM_SMVTYPE smv;
166  OMX_AUDIO_PARAM_MIDITYPE midi;
167 #ifdef OMX_AUDIO_CodingDDP_Supported
168  OMX_AUDIO_PARAM_DDPTYPE ddp;
169 #endif
170 #ifdef OMX_AUDIO_CodingDTS_Supported
171  OMX_AUDIO_PARAM_DTSTYPE dts;
172 #endif
173 
175 
183 OMX_INDEXTYPE mmalil_omx_audio_param_index(OMX_AUDIO_CODINGTYPE coding, OMX_U32 *size);
184 
191 OMX_AUDIO_CODINGTYPE mmalil_omx_audio_param_index_to_coding(OMX_INDEXTYPE index);
192 
199 MMAL_STATUS_T mmalil_omx_default_channel_mapping(OMX_AUDIO_CHANNELTYPE *channel_mapping, unsigned int nchannels);
200 
210  OMX_AUDIO_CODINGTYPE coding, OMX_FORMAT_PARAM_TYPE *param);
211 
220 OMX_AUDIO_CODINGTYPE mmalil_format_to_omx_audio_param(OMX_FORMAT_PARAM_TYPE *param,
221  OMX_INDEXTYPE *param_index, MMAL_ES_FORMAT_T *format);
222 
223 #ifdef __cplusplus
224 }
225 #endif
226 
229 #endif /* MMAL_IL_H */
OMX_AUDIO_PARAM_TDMAEFRTYPE tdmaefr
Definition: mmal_il.h:158
OMX_AUDIO_PARAM_QCELP8TYPE qcelp8
Definition: mmal_il.h:162
OMX_AUDIO_PARAM_GSMFRTYPE gsmfr
Definition: mmal_il.h:154
OMX_U32 mmalil_video_level_to_omx(uint32_t level)
OMX_AUDIO_PARAM_TDMAFRTYPE tdmafr
Definition: mmal_il.h:157
OMX_IMAGE_CODINGTYPE mmalil_encoding_to_omx_image_coding(uint32_t encoding)
OMX_VIDEO_PARAM_AVCTYPE avc
Definition: mmal_il.h:134
OMX_AUDIO_PARAM_WMATYPE wma
Definition: mmal_il.h:146
OMX_AUDIO_PARAM_RATYPE ra
Definition: mmal_il.h:147
OMX_U32 mmalil_video_buffer_flags_to_omx(uint32_t flags)
MMAL_ES_TYPE_T mmalil_omx_domain_to_es_type(OMX_PORTDOMAINTYPE domain)
MMAL_STATUS_T mmalil_error_to_mmal(OMX_ERRORTYPE error)
uint32_t mmalil_omx_color_space_to_mmal(OMX_COLORSPACETYPE coding)
OMX_AUDIO_PARAM_MIDITYPE midi
Definition: mmal_il.h:166
uint32_t mmalil_omx_video_profile_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding)
OMX_AUDIO_CODINGTYPE mmalil_encoding_to_omx_audio_coding(uint32_t encoding)
uint32_t mmalil_omx_video_coding_to_encoding(OMX_VIDEO_CODINGTYPE coding)
uint32_t mmalil_buffer_flags_to_mmal(OMX_U32 flags)
MMAL_VIDEO_RATECONTROL_T mmalil_omx_video_ratecontrol_to_mmal(OMX_VIDEO_CONTROLRATETYPE omx)
OMX_INDEXTYPE mmalil_omx_audio_param_index(OMX_AUDIO_CODINGTYPE coding, OMX_U32 *size)
OMX_U32 mmalil_video_profile_to_omx(uint32_t profile)
OMX_VIDEO_PARAM_MPEG4TYPE mpeg4
Definition: mmal_il.h:137
uint32_t mmalil_video_buffer_flags_to_mmal(OMX_U32 flags)
OMX_AUDIO_PARAM_G726TYPE g726
Definition: mmal_il.h:151
OMX_AUDIO_PARAM_PDCFRTYPE pdcfr
Definition: mmal_il.h:159
OMX_AUDIO_PARAM_PCMMODETYPE pcm
Definition: mmal_il.h:142
OMX_AUDIO_PARAM_GSMHRTYPE gsmhr
Definition: mmal_il.h:155
OMX_COLOR_FORMATTYPE mmalil_encoding_to_omx_color_format(uint32_t encoding)
OMX_AUDIO_PARAM_SBCTYPE sbc
Definition: mmal_il.h:148
MMAL_STATUS_T mmalil_omx_default_channel_mapping(OMX_AUDIO_CHANNELTYPE *channel_mapping, unsigned int nchannels)
OMX_AUDIO_PARAM_AACPROFILETYPE aac
Definition: mmal_il.h:144
void mmalil_buffer_header_to_mmal(MMAL_BUFFER_HEADER_T *mmal, OMX_BUFFERHEADERTYPE *omx)
OMX_VIDEO_PARAM_RVTYPE rv
Definition: mmal_il.h:139
OMX_AUDIO_PARAM_AMRTYPE amr
Definition: mmal_il.h:153
OMX_AUDIO_PARAM_GSMEFRTYPE gsmefr
Definition: mmal_il.h:156
OMX_PARAM_U32TYPE common
Definition: mmal_il.h:131
OMX_AUDIO_PARAM_MP3TYPE mp3
Definition: mmal_il.h:143
uint32_t MMAL_FOURCC_T
Definition: mmal_types.h:92
OMX_AUDIO_CODINGTYPE mmalil_format_to_omx_audio_param(OMX_FORMAT_PARAM_TYPE *param, OMX_INDEXTYPE *param_index, MMAL_ES_FORMAT_T *format)
uint32_t mmalil_omx_color_format_to_encoding(OMX_COLOR_FORMATTYPE coding)
OMX_AUDIO_PARAM_PDCHRTYPE pdchr
Definition: mmal_il.h:161
OMX_AUDIO_PARAM_G729TYPE g729
Definition: mmal_il.h:152
OMX_AUDIO_PARAM_G723TYPE g723
Definition: mmal_il.h:150
OMX_COLORSPACETYPE mmalil_color_space_to_omx(uint32_t coding)
OMX_AUDIO_PARAM_PDCEFRTYPE pdcefr
Definition: mmal_il.h:160
OMX_AUDIO_PARAM_SMVTYPE smv
Definition: mmal_il.h:165
OMX_BAYERORDERTYPE mmalil_encoding_to_omx_bayer_order(uint32_t encoding)
OMX_U32 mmalil_buffer_flags_to_omx(uint32_t flags)
OMX_VIDEO_PARAM_WMVTYPE wmv
Definition: mmal_il.h:138
OMX_VIDEO_CODINGTYPE mmalil_encoding_to_omx_video_coding(uint32_t encoding)
MMAL_VIDEO_INTRA_REFRESH_T mmalil_omx_video_intrarefresh_to_mmal(OMX_VIDEO_INTRAREFRESHTYPE omx)
OMX_VIDEO_PARAM_MPEG2TYPE mpeg2
Definition: mmal_il.h:136
void mmalil_buffer_header_to_omx(OMX_BUFFERHEADERTYPE *omx, MMAL_BUFFER_HEADER_T *mmal)
OMX_VIDEO_PARAM_H263TYPE h263
Definition: mmal_il.h:135
MMAL_ES_TYPE_T
Definition: mmal_format.h:44
OMX_ERRORTYPE mmalil_error_to_omx(MMAL_STATUS_T status)
OMX_AUDIO_CODINGTYPE mmalil_omx_audio_param_index_to_coding(OMX_INDEXTYPE index)
OMX_AUDIO_PARAM_ADPCMTYPE adpcm
Definition: mmal_il.h:149
OMX_AUDIO_PARAM_VORBISTYPE vorbis
Definition: mmal_il.h:145
uint32_t mmalil_omx_bayer_format_order_to_encoding(OMX_BAYERORDERTYPE bayer_order, OMX_COLOR_FORMATTYPE color_format)
MMAL_STATUS_T
Definition: mmal_types.h:46
uint32_t mmalil_omx_coding_to_encoding(uint32_t encoding, OMX_PORTDOMAINTYPE domain)
uint32_t mmalil_omx_video_level_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding)
OMX_PORTDOMAINTYPE mmalil_es_type_to_omx_domain(MMAL_ES_TYPE_T type)
uint32_t mmalil_omx_audio_coding_to_encoding(OMX_AUDIO_CODINGTYPE coding)
OMX_VIDEO_CONTROLRATETYPE mmalil_video_ratecontrol_to_omx(MMAL_VIDEO_RATECONTROL_T mmal)
MMAL_FOURCC_T mmalil_omx_audio_param_to_format(MMAL_ES_FORMAT_T *format, OMX_AUDIO_CODINGTYPE coding, OMX_FORMAT_PARAM_TYPE *param)
union OMX_FORMAT_PARAM_TYPE OMX_FORMAT_PARAM_TYPE
uint32_t mmalil_omx_image_coding_to_encoding(OMX_IMAGE_CODINGTYPE coding)
OMX_AUDIO_PARAM_QCELP13TYPE qcelp13
Definition: mmal_il.h:163
OMX_AUDIO_PARAM_EVRCTYPE evrc
Definition: mmal_il.h:164