omxaudiomixertest.h

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

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