OpenMAX Bellagio 0.9.3
omx_base_sink.h File Reference
#include <OMX_Types.h>
#include <OMX_Component.h>
#include <OMX_Core.h>
#include "omx_base_component.h"

Go to the source code of this file.

Data Structures

struct  omx_base_sink_PrivateType
 

Macros

#define OMX_BASE_SINK_INPUTPORT_INDEX   0 /* The index of the input port for the derived components */
 
#define OMX_BASE_SINK_CLOCKPORT_INDEX   1 /* The index of the clock port for the derived components */
 
#define OMX_BASE_SINK_INPUTPORT_INDEX_1   1 /* The index of the 2nd input port for the derived components */
 
#define OMX_BASE_SINK_ALLPORT_INDEX   -1
 
#define omx_base_sink_PrivateType_FIELDS
 

Typedefs

typedef struct omx_base_sink_PrivateType omx_base_sink_PrivateType
 

Functions

OMX_ERRORTYPE omx_base_sink_Constructor (OMX_COMPONENTTYPE *openmaxStandComp, OMX_STRING cComponentName)
 
OMX_ERRORTYPE omx_base_sink_Destructor (OMX_COMPONENTTYPE *openmaxStandComp)
 
void * omx_base_sink_BufferMgmtFunction (void *param)
 
void * omx_base_sink_twoport_BufferMgmtFunction (void *param)
 

Macro Definition Documentation

◆ OMX_BASE_SINK_ALLPORT_INDEX

#define OMX_BASE_SINK_ALLPORT_INDEX   -1

OMX_BASE_SINK_ALLPORT_INDEX as the standard specifies, the -1 value for port index is used to point to all the ports

Definition at line 42 of file omx_base_sink.h.

◆ OMX_BASE_SINK_CLOCKPORT_INDEX

#define OMX_BASE_SINK_CLOCKPORT_INDEX   1 /* The index of the clock port for the derived components */

Definition at line 37 of file omx_base_sink.h.

◆ OMX_BASE_SINK_INPUTPORT_INDEX

#define OMX_BASE_SINK_INPUTPORT_INDEX   0 /* The index of the input port for the derived components */

src/base/omx_base_sink.h

OpenMAX base sink component. This component does not perform any multimedia processing. It derives from base component and contains a single port. It can be used as base class for sink components.

Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-2009 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

Definition at line 36 of file omx_base_sink.h.

◆ OMX_BASE_SINK_INPUTPORT_INDEX_1

#define OMX_BASE_SINK_INPUTPORT_INDEX_1   1 /* The index of the 2nd input port for the derived components */

Definition at line 38 of file omx_base_sink.h.

◆ omx_base_sink_PrivateType_FIELDS

#define omx_base_sink_PrivateType_FIELDS
Value:
\
void (*BufferMgmtCallback)(OMX_COMPONENTTYPE* openmaxStandComp, OMX_BUFFERHEADERTYPE* inputbuffer);
#define omx_base_component_PrivateType_FIELDS

Definition at line 47 of file omx_base_sink.h.

Typedef Documentation

◆ omx_base_sink_PrivateType

base sink component private structure.

Definition at line 46 of file omx_base_sink.h.

Function Documentation

◆ omx_base_sink_BufferMgmtFunction()

void * omx_base_sink_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 67 of file omx_base_sink.c.

References omx_base_sink_PrivateType::bellagioThreads, omx_base_sink_PrivateType::bMgmtSem, omx_base_sink_PrivateType::bStateSem, omx_base_sink_PrivateType::BufferMgmtCallback, 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_sink_PrivateType::flush_all_condition, omx_base_sink_PrivateType::flush_condition, omx_base_sink_PrivateType::flush_mutex, OMX_BUFFERHEADERTYPE::hMarkTargetComponent, queue_t::nelem, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_PARAM_BELLAGIOTHREADS_ID::nThreadBufferMngtID, OMX_BASE_SINK_INPUTPORT_INDEX, OMX_BUFFERFLAG_EOS, OMX_EventBufferFlag, OMX_EventMark, OMX_FALSE, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_TransStateExecutingToIdle, OMX_TransStateLoadedToIdle, OMX_TransStatePauseToIdle, OMX_TRUE, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, OMX_BUFFERHEADERTYPE::pMarkData, PORT_IS_BEING_FLUSHED, omx_base_sink_PrivateType::ports, omx_base_PortType::ReturnBufferFunction, tsem_t::semval, omx_base_component_PrivateType::state, omx_base_sink_PrivateType::state, stateName(), omx_base_component_PrivateType::transientState, transientStateName(), tsem_down(), tsem_up(), and tsem_wait().

