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