2 ** Copyright 2003-2010, VisualOn, Inc.
\r
4 ** Licensed under the Apache License, Version 2.0 (the "License");
\r
5 ** you may not use this file except in compliance with the License.
\r
6 ** You may obtain a copy of the License at
\r
8 ** http://www.apache.org/licenses/LICENSE-2.0
\r
10 ** Unless required by applicable law or agreed to in writing, software
\r
11 ** distributed under the License is distributed on an "AS IS" BASIS,
\r
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 ** See the License for the specific language governing permissions and
\r
14 ** limitations under the License.
\r
16 /*******************************************************************************
\r
19 Content: module and ID definition
\r
21 *******************************************************************************/
\r
23 #ifndef __voIndex_H__
\r
24 #define __voIndex_H__
\r
28 #endif /* __cplusplus */
\r
32 /* Define the module ID */
\r
33 #define _MAKE_SOURCE_ID(id, name) \
\r
34 VO_INDEX_SRC_##name = _VO_INDEX_SOURCE | id,
\r
36 #define _MAKE_CODEC_ID(id, name) \
\r
37 VO_INDEX_DEC_##name = _VO_INDEX_DEC | id, \
\r
38 VO_INDEX_ENC_##name = _VO_INDEX_ENC | id,
\r
40 #define _MAKE_EFFECT_ID(id, name) \
\r
41 VO_INDEX_EFT_##name = _VO_INDEX_EFFECT | id,
\r
43 #define _MAKE_SINK_ID(id, name) \
\r
44 VO_INDEX_SNK_##name = _VO_INDEX_SINK | id,
\r
46 #define _MAKE_FILTER_ID(id, name) \
\r
47 VO_INDEX_FLT_##name = _VO_INDEX_FILTER | id,
\r
49 #define _MAKE_OMX_ID(id, name) \
\r
50 VO_INDEX_OMX_##name = _VO_INDEX_OMX | id,
\r
52 #define _MAKE_MFW_ID(id, name) \
\r
53 VO_INDEX_MFW_##name = _VO_INDEX_MFW | id,
\r
57 _VO_INDEX_SOURCE = 0x01000000,
\r
58 _VO_INDEX_DEC = 0x02000000,
\r
59 _VO_INDEX_ENC = 0x03000000,
\r
60 _VO_INDEX_EFFECT = 0x04000000,
\r
61 _VO_INDEX_SINK = 0x05000000,
\r
62 _VO_INDEX_FILTER = 0x06000000,
\r
63 _VO_INDEX_OMX = 0x07000000,
\r
64 _VO_INDEX_MFW = 0x08000000,
\r
66 // define file parser modules
\r
67 _MAKE_SOURCE_ID (0x010000, MP4)
\r
68 _MAKE_SOURCE_ID (0x020000, AVI)
\r
69 _MAKE_SOURCE_ID (0x030000, ASF)
\r
70 _MAKE_SOURCE_ID (0x040000, REAL)
\r
71 _MAKE_SOURCE_ID (0x050000, AUDIO)
\r
72 _MAKE_SOURCE_ID (0x060000, FLASH)
\r
73 _MAKE_SOURCE_ID (0x070000, OGG)
\r
74 _MAKE_SOURCE_ID (0x080000, MKV)
\r
76 // define network source modules
\r
77 _MAKE_SOURCE_ID (0x110000, RTSP)
\r
78 _MAKE_SOURCE_ID (0x120000, HTTP)
\r
80 // define CMMB source modules
\r
81 _MAKE_SOURCE_ID (0x200000, CMMB)
\r
82 _MAKE_SOURCE_ID (0x210000, CMMB_INNO)
\r
83 _MAKE_SOURCE_ID (0x220000, CMMB_TELE)
\r
84 _MAKE_SOURCE_ID (0x230000, CMMB_SIANO)
\r
86 // define DVBT source modules
\r
87 _MAKE_SOURCE_ID (0x300000, DVBT)
\r
88 _MAKE_SOURCE_ID (0x310000, DVBT_DIBCOM)
\r
90 // define other source modules
\r
91 _MAKE_SOURCE_ID (0x400000, ID3)
\r
93 // define video codec modules
\r
94 _MAKE_CODEC_ID (0x010000, H264)
\r
95 _MAKE_CODEC_ID (0x020000, MPEG4)
\r
96 _MAKE_CODEC_ID (0x030000, H263)
\r
97 _MAKE_CODEC_ID (0x040000, S263)
\r
98 _MAKE_CODEC_ID (0x050000, RV)
\r
99 _MAKE_CODEC_ID (0x060000, WMV)
\r
100 _MAKE_CODEC_ID (0x070000, DIVX3)
\r
101 _MAKE_CODEC_ID (0x080000, MJPEG)
\r
102 _MAKE_CODEC_ID (0x090000, MPEG2)
\r
103 _MAKE_CODEC_ID (0x0A0000, VP6)
\r
105 // define audio codec modules
\r
106 _MAKE_CODEC_ID (0x210000, AAC)
\r
107 _MAKE_CODEC_ID (0x220000, MP3)
\r
108 _MAKE_CODEC_ID (0x230000, WMA)
\r
109 _MAKE_CODEC_ID (0x240000, RA)
\r
110 _MAKE_CODEC_ID (0x250000, AMRNB)
\r
111 _MAKE_CODEC_ID (0x260000, AMRWB)
\r
112 _MAKE_CODEC_ID (0x270000, AMRWBP)
\r
113 _MAKE_CODEC_ID (0x280000, QCELP)
\r
114 _MAKE_CODEC_ID (0x290000, EVRC)
\r
115 _MAKE_CODEC_ID (0x2A0000, ADPCM)
\r
116 _MAKE_CODEC_ID (0x2B0000, MIDI)
\r
117 _MAKE_CODEC_ID (0x2C0000, AC3)
\r
118 _MAKE_CODEC_ID (0x2D0000, FLAC)
\r
119 _MAKE_CODEC_ID (0x2E0000, DRA)
\r
120 _MAKE_CODEC_ID (0x2F0000, OGG)
\r
121 _MAKE_CODEC_ID (0x300000, G729)
\r
123 // define image codec modules
\r
124 _MAKE_CODEC_ID (0x410000, JPEG)
\r
125 _MAKE_CODEC_ID (0x420000, GIF)
\r
126 _MAKE_CODEC_ID (0x430000, PNG)
\r
127 _MAKE_CODEC_ID (0x440000, TIF)
\r
129 // define effect modules
\r
130 _MAKE_EFFECT_ID (0x010000, EQ)
\r
132 // define sink modules
\r
133 _MAKE_SINK_ID (0x010000, VIDEO)
\r
134 _MAKE_SINK_ID (0x020000, AUDIO)
\r
135 _MAKE_SINK_ID (0x030000, CCRRR)
\r
136 _MAKE_SINK_ID (0x040000, CCRRV)
\r
138 _MAKE_SINK_ID (0x110000, MP4)
\r
139 _MAKE_SINK_ID (0x120000, AVI)
\r
140 _MAKE_SINK_ID (0x130000, AFW)
\r
142 // define media frame module ID
\r
143 _MAKE_MFW_ID (0x010000, VOMMPLAY)
\r
144 _MAKE_MFW_ID (0x020000, VOMMREC)
\r
145 _MAKE_MFW_ID (0x030000, VOME)
\r
149 /* define the error ID */
\r
150 #define VO_ERR_NONE 0x00000000
\r
151 #define VO_ERR_FINISH 0x00000001
\r
152 #define VO_ERR_BASE 0X80000000
\r
153 #define VO_ERR_FAILED 0x80000001
\r
154 #define VO_ERR_OUTOF_MEMORY 0x80000002
\r
155 #define VO_ERR_NOT_IMPLEMENT 0x80000003
\r
156 #define VO_ERR_INVALID_ARG 0x80000004
\r
157 #define VO_ERR_INPUT_BUFFER_SMALL 0x80000005
\r
158 #define VO_ERR_OUTPUT_BUFFER_SMALL 0x80000006
\r
159 #define VO_ERR_WRONG_STATUS 0x80000007
\r
160 #define VO_ERR_WRONG_PARAM_ID 0x80000008
\r
161 #define VO_ERR_LICENSE_ERROR 0x80000009
\r
163 /* xxx is the module ID
\r
164 #define VO_ERR_FAILED 0x8xxx0001
\r
165 #define VO_ERR_OUTOF_MEMORY 0x8xxx0002
\r
166 #define VO_ERR_NOT_IMPLEMENT 0x8xxx0003
\r
167 #define VO_ERR_INVALID_ARG 0x8xxx0004
\r
168 #define VO_ERR_INPUT_BUFFER_SMALL 0x8xxx0005
\r
169 #define VO_ERR_OUTPUT_BUFFER_SMALL 0x8xxx0006
\r
170 #define VO_ERR_WRONG_STATUS 0x8xxx0007
\r
171 #define VO_ERR_WRONG_PARAM_ID 0x8xxx0008
\r
172 #define VO_ERR_LICENSE_ERROR 0x8xxx0009
\r
173 // Module own error ID
\r
174 #define VO_ERR_Module 0x8xxx0X00
\r
177 #define VO_PID_COMMON_BASE 0x40000000 /*!< The base of common param ID */
\r
178 #define VO_PID_COMMON_QUERYMEM (VO_PID_COMMON_BASE | 0X0001) /*!< Query the memory needed; Reserved. */
\r
179 #define VO_PID_COMMON_INPUTTYPE (VO_PID_COMMON_BASE | 0X0002) /*!< Set or get the input buffer type. VO_INPUT_TYPE */
\r
180 #define VO_PID_COMMON_HASRESOURCE (VO_PID_COMMON_BASE | 0X0003) /*!< Query it has resource to be used. VO_U32 *, 1 have, 0 No */
\r
181 #define VO_PID_COMMON_HEADDATA (VO_PID_COMMON_BASE | 0X0004) /*!< Decoder track header data. VO_CODECBUFFER * */
\r
182 #define VO_PID_COMMON_FLUSH (VO_PID_COMMON_BASE | 0X0005) /*!< Flush the codec buffer. VO_U32 *, 1 Flush, 0 No * */
\r
186 #define VO_ID_Mdoule 0x0xxx1000
\r
191 #endif /* __cplusplus */
\r
193 #endif // __voIndex_H__
\r