omx_alsasink_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_sink.h>
#include <alsa/asoundlib.h>

Go to the source code of this file.

Defines

#define omx_alsasink_component_PrivateType_FIELDS

Functions

OMX_ERRORTYPE omx_alsasink_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
OMX_ERRORTYPE omx_alsasink_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
void omx_alsasink_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *inputbuffer)
OMX_ERRORTYPE omx_alsasink_component_port_SendBufferFunction (omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE *pBuffer)
 the entry point for sending buffers to the alsa sink port
OMX_BOOL omx_alsasink_component_ClockPortHandleFunction (omx_alsasink_component_PrivateType *omx_alsasink_component_Private, OMX_BUFFERHEADERTYPE *inputbuffer)
OMX_ERRORTYPE omx_alsasink_component_GetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_alsasink_component_SetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_IN OMX_PTR ComponentParameterStructure)


Detailed Description

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

Copyright (C) 2007-2008 STMicroelectronics Copyright (C) 2007-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
2008-06-27 12:00:23 +0200 (Fri, 27 Jun 2008)
Revision
Rev
554
Author
Author
pankaj_sen

Definition in file omx_alsasink_component.h.


Define Documentation

#define omx_alsasink_component_PrivateType_FIELDS

Value:

omx_base_sink_PrivateType_FIELDS \
  OMX_AUDIO_PARAM_PCMMODETYPE  sPCMModeParam; \
  char                         AudioPCMConfigured;  \
  snd_pcm_t*                   playback_handle;  \
  OMX_S32                      xScale; \
  OMX_TIME_CLOCKSTATE          eState; \
  snd_pcm_hw_params_t*         hw_params;
Alsasinkport component private structure. see the define above
Parameters:
sPCMModeParam Audio PCM specific OpenMAX parameter
AudioPCMConfigured boolean flag to check if the audio has been configured
playback_handle ALSA specif handle for audio player
xScale the scale of the media clock
eState the state of the media clock
hw_params ALSA specif hardware parameters

Definition at line 51 of file omx_alsasink_component.h.


Function Documentation

void omx_alsasink_component_BufferMgmtCallback ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_BUFFERHEADERTYPE inputbuffer 
)

OMX_BOOL omx_alsasink_component_ClockPortHandleFunction ( omx_alsasink_component_PrivateType *  omx_alsasink_component_Private,
OMX_BUFFERHEADERTYPE inputbuffer 
)

OMX_ERRORTYPE omx_alsasink_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

OMX_ERRORTYPE omx_alsasink_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

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

OMX_ERRORTYPE omx_alsasink_component_port_SendBufferFunction ( omx_base_PortType openmaxStandPort,
OMX_BUFFERHEADERTYPE pBuffer 
)

the entry point for sending buffers to the alsa sink port

This function can be called by the EmptyThisBuffer or FillThisBuffer. It depends on the nature of the port, that can be an input or output port.

Definition at line 218 of file omx_alsasink_component.c.

References omx_base_component_PrivateType::bMgmtSem, checkHeader(), DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, OMX_PARAM_PORTDEFINITIONTYPE::eDir, err, omx_base_component_PrivateType::name, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BUFFERHEADERTYPE::nInputPortIndex, OMX_BUFFERHEADERTYPE::nOutputPortIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, omx_alsasink_component_ClockPortHandleFunction(), OMX_BASE_SINK_CLOCKPORT_INDEX, OMX_BASE_SINK_INPUTPORT_INDEX, OMX_BUFFERFLAG_STARTTIME, OMX_DirInput, OMX_ErrorBadParameter, OMX_ErrorBadPortIndex, OMX_ErrorIncorrectStateOperation, OMX_ErrorInvalidState, OMX_ErrorNone, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StatePause, OMX_TransStateExecutingToIdle, OMX_TRUE, OMX_BUFFERHEADERTYPE::pBuffer, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_PortType::pInternalBufferStorage, PORT_IS_BEING_DISABLED, PORT_IS_BEING_FLUSHED, PORT_IS_BUFFER_SUPPLIER, PORT_IS_ENABLED, PORT_IS_TUNNELED, PORT_IS_TUNNELED_N_BUFFER_SUPPLIER, omx_base_component_PrivateType::ports, queue(), omx_base_PortType::sPortParam, omx_base_PortType::standCompContainer, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, and tsem_up().

Referenced by omx_alsasink_component_Constructor().

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


Generated for OpenMAX Bellagio rel. 0.9.0 by  doxygen 1.5.1
SourceForge.net Logo