omxaudiomixertest.c File Reference

#include "omxaudiomixertest.h"
#include "ctype.h"

Go to the source code of this file.

Defines

#define SINK_NAME   "OMX.st.alsa.alsasink"
#define BUFFER_COUNT_ACTUAL   2
#define FRAME_SIZE   1152*2*2

Functions

void display_help ()
int main (int argc, char **argv)
OMX_ERRORTYPE audiomixerEventHandler (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_EVENTTYPE eEvent, OMX_OUT OMX_U32 Data1, OMX_OUT OMX_U32 Data2, OMX_IN OMX_PTR pEventData)
OMX_ERRORTYPE audiomixerEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE audiomixerFillBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE audiosinkEventHandler (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_EVENTTYPE eEvent, OMX_OUT OMX_U32 Data1, OMX_OUT OMX_U32 Data2, OMX_OUT OMX_PTR pEventData)
OMX_ERRORTYPE audiosinkEmptyBufferDone (OMX_OUT OMX_HANDLETYPE hComponent, OMX_OUT OMX_PTR pAppData, OMX_OUT OMX_BUFFERHEADERTYPE *pBuffer)

Variables

OMX_CALLBACKTYPE callbacks
OMX_CALLBACKTYPE audiosinkcallbacks
appPrivateTypeappPriv
int fd = 0
int fd1 = 0
unsigned int filesize
unsigned int filesize1
int flagIsOutputExpected
int flagOutputReceived
int flagInputReceived
int flagIsGain [4]
int flagPlaybackOn
int flagSetupTunnel
int flagSampleRate
int flagChannel
char * input_file [2]
char * output_file
FILE * outfile
OMX_BUFFERHEADERTYPEinBuffer [4]
OMX_BUFFERHEADERTYPEoutBuffer [2]
OMX_BUFFERHEADERTYPEinBufferSink [2]


Detailed Description

This simple test application take one or more input stream/s. passes these streams to an audio mixer component and stores the mixed output in another output file.

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$

This simple test application take one or more input stream/s. passes these streams to audio mixer component and store mixed output into another output file.

Copyright (C) 2008 STMicroelectronics and Nokia

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-01-25 12:04:32 +0200 (Fri, 25 Jan 2008)
Revision
Rev
449
Author
Author
pankaj_sen

This simple test application take one or more input stream/s. passes these streams to audio mixer component and store mixed output into another output file.

Copyright (C) 2008 STMicroelectronics and Nokia

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

Definition in file audio_effects/omxaudiomixertest.c.


Define Documentation

#define BUFFER_COUNT_ACTUAL   2

Definition at line 35 of file audio_effects/omxaudiomixertest.c.

Referenced by main().

#define FRAME_SIZE   1152*2*2

Definition at line 36 of file audio_effects/omxaudiomixertest.c.

Referenced by audiomixerEmptyBufferDone(), and main().

#define SINK_NAME   "OMX.st.alsa.alsasink"

Definition at line 34 of file audio_effects/omxaudiomixertest.c.


Function Documentation

OMX_ERRORTYPE audiomixerEmptyBufferDone ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_BUFFERHEADERTYPE pBuffer 
)

Definition at line 658 of file audio_effects/omxaudiomixertest.c.

Referenced by main().

OMX_ERRORTYPE audiomixerEventHandler ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_EVENTTYPE  eEvent,
OMX_OUT OMX_U32  Data1,
OMX_OUT OMX_U32  Data2,
OMX_IN OMX_PTR  pEventData 
)

Definition at line 608 of file audio_effects/omxaudiomixertest.c.

Referenced by main().

OMX_ERRORTYPE audiomixerFillBufferDone ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_BUFFERHEADERTYPE pBuffer 
)

Definition at line 739 of file audio_effects/omxaudiomixertest.c.

Referenced by main().

OMX_ERRORTYPE audiosinkEmptyBufferDone ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_BUFFERHEADERTYPE pBuffer 
)

OMX_ERRORTYPE audiosinkEventHandler ( OMX_OUT OMX_HANDLETYPE  hComponent,
OMX_OUT OMX_PTR  pAppData,
OMX_OUT OMX_EVENTTYPE  eEvent,
OMX_OUT OMX_U32  Data1,
OMX_OUT OMX_U32  Data2,
OMX_OUT OMX_PTR  pEventData 
)

