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