#include <omxcore.h>
#include <omx_base_source.h>
Go to the source code of this file.
Functions | |
OMX_ERRORTYPE | omx_base_source_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName) |
OMX_ERRORTYPE | omx_base_source_Destructor (OMX_COMPONENTTYPE *openmaxStandComp) |
void * | omx_base_source_BufferMgmtFunction (void *param) |
void * | omx_base_source_twoport_BufferMgmtFunction (void *param) |
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_base_source.c.
void* omx_base_source_BufferMgmtFunction | ( | void * | param | ) |
This is the central function for component processing. It is executed in a separate thread, is synchronized with semaphores at each port, those are released each time a new buffer is available on the given port.
Definition at line 73 of file omx_base_source.c.
References omx_base_component_PrivateType::callbackData, omx_base_component_PrivateType::callbacks, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, dequeue(), OMX_CALLBACKTYPE::EventHandler, OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_BUFFERFLAG_EOS, OMX_EventBufferFlag, OMX_EventMark, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_TransStateLoadedToIdle, OMX_TRUE, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, PORT_IS_BEING_FLUSHED, omx_base_component_PrivateType::ports, omx_base_PortType::ReturnBufferFunction, omx_base_component_PrivateType::state, omx_base_component_PrivateType::transientState, tsem_down(), and tsem_wait().
Referenced by omx_base_source_Constructor().
OMX_ERRORTYPE omx_base_source_Constructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp, | |
OMX_STRING | cComponentName | |||
) |
Base source contructor
Definition at line 35 of file omx_base_source.c.
References err, omx_base_component_Constructor(), omx_base_source_BufferMgmtFunction(), OMX_ErrorInsufficientResources, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.
Referenced by omx_alsasrc_component_Constructor(), omx_camera_source_component_Constructor(), omx_filereader_component_Constructor(), omx_parser3gp_component_Constructor(), and omx_videosrc_component_Constructor().
OMX_ERRORTYPE omx_base_source_Destructor | ( | OMX_COMPONENTTYPE * | openmaxStandComp | ) |
The base source destructor. It simply calls the base destructor
Definition at line 63 of file omx_base_source.c.
References omx_base_component_Destructor().
Referenced by omx_alsasrc_component_Destructor(), omx_camera_source_component_Destructor(), omx_filereader_component_Destructor(), omx_parser3gp_component_Destructor(), and omx_videosrc_component_Destructor().
void* omx_base_source_twoport_BufferMgmtFunction | ( | void * | param | ) |
This is the central function for buffer processing of a two port source component. It is executed in a separate thread, is synchronized with semaphores at each port, those are released each time a new buffer is available on the given port.
Definition at line 198 of file omx_base_source.c.
References omx_base_component_PrivateType::bStateSem, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, dequeue(), OMX_BUFFERHEADERTYPE::hMarkTargetComponent, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_BASE_SOURCE_OUTPUTPORT_INDEX, OMX_BASE_SOURCE_OUTPUTPORT_INDEX_1, OMX_BUFFERFLAG_EOS, OMX_EventBufferFlag, OMX_EventMark, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_TransStateLoadedToIdle, OMX_TRUE, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, OMX_BUFFERHEADERTYPE::pMarkData, PORT_IS_BEING_FLUSHED, omx_base_PortType::ReturnBufferFunction, tsem_down(), and tsem_wait().
Referenced by omx_parser3gp_component_Constructor().