#include "omxaudiomixertest.h"
#include "ctype.h"
Go to the source code of this 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
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 BUFFER_COUNT_ACTUAL 2 |
#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.
OMX_ERRORTYPE audiomixerEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
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 audiomixerFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
OMX_ERRORTYPE audiosinkEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 842 of file audio_effects/omxaudiomixertest.c.
References DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_PARAMS, DEBUG, DEFAULT_MESSAGES, appPrivateType::eofSem, err, appPrivateType::handle, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_ErrorNone, OMX_FillThisBuffer, OMX_BUFFERHEADERTYPE::pBuffer, and tsem_up().
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 | |||
) |
callback prototypes for audio sink
Definition at line 797 of file audio_effects/omxaudiomixertest.c.
References DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, appPrivateType::sinkEventSem, and tsem_up().
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().
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 |
Definition at line 77 of file audio_effects/omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), main(), and volcEmptyBufferDone().
unsigned int filesize1 |
Definition at line 77 of file audio_effects/omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), and main().
int flagChannel |
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.
int flagPlaybackOn |
Definition at line 82 of file audio_effects/omxaudiomixertest.c.
int flagSampleRate |
Definition at line 84 of file audio_effects/omxaudiomixertest.c.
int flagSetupTunnel |
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.