void display_help (  ) 

function prototype declaration display general help

help display

Definition at line 59 of file audio_effects/omxaudiomixertest.c.

int main ( int  argc,
char **  argv 
)

Ask the core for a handle to the audio mixer component

Get the number of ports

Schedule a couple of buffers to be filled on the output port The callback itself will re-schedule them.

Definition at line 94 of file audio_effects/omxaudiomixertest.c.

References appPrivateType::audiosinkhandle, BUFFER_COUNT_ACTUAL, BUFFER_IN_SIZE, appPrivateType::condition, DEB_LEV_ERR, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, display_help(), appPrivateType::eofSem, err, appPrivateType::eventSem, fd1, FRAME_SIZE, appPrivateType::handle, appPrivateType::mutex, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_AUDIO_PARAM_PCMMODETYPE::nChannels, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_AUDIO_PARAM_PCMMODETYPE::nPortIndex, OMX_AUDIO_CONFIG_VOLUMETYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, OMX_AUDIO_PARAM_PCMMODETYPE::nSamplingRate, OMX_BS32::nValue, OMX_AllocateBuffer, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FALSE, OMX_FillThisBuffer, OMX_FreeBuffer, OMX_FreeHandle(), OMX_GetConfig, OMX_GetHandle(), OMX_GetParameter, OMX_IndexConfigAudioVolume, OMX_IndexParamAudioInit, OMX_IndexParamAudioPcm, OMX_IndexParamPortDefinition, OMX_Init(), OMX_SendCommand, OMX_SetConfig, OMX_SetParameter, OMX_SetupTunnel(), OMX_StateExecuting, OMX_StateIdle, OMX_StateLoaded, OMX_TRUE, OMX_UseBuffer, OMX_BUFFERHEADERTYPE::pBuffer, setHeader(), SINK_NAME, appPrivateType::sinkEventSem, OMX_AUDIO_CONFIG_VOLUMETYPE::sVolume, tsem_down(), and tsem_init().


Variable Documentation

Definition at line 75 of file audio_effects/omxaudiomixertest.c.

Initial value:

 { 
                              .EventHandler    = audiosinkEventHandler,
                              .EmptyBufferDone = audiosinkEmptyBufferDone,
                              .FillBufferDone  = NULL
}

Definition at line 43 of file audio_effects/omxaudiomixertest.c.

Initial value:

 { .EventHandler = audiomixerEventHandler,
                               .EmptyBufferDone = audiomixerEmptyBufferDone,
                               .FillBufferDone = audiomixerFillBufferDone,
}

Definition at line 38 of file audio_effects/omxaudiomixertest.c.

Referenced by main().

int fd = 0

Definition at line 76 of file audio_effects/omxaudiomixertest.c.

int fd1 = 0

Definition at line 76 of file audio_effects/omxaudiomixertest.c.

Referenced by audiomixerEmptyBufferDone(), and main().

unsigned int filesize

unsigned int filesize1

Definition at line 77 of file audio_effects/omxaudiomixertest.c.

Referenced by audiomixerEmptyBufferDone(), and main().

Definition at line 85 of file audio_effects/omxaudiomixertest.c.

Definition at line 80 of file audio_effects/omxaudiomixertest.c.

int flagIsGain[4]

Definition at line 81 of file audio_effects/omxaudiomixertest.c.

Definition at line 78 of file audio_effects/omxaudiomixertest.c.

Definition at line 79 of file audio_effects/omxaudiomixertest.c.

Definition at line 82 of file audio_effects/omxaudiomixertest.c.

Definition at line 84 of file audio_effects/omxaudiomixertest.c.

Definition at line 83 of file audio_effects/omxaudiomixertest.c.

Definition at line 90 of file audio_effects/omxaudiomixertest.c.

Definition at line 90 of file audio_effects/omxaudiomixertest.c.

char* input_file[2]

Definition at line 86 of file audio_effects/omxaudiomixertest.c.

Definition at line 90 of file audio_effects/omxaudiomixertest.c.

FILE* outfile

Definition at line 88 of file audio_effects/omxaudiomixertest.c.

char * output_file

Definition at line 86 of file audio_effects/omxaudiomixertest.c.


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