omxaudiomixertest.h

Go to the documentation of this file.
00001 
00031 #ifndef __OMXAUDIOMIXERTEST_H__
00032 #define __OMXAUDIOMIXERTEST_H__
00033 
00034 #include <stdio.h>
00035 #include <stdlib.h>
00036 #include <fcntl.h>
00037 #include <string.h>
00038 #include <pthread.h>
00039 #include <unistd.h>
00040 #include <sys/stat.h>
00041 
00042 #include <OMX_Core.h>
00043 #include <OMX_Component.h>
00044 #include <OMX_Types.h>
00045 #include <OMX_Audio.h>
00046 
00047 #include <tsemaphore.h>
00048 #include <user_debug_levels.h>
00049 
00051 #define VERSIONMAJOR    1
00052 #define VERSIONMINOR    1
00053 #define VERSIONREVISION 0
00054 #define VERSIONSTEP     0
00055 
00056 /* Application's private data */
00057 typedef struct appPrivateType{
00058   pthread_cond_t condition;
00059   pthread_mutex_t mutex;
00060   void* input_data;
00061   OMX_BUFFERHEADERTYPE* currentInputBuffer;
00062   tsem_t* eventSem;
00063   tsem_t* eofSem;
00064   tsem_t* sinkEventSem;
00065   OMX_HANDLETYPE handle;
00066   OMX_HANDLETYPE audiosinkhandle;
00067 }appPrivateType;
00068 
00069 /* Size of the buffers requested to the component */
00070 #define BUFFER_IN_SIZE 16384
00071 
00072 /* Callback prototypes */
00073 OMX_ERRORTYPE audiomixerEventHandler(
00074   OMX_OUT OMX_HANDLETYPE hComponent,
00075   OMX_OUT OMX_PTR pAppData,
00076   OMX_OUT OMX_EVENTTYPE eEvent,
00077   OMX_OUT OMX_U32 Data1,
00078   OMX_OUT OMX_U32 Data2,
00079   OMX_IN OMX_PTR pEventData);
00080 
00081 OMX_ERRORTYPE audiomixerEmptyBufferDone(
00082   OMX_OUT OMX_HANDLETYPE hComponent,
00083   OMX_OUT OMX_PTR pAppData,
00084   OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
00085 
00086 OMX_ERRORTYPE audiomixerFillBufferDone(
00087   OMX_OUT OMX_HANDLETYPE hComponent,
00088   OMX_OUT OMX_PTR pAppData,
00089   OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
00090 
00091 OMX_ERRORTYPE audiosinkEventHandler(
00092   OMX_OUT OMX_HANDLETYPE hComponent,
00093   OMX_OUT OMX_PTR pAppData,
00094   OMX_OUT OMX_EVENTTYPE eEvent,
00095   OMX_OUT OMX_U32 Data1,
00096   OMX_OUT OMX_U32 Data2,
00097   OMX_OUT OMX_PTR pEventData);
00098 
00099 OMX_ERRORTYPE audiosinkEmptyBufferDone(
00100   OMX_OUT OMX_HANDLETYPE hComponent,
00101   OMX_OUT OMX_PTR pAppData,
00102   OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer);
00103 
00105 static int getFileSize(int fd);
00106 
00107 #endif

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