omx_videosrc_component.h

Go to the documentation of this file.
00001 
00031 #ifndef _OMX_VIDEOSRC_COMPONENT_H_
00032 #define _OMX_VIDEOSRC_COMPONENT_H_
00033 
00034 #include <OMX_Types.h>
00035 #include <OMX_Component.h>
00036 #include <OMX_Core.h>
00037 #include <OMX_Video.h>
00038 #include <pthread.h>
00039 #include <omx_base_source.h>
00040 #include <string.h>
00041 #include <linux/videodev.h>
00042 #include <sys/types.h>
00043 #include <sys/stat.h>
00044 #include <sys/ioctl.h>
00045 #include <sys/mman.h>
00046 #include <fcntl.h>
00047 #include <unistd.h>
00048 #include <errno.h>
00049 #include <sys/time.h>
00050 
00052 #define MAX_NUM_OF_videosrc_component_INSTANCES 1
00053 
00054 #define VIDEO_DEV_NAME "/dev/video"
00055 
00059 DERIVEDCLASS(omx_videosrc_component_PrivateType, omx_base_source_PrivateType)
00060 #define omx_videosrc_component_PrivateType_FIELDS omx_base_source_PrivateType_FIELDS \
00061 \
00062   tsem_t* videoSyncSem; \
00063  \
00064   OMX_BOOL videoReady;  \
00065  \
00066   OMX_BOOL bIsEOSSent;  \
00067  \
00068   OMX_S32 deviceHandle; \
00069  \
00070   struct video_capability capability; \
00071  \
00072   struct video_window captureWindow; \
00073  \
00074   struct video_picture imageProperties; \
00075  \
00076   struct video_mbuf memoryBuffer; \
00077  \
00078   char* memoryMap; \
00079  \
00080   struct video_mmap* mmaps; \
00081  \
00082   OMX_U32 iFrameIndex; \
00083  \
00084   OMX_U32 iFrameSize; \
00085  \
00086   OMX_BOOL bOutBufferMemoryMapped;
00087 ENDCLASS(omx_videosrc_component_PrivateType)
00088 
00089 /* Component private entry points declaration */
00090 OMX_ERRORTYPE omx_videosrc_component_Constructor(OMX_COMPONENTTYPE *openmaxStandComp,OMX_STRING cComponentName);
00091 OMX_ERRORTYPE omx_videosrc_component_Destructor(OMX_COMPONENTTYPE *openmaxStandComp);
00092 OMX_ERRORTYPE omx_videosrc_component_MessageHandler(OMX_COMPONENTTYPE*,internalRequestMessageType*);
00093 OMX_ERRORTYPE omx_videosrc_component_Init(OMX_COMPONENTTYPE *openmaxStandComp);
00094 OMX_ERRORTYPE omx_videosrc_component_Deinit(OMX_COMPONENTTYPE *openmaxStandComp);
00095 
00096 void omx_videosrc_component_BufferMgmtCallback(
00097   OMX_COMPONENTTYPE *openmaxStandComp,
00098   OMX_BUFFERHEADERTYPE* outputbuffer);
00099 
00100 OMX_ERRORTYPE omx_videosrc_component_GetParameter(
00101   OMX_IN  OMX_HANDLETYPE hComponent,
00102   OMX_IN  OMX_INDEXTYPE nParamIndex,
00103   OMX_INOUT OMX_PTR ComponentParameterStructure);
00104 
00105 OMX_ERRORTYPE omx_videosrc_component_SetParameter(
00106   OMX_IN  OMX_HANDLETYPE hComponent,
00107   OMX_IN  OMX_INDEXTYPE nParamIndex,
00108   OMX_IN  OMX_PTR ComponentParameterStructure);
00109 
00110 OMX_ERRORTYPE videosrc_port_AllocateBuffer(
00111   omx_base_PortType *openmaxStandPort,
00112   OMX_BUFFERHEADERTYPE** pBuffer,
00113   OMX_U32 nPortIndex,
00114   OMX_PTR pAppPrivate,
00115   OMX_U32 nSizeBytes);
00116 
00117 OMX_ERRORTYPE videosrc_port_FreeBuffer(
00118   omx_base_PortType *openmaxStandPort,
00119   OMX_U32 nPortIndex,
00120   OMX_BUFFERHEADERTYPE* pBuffer);
00121 
00122 OMX_ERRORTYPE videosrc_port_AllocateTunnelBuffer(
00123   omx_base_PortType *openmaxStandPort,
00124   OMX_IN OMX_U32 nPortIndex,
00125   OMX_IN OMX_U32 nSizeBytes);
00126 
00127 OMX_ERRORTYPE videosrc_port_FreeTunnelBuffer(
00128   omx_base_PortType *openmaxStandPort,
00129   OMX_U32 nPortIndex);
00130 
00131 #endif
00132 

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