Referenced by omx_base_sink_Constructor().

◆ omx_base_sink_Constructor()

OMX_ERRORTYPE omx_base_sink_Constructor ( OMX_COMPONENTTYPE openmaxStandComp,
OMX_STRING  cComponentName 
)

Base sink contructor

src/base/omx_base_sink.c

OpenMAX base sink component. This component does not perform any multimedia processing. It derives from base component and contains a single input port. It can be used as base class for sink components.

Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-2009 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

Definition at line 31 of file omx_base_sink.c.

References omx_base_sink_PrivateType::BufferMgmtFunction, err, omx_base_component_Constructor(), omx_base_sink_BufferMgmtFunction(), OMX_ErrorInsufficientResources, OMX_ErrorNone, and OMX_COMPONENTTYPE::pComponentPrivate.

◆ omx_base_sink_Destructor()

OMX_ERRORTYPE omx_base_sink_Destructor ( OMX_COMPONENTTYPE openmaxStandComp)

The base sink destructor. It simply calls the base destructor

Definition at line 57 of file omx_base_sink.c.

References omx_base_component_Destructor().

◆ omx_base_sink_twoport_BufferMgmtFunction()

void * omx_base_sink_twoport_BufferMgmtFunction ( void *  param)

This is the central function for buffer processing of a two port sink 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 208 of file omx_base_sink.c.

References omx_base_sink_PrivateType::bMgmtSem, omx_base_component_PrivateType::bStateSem, omx_base_sink_PrivateType::BufferMgmtCallback, omx_base_sink_PrivateType::callbackData, omx_base_sink_PrivateType::callbacks, DEB_LEV_ERR, DEB_LEV_FULL_SEQ, DEB_LEV_FUNCTION_NAME, DEB_LEV_SIMPLE_SEQ, DEBUG, dequeue(), OMX_PARAM_PORTDEFINITIONTYPE::eDomain, OMX_CALLBACKTYPE::EventHandler, omx_base_sink_PrivateType::flush_all_condition, omx_base_sink_PrivateType::flush_condition, omx_base_sink_PrivateType::flush_mutex, OMX_BUFFERHEADERTYPE::hMarkTargetComponent, OMX_MARKTYPE::hMarkTargetComponent, OMX_BUFFERHEADERTYPE::nFilledLen, OMX_BUFFERHEADERTYPE::nFlags, OMX_PORT_PARAM_TYPE::nPorts, OMX_BASE_SINK_INPUTPORT_INDEX, OMX_BASE_SINK_INPUTPORT_INDEX_1, OMX_BUFFERFLAG_EOS, OMX_EventBufferFlag, OMX_EventMark, OMX_FALSE, OMX_PortDomainAudio, OMX_PortDomainImage, OMX_PortDomainOther, OMX_PortDomainVideo, OMX_StateExecuting, OMX_StateIdle, OMX_StateInvalid, OMX_StateLoaded, OMX_StatePause, OMX_TransStateExecutingToIdle, OMX_TransStateLoadedToIdle, OMX_TransStatePauseToIdle, OMX_TRUE, omx_base_PortType::pBufferQueue, omx_base_PortType::pBufferSem, OMX_COMPONENTTYPE::pComponentPrivate, omx_base_sink_PrivateType::pMark, OMX_BUFFERHEADERTYPE::pMarkData, OMX_MARKTYPE::pMarkData, PORT_IS_BEING_FLUSHED, omx_base_sink_PrivateType::ports, omx_base_PortType::ReturnBufferFunction, omx_base_PortType::sPortParam, omx_base_component_PrivateType::sPortTypesParam, omx_base_sink_PrivateType::state, omx_base_component_PrivateType::transientState, omx_base_sink_PrivateType::transientState, tsem_down(), tsem_up(), and tsem_wait().


Generated for OpenMAX Bellagio rel. 0.9.3 by  doxygen 1.5.1
SourceForge.net Logo