omx_videosrc_component.c File Reference

#include <omxcore.h>
#include <omx_base_video_port.h>
#include <omx_videosrc_component.h>

Go to the source code of this file.

Defines

#define MAX_COMPONENT_VIDEOSRC   1
#define DEFAULT_FILENAME_LENGTH   256

Functions

OMX_ERRORTYPE omx_videosrc_component_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
OMX_ERRORTYPE omx_videosrc_component_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
OMX_ERRORTYPE omx_videosrc_component_Init (OMX_COMPONENTTYPE *openmaxStandComp)
OMX_ERRORTYPE omx_videosrc_component_Deinit (OMX_COMPONENTTYPE *openmaxStandComp)
void omx_videosrc_component_BufferMgmtCallback (OMX_COMPONENTTYPE *openmaxStandComp, OMX_BUFFERHEADERTYPE *pOutputBuffer)
OMX_ERRORTYPE omx_videosrc_component_SetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_IN OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_videosrc_component_GetParameter (OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nParamIndex, OMX_INOUT OMX_PTR ComponentParameterStructure)
OMX_ERRORTYPE omx_videosrc_component_MessageHandler (OMX_COMPONENTTYPE *openmaxStandComp, internalRequestMessageType *message)
OMX_ERRORTYPE videosrc_port_AllocateBuffer (omx_base_PortType *openmaxStandPort, OMX_BUFFERHEADERTYPE **pBuffer, OMX_U32 nPortIndex, OMX_PTR pAppPrivate, OMX_U32 nSizeBytes)
OMX_ERRORTYPE videosrc_port_FreeBuffer (omx_base_PortType *openmaxStandPort, OMX_U32 nPortIndex, OMX_BUFFERHEADERTYPE *pBuffer)
OMX_ERRORTYPE videosrc_port_AllocateTunnelBuffer (omx_base_PortType *openmaxStandPort, OMX_IN OMX_U32 nPortIndex, OMX_IN OMX_U32 nSizeBytes)
OMX_ERRORTYPE videosrc_port_FreeTunnelBuffer (omx_base_PortType *openmaxStandPort, OMX_U32 nPortIndex)


Detailed Description

OpenMAX video source component. This component is a video source component that captures video from the video camera.

Copyright (C) 2007 STMicroelectronics Copyright (C) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

$Date$ Revision $Rev$ Author $Author$

Definition in file omx_videosrc_component.c.


Define Documentation

#define DEFAULT_FILENAME_LENGTH   256

Definition at line 40 of file omx_videosrc_component.c.

#define MAX_COMPONENT_VIDEOSRC   1

Definition at line 35 of file omx_videosrc_component.c.

Referenced by omx_videosrc_component_Constructor().


Function Documentation

void omx_videosrc_component_BufferMgmtCallback ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_BUFFERHEADERTYPE pOutputBuffer 
)

This function processes the input file and returns packet by packet as an output data this packet is used in video decoder component for decoding

return the current output buffer

Definition at line 442 of file omx_videosrc_component.c.

References DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEBUG, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nOffset, OMX_FALSE, OMX_StateExecuting, OMX_BUFFERHEADERTYPE::pBuffer, OMX_COMPONENTTYPE::pComponentPrivate, and tsem_down().

Referenced by omx_videosrc_component_Constructor().

OMX_ERRORTYPE omx_videosrc_component_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

OMX_ERRORTYPE omx_videosrc_component_Deinit ( OMX_COMPONENTTYPE openmaxStandComp  ) 

The DeInitialization function

closing input file

Definition at line 426 of file omx_videosrc_component.c.

References DEB_LEV_FUNCTION_NAME, DEBUG, OMX_ErrorNone, OMX_FALSE, OMX_COMPONENTTYPE::pComponentPrivate, and tsem_reset().

Referenced by omx_videosrc_component_MessageHandler().

OMX_ERRORTYPE omx_videosrc_component_Destructor ( OMX_COMPONENTTYPE openmaxStandComp  ) 

OMX_ERRORTYPE omx_videosrc_component_GetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_INOUT OMX_PTR  ComponentParameterStructure 
)

OMX_ERRORTYPE omx_videosrc_component_Init ( OMX_COMPONENTTYPE openmaxStandComp  ) 

The Initialization function

Video Capability Query

The pointer memoryMap and the offsets within memoryBuffer.offsets combine to give us the address of each buffered frame. For example: Buffered Frame 0 is located at: memoryMap + memoryBuffer.offsets[0] Buffered Frame 1 is located at: memoryMap + memoryBuffer.offsets[1] Buffered Frame 2 is located at: memoryMap + memoryBuffer.offsets[2] etc... The number of buffered frames is stored in memoryBuffer.frames.

initialization for buff mgmt callback function

Definition at line 216 of file omx_videosrc_component.c.

References DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_PARAMS, DEBUG, OMX_VIDEO_PORTDEFINITIONTYPE::eColorFormat, OMX_PARAM_PORTDEFINITIONTYPE::format, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameHeight, OMX_VIDEO_PORTDEFINITIONTYPE::nFrameWidth, OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_COLOR_Format16bitRGB565, OMX_COLOR_Format24bitRGB888, OMX_COLOR_Format32bitARGB8888, OMX_COLOR_FormatYUV411Planar, OMX_COLOR_FormatYUV420Planar, OMX_COLOR_FormatYUV422Planar, OMX_ErrorNone, OMX_FALSE, OMX_TRUE, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_video_PortType::sPortParam, tsem_up(), and OMX_PARAM_PORTDEFINITIONTYPE::video.

Referenced by omx_videosrc_component_MessageHandler().

OMX_ERRORTYPE omx_videosrc_component_MessageHandler ( OMX_COMPONENTTYPE openmaxStandComp,
internalRequestMessageType message 
)

OMX_ERRORTYPE omx_videosrc_component_SetParameter ( OMX_IN OMX_HANDLETYPE  hComponent,
OMX_IN OMX_INDEXTYPE  nParamIndex,
OMX_IN OMX_PTR  ComponentParameterStructure 
)

OMX_ERRORTYPE videosrc_port_AllocateBuffer ( omx_base_PortType openmaxStandPort,
OMX_BUFFERHEADERTYPE **  pBuffer,
OMX_U32  nPortIndex,
OMX_PTR  pAppPrivate,
OMX_U32  nSizeBytes 
)

OMX_ERRORTYPE videosrc_port_AllocateTunnelBuffer ( omx_base_PortType openmaxStandPort,
OMX_IN OMX_U32  nPortIndex,
OMX_IN OMX_U32  nSizeBytes 
)

OMX_ERRORTYPE videosrc_port_FreeBuffer ( omx_base_PortType openmaxStandPort,
OMX_U32  nPortIndex,
OMX_BUFFERHEADERTYPE pBuffer 
)

OMX_ERRORTYPE videosrc_port_FreeTunnelBuffer ( omx_base_PortType openmaxStandPort,
OMX_U32  nPortIndex 
)


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