omx_alsasrc_component.h File Reference

#include <OMX_Types.h>
#include <OMX_Component.h>
#include <OMX_Core.h>
#include <OMX_Audio.h>
#include <pthread.h>
#include <omx_base_source.h>
#include <alsa/asoundlib.h>

Go to the source code of this file.

Defines

#define omx_alsasrc_component_PrivateType_FIELDS

Functions

OMX_ERRORTYPE omx_alsasrc_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
OMX_ERRORTYPE omx_alsasrc_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
void omx_alsasrc_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *inputbuffer)
OMX_ERRORTYPE omx_alsasrc_component_GetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_alsasrc_component_SetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_IN OMX_PTR ComponentParameterStructure)


Detailed Description

OpenMAX ALSA source component. This component is an audio source that uses ALSA library.

Copyright (C) 2008 STMicroelectronics Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

$Date$ Revision $Rev$ Author $Author$

Definition in file omx_alsasrc_component.h.


Define Documentation

#define omx_alsasrc_component_PrivateType_FIELDS

Value:

omx_base_source_PrivateType_FIELDS \ \
  OMX_AUDIO_PARAM_PCMMODETYPE sPCMModeParam; \  \
  char AudioPCMConfigured;  \  \
  snd_pcm_t* playback_handle;  \  \
  snd_pcm_hw_params_t* hw_params;
Alsasrcport component private structure. see the define above

Definition at line 45 of file omx_alsasrc_component.h.


Function Documentation

void omx_alsasrc_component_BufferMgmtCallback ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_BUFFERHEADERTYPE outputbuffer 
)

This function plays the input buffer. When fully consumed it returns.

Definition at line 183 of file omx_alsasrc_component.c.

References DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEBUG, OMX_BUFFERHEADERTYPE::nAllocLen, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::pBuffer, and OMX_COMPONENTTYPE::pComponentPrivate.

OMX_ERRORTYPE omx_alsasrc_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

The Constructor

Allocate Ports and call port constructor.

Domain specific section for the ports.

Definition at line 42 of file omx_alsasrc_component.c.

References err, omx_base_source_Constructor(), OMX_ErrorInsufficientResources, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.

Referenced by omx_component_library_Setup().

OMX_ERRORTYPE omx_alsasrc_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

The Destructor

Definition at line 153 of file omx_alsasrc_component.c.

References omx_base_source_Destructor(), and OMX_COMPONENTTYPE::pComponentPrivate.

OMX_ERRORTYPE omx_alsasrc_component_GetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_INOUT OMX_PTR  ComponentParameterStructure 
)

Definition at line 432 of file omx_alsasrc_component.c.

References checkHeader(), DEB_LEV_SIMPLE_SEQ, DEBUG, err, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, omx_base_component_GetParameter(), OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorNone, OMX_IndexParamAudioInit, OMX_IndexParamAudioPcm, OMX_IndexParamAudioPortFormat, OMX_COMPONENTTYPE::pComponentPrivate, and omx_base_audio_PortType::sAudioParam.

OMX_ERRORTYPE omx_alsasrc_component_SetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_IN OMX_PTR  ComponentParameterStructure 
)

Definition at line 217 of file omx_alsasrc_component.c.

References OMX_AUDIO_PARAM_PCMMODETYPE::bInterleaved, DEB_LEV_ERR, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_AUDIO_PARAM_PCMMODETYPE::eEndian, OMX_AUDIO_PARAM_PCMMODETYPE::eNumData, OMX_AUDIO_PARAM_PCMMODETYPE::ePCMMode, err, OMX_AUDIO_PARAM_PCMMODETYPE::nBitPerSample, OMX_AUDIO_PARAM_PCMMODETYPE::nChannels, OMX_AUDIO_PARAM_PCMMODETYPE::nPortIndex, OMX_AUDIO_PARAM_PORTFORMATTYPE::nPortIndex, OMX_AUDIO_PARAM_PCMMODETYPE::nSamplingRate, OMX_AUDIO_PCMModeALaw, OMX_AUDIO_PCMModeLinear, OMX_AUDIO_PCMModeMULaw, omx_base_component_ParameterSanityCheck(), omx_base_component_SetParameter(), OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_EndianLittle, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorHardware, OMX_ErrorNone, OMX_IndexParamAudioPcm, OMX_IndexParamAudioPortFormat, OMX_NumericalDataSigned, OMX_NumericalDataUnsigned, OMX_TRUE, OMX_COMPONENTTYPE::pComponentPrivate, rate, and omx_base_audio_PortType::sAudioParam.


Generated for OpenMAX Bellagio rel. 0.3.5-svn by  doxygen 1.5.1
SourceForge.net Logo