00001 00030 #ifndef _OMX_ALSASRC_COMPONENT_H_ 00031 #define _OMX_ALSASRC_COMPONENT_H_ 00032 00033 #include <OMX_Types.h> 00034 #include <OMX_Component.h> 00035 #include <OMX_Core.h> 00036 #include <OMX_Audio.h> 00037 #include <pthread.h> 00038 #include <omx_base_source.h> 00039 #include <alsa/asoundlib.h> 00040 00044 DERIVEDCLASS(omx_alsasrc_component_PrivateType, omx_base_source_PrivateType) 00045 #define omx_alsasrc_component_PrivateType_FIELDS omx_base_source_PrivateType_FIELDS \ 00046 \ 00047 OMX_AUDIO_PARAM_PCMMODETYPE sPCMModeParam; \ 00048 \ 00049 char AudioPCMConfigured; \ 00050 \ 00051 snd_pcm_t* playback_handle; \ 00052 \ 00053 snd_pcm_hw_params_t* hw_params; 00054 ENDCLASS(omx_alsasrc_component_PrivateType) 00055 00056 /* Component private entry points declaration */ 00057 OMX_ERRORTYPE omx_alsasrc_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,OMX_STRING cComponentName); 00058 OMX_ERRORTYPE omx_alsasrc_component_Destructor(OMX_COMPONENTTYPE *openmaxStandComp); 00059 00060 void omx_alsasrc_component_BufferMgmtCallback( 00061 OMX_COMPONENTTYPE *openmaxStandComp, 00062 OMX_BUFFERHEADERTYPE* inputbuffer); 00063 00064 OMX_ERRORTYPE omx_alsasrc_component_GetParameter( 00065 OMX_IN OMX_HANDLETYPE hComponent, 00066 OMX_IN OMX_INDEXTYPE nParamIndex, 00067 OMX_INOUT OMX_PTR ComponentParameterStructure); 00068 00069 OMX_ERRORTYPE omx_alsasrc_component_SetParameter( 00070 OMX_IN OMX_HANDLETYPE hComponent, 00071 OMX_IN OMX_INDEXTYPE nParamIndex, 00072 OMX_IN OMX_PTR ComponentParameterStructure); 00073 00074 #endif