OpenMAXBellagio 0.9.3
omxvolcontroltest.h
Go to the documentation of this file.
00001 
00027 #ifndef __OMXVOLCONTROLTEST_H__
00028 #define __OMXVOLCONTROLTEST_H__
00029 
00030 #include <stdio.h>
00031 #include <stdlib.h>
00032 #include <fcntl.h>
00033 #include <string.h>
00034 #include <pthread.h>
00035 #include <unistd.h>
00036 #include <sys/stat.h>
00037 
00038 #include <OMX_Core.h>
00039 #include <OMX_Component.h>
00040 #include <OMX_Types.h>
00041 #include <OMX_Audio.h>
00042 
00043 #include <tsemaphore.h>
00044 #include <user_debug_levels.h>
00045 
00047 #define VERSIONMAJOR    1
00048 #define VERSIONMINOR    1
00049 #define VERSIONREVISION 0
00050 #define VERSIONSTEP     0
00051 
00052 /* Application's private data */
00053 typedef struct appPrivateType{
00054   pthread_cond_t condition;
00055   pthread_mutex_t mutex;
00056   void* input_data;
00057   OMX_BUFFERHEADERTYPE* currentInputBuffer;
00058   tsem_t* eventSem;
00059   tsem_t* eofSem;
00060 }appPrivateType;
00061 
00062 /* Size of the buffers requested to the component */
00063 #define BUFFER_IN_SIZE 2*8192*2
00064 
00065 /* Callback prototypes */
00066 OMX_ERRORTYPE volcEventHandler(
00067   OMX_HANDLETYPE hComponent,
00068   OMX_PTR pAppData,
00069   OMX_EVENTTYPE eEvent,
00070   OMX_U32 Data1,
00071   OMX_U32 Data2,
00072   OMX_PTR pEventData);
00073 
00074 OMX_ERRORTYPE volcEmptyBufferDone(
00075   OMX_HANDLETYPE hComponent,
00076   OMX_PTR pAppData,
00077   OMX_BUFFERHEADERTYPE* pBuffer);
00078 
00079 OMX_ERRORTYPE volcFillBufferDone(
00080   OMX_HANDLETYPE hComponent,
00081   OMX_PTR pAppData,
00082   OMX_BUFFERHEADERTYPE* pBuffer);
00083 
00085 static int getFileSize(int fd);
00086 
00087 #endif