OpenMAX Bellagio 0.9.3
|
#include "omxaudiomixertest.h"
Go to the source code of this file.
Macros | |
#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_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, OMX_U32 Data1, OMX_U32 Data2, OMX_PTR pEventData) |
OMX_ERRORTYPE | audiomixerEmptyBufferDone (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_BUFFERHEADERTYPE *pBuffer) |
OMX_ERRORTYPE | audiomixerFillBufferDone (OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_BUFFERHEADERTYPE *pBuffer) |
Variables | |
OMX_CALLBACKTYPE | callbacks |
appPrivateType * | appPriv |
int | fd [4] |
unsigned int | filesize [4] |
int | flagIsOutputExpected |
int | flagOutputReceived |
int | flagInputReceived |
int | flagIsGain [4] |
int | flagSampleRate |
int | flagChannel |
char * | input_file [4] |
char * | output_file |
OMX_BOOL | bEOS [4] |
FILE * | outfile |
OMX_BUFFERHEADERTYPE * | inBuffer [8] |
OMX_BUFFERHEADERTYPE * | outBuffer [2] |
OMX_BUFFERHEADERTYPE * | inBufferSink [2] |
#define BUFFER_COUNT_ACTUAL 2 |
test/components/audio_effects/omxaudiomixertest.c
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-2009 STMicroelectronics Copyright (C) 2008-2009 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
Definition at line 30 of file omxaudiomixertest.c.
Referenced by main().
#define FRAME_SIZE 1152*2*2 |
Definition at line 31 of file omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), and main().
OMX_ERRORTYPE audiomixerEmptyBufferDone | ( | OMX_HANDLETYPE | hComponent, |
OMX_PTR | pAppData, | ||
OMX_BUFFERHEADERTYPE * | pBuffer ) |
Definition at line 504 of file omxaudiomixertest.c.
References bEOS, DEB_LEV_FULL_SEQ, DEB_LEV_SIMPLE_SEQ, DEBUG, err, fd, filesize, FRAME_SIZE, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BUFFERHEADERTYPE::nInputPortIndex, OMX_BUFFERHEADERTYPE::nOffset, OMX_BUFFERFLAG_EOS, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FALSE, OMX_TRUE, and OMX_BUFFERHEADERTYPE::pBuffer.
OMX_ERRORTYPE audiomixerEventHandler | ( | OMX_HANDLETYPE | hComponent, |
OMX_PTR | pAppData, | ||
OMX_EVENTTYPE | eEvent, | ||
OMX_U32 | Data1, | ||
OMX_U32 | Data2, | ||
OMX_PTR | pEventData ) |
Definition at line 453 of file omxaudiomixertest.c.
References appPriv, DEB_LEV_SIMPLE_SEQ, DEBUG, OMX_BUFFERFLAG_EOS, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventBufferFlag, OMX_EventCmdComplete, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, and tsem_up().
OMX_ERRORTYPE audiomixerFillBufferDone | ( | OMX_HANDLETYPE | hComponent, |
OMX_PTR | pAppData, | ||
OMX_BUFFERHEADERTYPE * | pBuffer ) |
Definition at line 552 of file omxaudiomixertest.c.
References bEOS, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEBUG, err, flagOutputReceived, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_ErrorNone, OMX_FillThisBuffer, outfile, and OMX_BUFFERHEADERTYPE::pBuffer.
void display_help | ( | ) |
Definition at line 48 of file omxaudiomixertest.c.
Referenced by main().
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 80 of file omxaudiomixertest.c.
References appPriv, bEOS, BUFFER_COUNT_ACTUAL, BUFFER_IN_SIZE, callbacks, DEB_LEV_ERR, DEBUG, DEFAULT_MESSAGES, display_help(), err, fd, filesize, flagChannel, flagInputReceived, flagIsGain, flagIsOutputExpected, flagOutputReceived, flagSampleRate, FRAME_SIZE, inBuffer, input_file, OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountActual, OMX_AUDIO_CONFIG_VOLUMETYPE::nPortIndex, OMX_PARAM_PORTDEFINITIONTYPE::nPortIndex, OMX_PORT_PARAM_TYPE::nPorts, 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_IndexParamPortDefinition, OMX_Init(), OMX_SendCommand, OMX_SetConfig, OMX_SetParameter, OMX_StateExecuting, OMX_StateIdle, OMX_StateLoaded, OMX_TRUE, outBuffer, outfile, output_file, setHeader(), OMX_AUDIO_CONFIG_VOLUMETYPE::sVolume, tsem_down(), and tsem_init().
appPrivateType* appPriv |
Definition at line 63 of file omxaudiomixertest.c.
Referenced by audiomixerEventHandler(), main(), volcEmptyBufferDone(), and volcEventHandler().
OMX_BOOL bEOS[4] |
Definition at line 73 of file omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), audiomixerFillBufferDone(), main(), volcEmptyBufferDone(), and volcFillBufferDone().
OMX_CALLBACKTYPE callbacks |
Definition at line 33 of file omxaudiomixertest.c.
Referenced by main().
int fd[4] |
Definition at line 64 of file omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), audiosinkEmptyBufferDone(), main(), and volcEmptyBufferDone().
unsigned int filesize[4] |
Definition at line 65 of file omxaudiomixertest.c.
Referenced by audiomixerEmptyBufferDone(), main(), and volcEmptyBufferDone().
int flagChannel |
Definition at line 71 of file omxaudiomixertest.c.
Referenced by main().
int flagInputReceived |
Definition at line 68 of file omxaudiomixertest.c.
Referenced by main().
int flagIsGain[4] |
Definition at line 69 of file omxaudiomixertest.c.
Referenced by main().
int flagIsOutputExpected |
Definition at line 66 of file omxaudiomixertest.c.
Referenced by main().
int flagOutputReceived |
Definition at line 67 of file omxaudiomixertest.c.
Referenced by audiomixerFillBufferDone(), main(), and volcFillBufferDone().
int flagSampleRate |
Definition at line 70 of file omxaudiomixertest.c.
Referenced by main().
OMX_BUFFERHEADERTYPE* inBuffer[8] |
Definition at line 76 of file omxaudiomixertest.c.
Referenced by main().
OMX_BUFFERHEADERTYPE * inBufferSink[2] |
Definition at line 76 of file omxaudiomixertest.c.
char* input_file[4] |
Definition at line 72 of file omxaudiomixertest.c.
Referenced by main().
OMX_BUFFERHEADERTYPE * outBuffer[2] |
Definition at line 76 of file omxaudiomixertest.c.
Referenced by main().
FILE* outfile |
Definition at line 74 of file omxaudiomixertest.c.
Referenced by audiomixerFillBufferDone(), main(), and volcFillBufferDone().
char * output_file |
Definition at line 72 of file omxaudiomixertest.c.
Referenced by main().