#include "omxaudiodectest.h"
Go to the source code of this file.
#define AAC_TYPE_SEL 3 |
#define AUDIO_EFFECT "OMX.st.volume.component" |
#define BASE_ROLE "audio_decoder.ogg" |
Definition at line 40 of file omxaudiodectest.c.
#define COMPONENT_NAME_BASE "OMX.st.audio_decoder" |
Definition at line 39 of file omxaudiodectest.c.
#define COMPONENT_NAME_BASE_LEN 20 |
Definition at line 41 of file omxaudiodectest.c.
#define extradata_size 1024 |
Definition at line 45 of file omxaudiodectest.c.
Referenced by filereaderEventHandler(), and parser3gpEventHandler().
#define FILE_READER "OMX.st.audio_filereader" |
#define MP3_TYPE_SEL 1 |
#define SINK_NAME "OMX.st.alsa.alsasink" |
#define VORBIS_TYPE_SEL 2 |
OMX_ERRORTYPE audiodecEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 1234 of file omxaudiodectest.c.
OMX_ERRORTYPE audiodecEventHandler | ( | 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 Decoder
Definition at line 1075 of file omxaudiodectest.c.
OMX_ERRORTYPE audiodecFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 1301 of file omxaudiodectest.c.
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 | |||
) |
callback prototypes for audio sink
Definition at line 1504 of file omxaudiodectest.c.
Referenced by main().
void display_help | ( | ) |
function prototype declaration display general help
help display
Definition at line 96 of file omxaudiodectest.c.
OMX_ERRORTYPE filereaderEventHandler | ( | 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 | |||
) |
Definition at line 957 of file omxaudiodectest.c.
References appPrivateType::audiodechandle, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::eofSem, err, extradata_size, appPrivateType::filereaderEventSem, appPrivateType::filereaderhandle, flagUsingFFMpeg, OMX_BUFFERFLAG_EOS, OMX_CommandPortDisable, OMX_CommandPortEnable, OMX_CommandStateSet, OMX_ErrorNone, OMX_EventBufferFlag, OMX_EventCmdComplete, OMX_EventPortFormatDetected, OMX_EventPortSettingsChanged, OMX_GetConfig, OMX_GetExtensionIndex, OMX_SetConfig, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_StateWaitForResources, and tsem_up().
OMX_ERRORTYPE filereaderFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 1042 of file omxaudiodectest.c.
References appPrivateType::audiodechandle, DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, err, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERFLAG_EOS, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_TRUE, and OMX_BUFFERHEADERTYPE::pBuffer.
int main | ( | int | argc, | |
char ** | argv | |||
) |
initializing appPriv structure
initialising openmax
file reader component name -- gethandle
getting the handle of audio decoder
setting the input audio format in file reader
now set the filereader component to idle and executing state
allocation of file reader component's output buffers these two will be used as input buffers of the audio decoder component
the output buffers of file reader component will be used in the audio decoder component as input buffers
freeing all handles and deinit omx
Definition at line 273 of file omxaudiodectest.c.
References AAC_TYPE_SEL, AUDIO_EFFECT, appPrivateType::audiodechandle, appPrivateType::audiosinkhandle, BASE_ROLE, buffer_in_size, buffer_out_size, COMPONENT_NAME_BASE, COMPONENT_NAME_BASE_LEN, DEB_LEV_ERR, DEB_LEV_PARAMS, DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::decoderEventSem, DEFAULT_MESSAGES, display_help(), appPrivateType::eofSem, err, fd, FILE_READER, appPrivateType::filereaderEventSem, appPrivateType::filereaderhandle, flagDirect, flagInputReceived, flagIsGain, flagIsMadRequested, flagIsMadUsingFileReader, flagIsOutputExpected, flagOutputReceived, flagPlaybackOn, flagSetupTunnel, flagSingleOGGSelected, flagUsingFFMpeg, input_file, MP3_TYPE_SEL, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nOffset, OMX_BS32::nValue, OMX_AllocateBuffer, OMX_CommandStateSet, OMX_Deinit(), OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FillThisBuffer, OMX_FreeBuffer, OMX_FreeHandle(), OMX_GetConfig, OMX_GetExtensionIndex, OMX_GetHandle(), OMX_GetParameter, OMX_IndexConfigAudioVolume, OMX_Init(), OMX_MAX_STRINGNAME_SIZE, OMX_SendCommand, OMX_SetConfig, OMX_SetParameter, OMX_SetupTunnel(), OMX_StateExecuting, OMX_StateIdle, OMX_StateLoaded, OMX_UseBuffer, outfile, output_file, OMX_BUFFERHEADERTYPE::pBuffer, selectedType, tsem_t::semval, SINK_NAME, appPrivateType::sinkEventSem, OMX_AUDIO_CONFIG_VOLUMETYPE::sVolume, test_OMX_ComponentEnumByRole(), test_OMX_ComponentNameEnum(), test_OMX_RoleEnum(), test_OpenClose(), tsem_down(), tsem_init(), appPrivateType::volumeEventSem, appPrivateType::volumehandle, and VORBIS_TYPE_SEL.
OMX_ERRORTYPE test_OMX_ComponentEnumByRole | ( | OMX_STRING | role_name | ) |
Definition at line 183 of file omxaudiodectest.c.
References DEB_LEV_ERR, DEBUG, DEFAULT_MESSAGES, err, OMX_ErrorNone, OMX_GetComponentsOfRole(), and OMX_MAX_STRINGNAME_SIZE.
OMX_ERRORTYPE test_OMX_ComponentNameEnum | ( | ) |
Definition at line 114 of file omxaudiodectest.c.
References DEBUG, DEFAULT_MESSAGES, err, OMX_ComponentNameEnum(), OMX_ErrorNone, and OMX_MAX_STRINGNAME_SIZE.
OMX_ERRORTYPE test_OMX_RoleEnum | ( | OMX_STRING | component_name | ) |
Definition at line 137 of file omxaudiodectest.c.
References DEB_LEV_ERR, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, err, OMX_ErrorInvalidComponentName, OMX_ErrorNone, OMX_GetRolesOfComponent(), and OMX_MAX_STRINGNAME_SIZE.
OMX_ERRORTYPE test_OpenClose | ( | OMX_STRING | component_name | ) |
Definition at line 243 of file omxaudiodectest.c.
References appPrivateType::audiodechandle, DEB_LEV_ERR, DEBUG, DEFAULT_MESSAGES, err, OMX_ErrorNone, OMX_FreeHandle(), and OMX_GetHandle().
OMX_ERRORTYPE volumeEmptyBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
Definition at line 1405 of file omxaudiodectest.c.
References appPrivateType::audiodechandle, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_SIMPLE_SEQ, DEBUG, DEFAULT_MESSAGES, appPrivateType::eofSem, err, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_ErrorNone, OMX_FillThisBuffer, OMX_BUFFERHEADERTYPE::pBuffer, tsem_t::semval, and tsem_up().
OMX_ERRORTYPE volumeEventHandler | ( | 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 color converter
Definition at line 1351 of file omxaudiodectest.c.
References DEB_LEV_SIMPLE_SEQ, DEBUG, appPrivateType::eofSem, 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, tsem_up(), and appPrivateType::volumeEventSem.
OMX_ERRORTYPE volumeFillBufferDone | ( | OMX_OUT OMX_HANDLETYPE | hComponent, | |
OMX_OUT OMX_PTR | pAppData, | |||
OMX_OUT OMX_BUFFERHEADERTYPE * | pBuffer | |||
) |
if there is no sink component then write buffer content in output file, in non tunneled case else in non tunneled case, call the sink comp handle to process this buffer as its input buffer
Definition at line 1443 of file omxaudiodectest.c.
References appPrivateType::audiosinkhandle, DEB_LEV_ERR, DEB_LEV_FUNCTION_NAME, DEBUG, DEFAULT_MESSAGES, appPrivateType::eofSem, err, flagDirect, flagOutputReceived, flagPlaybackOn, flagSetupTunnel, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_EmptyThisBuffer, OMX_ErrorNone, OMX_FillThisBuffer, outfile, OMX_BUFFERHEADERTYPE::pBuffer, and tsem_up().
Definition at line 47 of file omxaudiodectest.c.
Initial value:
{ .EventHandler = audiodecEventHandler, .EmptyBufferDone = audiodecEmptyBufferDone, .FillBufferDone = audiodecFillBufferDone }
Definition at line 57 of file omxaudiodectest.c.
Initial value:
{ .EventHandler = audiosinkEventHandler, .EmptyBufferDone = audiosinkEmptyBufferDone, .FillBufferDone = NULL }
Definition at line 63 of file omxaudiodectest.c.
Referenced by main().
int buffer_in_size = 4096 |
Definition at line 53 of file omxaudiodectest.c.
Referenced by audiodecEmptyBufferDone(), main(), videodecEmptyBufferDone(), and videoencEmptyBufferDone().
int buffer_out_size = 2*8192 |
Definition at line 54 of file omxaudiodectest.c.
FILE* fd |
Definition at line 81 of file omxaudiodectest.c.
Referenced by audiodecEmptyBufferDone(), audiomixerEmptyBufferDone(), main(), videodecEmptyBufferDone(), and volcEmptyBufferDone().
Initial value:
{ .EventHandler = filereaderEventHandler, .EmptyBufferDone = NULL, .FillBufferDone = filereaderFillBufferDone }
Definition at line 69 of file omxaudiodectest.c.
int flagDirect |
Definition at line 267 of file omxaudiodectest.c.
Referenced by audiodecFillBufferDone(), main(), and volumeFillBufferDone().
int flagIsGain |
Definition at line 266 of file omxaudiodectest.c.
Referenced by audiodecEmptyBufferDone(), and main().
Definition at line 260 of file omxaudiodectest.c.
Definition at line 263 of file omxaudiodectest.c.
Referenced by audiodecFillBufferDone(), main(), and volumeFillBufferDone().
int flagPlaybackOn |
Definition at line 262 of file omxaudiodectest.c.
Referenced by audiodecEventHandler(), audiodecFillBufferDone(), audiomixerFillBufferDone(), main(), and volumeFillBufferDone().
int flagSetupTunnel |
Definition at line 261 of file omxaudiodectest.c.
int flagUsingFFMpeg |
Definition at line 269 of file omxaudiodectest.c.
Referenced by audiodecEmptyBufferDone(), filereaderEventHandler(), and main().
Definition at line 50 of file omxaudiodectest.c.
Definition at line 50 of file omxaudiodectest.c.
Definition at line 52 of file omxaudiodectest.c.
Definition at line 52 of file omxaudiodectest.c.
Definition at line 51 of file omxaudiodectest.c.
Definition at line 51 of file omxaudiodectest.c.
char* input_file |
Definition at line 50 of file omxaudiodectest.c.
Definition at line 50 of file omxaudiodectest.c.
Definition at line 49 of file omxaudiodectest.c.
Definition at line 49 of file omxaudiodectest.c.
Definition at line 51 of file omxaudiodectest.c.
Definition at line 51 of file omxaudiodectest.c.
FILE * outfile |
Definition at line 81 of file omxaudiodectest.c.
char * output_file |
Definition at line 82 of file omxaudiodectest.c.
int selectedType = 0 |
Initial value:
{ .EventHandler = volumeEventHandler, .EmptyBufferDone = volumeEmptyBufferDone, .FillBufferDone = volumeFillBufferDone }
Definition at line 75 of file omxaudiodectest.c.