|
OpenMAXBellagio 0.9.3
|
00001 00027 #ifndef _OMX_AUDIO_MIXER_COMPONENT_H_ 00028 #define _OMX_AUDIO_MIXER_COMPONENT_H_ 00029 00030 #include <OMX_Types.h> 00031 #include <OMX_Component.h> 00032 #include <OMX_Core.h> 00033 #include <string.h> 00034 #include <omx_base_filter.h> 00035 #include <omx_base_audio_port.h> 00036 00037 #define MIXER_COMP_NAME "OMX.st.audio.mixer" 00038 #define MIXER_COMP_ROLE "audio.mixer" 00039 #define MAX_MIXER_COMPONENTS 5 00040 00041 #define MIXER_QUALITY_LEVELS 1 00042 static int mixerQualityLevels []={50, 60000, 10, 40000}; 00043 00044 #define MAX_PORTS 5 // Maximum number of ports supported by the mixer. 4 input and 1 output 00045 #define MAX_CHANNEL 6 // Maximum number of channels supported in a single stream 5.1 00046 00049 DERIVEDCLASS(omx_audio_mixer_component_PortType, omx_base_audio_PortType) 00050 #define omx_audio_mixer_component_PortType_FIELDS omx_base_audio_PortType_FIELDS \ 00051 \ 00052 OMX_AUDIO_PARAM_PCMMODETYPE pAudioPcmMode; \ 00053 \ 00054 float gain; \ 00055 \ 00056 OMX_AUDIO_CONFIG_VOLUMETYPE sVolume; \ 00057 \ 00058 OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE sChannelVolume[MAX_CHANNEL]; 00059 ENDCLASS(omx_audio_mixer_component_PortType) 00060 00061 00064 DERIVEDCLASS(omx_audio_mixer_component_PrivateType, omx_base_filter_PrivateType) 00065 #define omx_audio_mixer_component_PrivateType_FIELDS omx_base_filter_PrivateType_FIELDS \ 00066 00067 ENDCLASS(omx_audio_mixer_component_PrivateType) 00068 00069 /* Component private entry points declaration */ 00070 OMX_ERRORTYPE omx_audio_mixer_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,OMX_STRING cComponentName); 00071 OMX_ERRORTYPE omx_audio_mixer_component_Destructor(OMX_COMPONENTTYPE *openmaxStandComp); 00072 00073 void omx_audio_mixer_component_BufferMgmtCallback( 00074 OMX_COMPONENTTYPE *openmaxStandComp, 00075 OMX_BUFFERHEADERTYPE* inputbuffer, 00076 OMX_BUFFERHEADERTYPE* outputbuffer); 00077 00078 OMX_ERRORTYPE omx_audio_mixer_component_GetParameter( 00079 OMX_HANDLETYPE hComponent, 00080 OMX_INDEXTYPE nParamIndex, 00081 OMX_PTR ComponentParameterStructure); 00082 00083 OMX_ERRORTYPE omx_audio_mixer_component_SetParameter( 00084 OMX_HANDLETYPE hComponent, 00085 OMX_INDEXTYPE nParamIndex, 00086 OMX_PTR ComponentParameterStructure); 00087 00088 OMX_ERRORTYPE omx_audio_mixer_component_GetConfig( 00089 OMX_HANDLETYPE hComponent, 00090 OMX_INDEXTYPE nIndex, 00091 OMX_PTR pComponentConfigStructure); 00092 00093 OMX_ERRORTYPE omx_audio_mixer_component_SetConfig( 00094 OMX_HANDLETYPE hComponent, 00095 OMX_INDEXTYPE nIndex, 00096 OMX_PTR pComponentConfigStructure); 00097 00103 void* omx_audio_mixer_BufferMgmtFunction (void* param); 00104 00105 #endif