<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.8"/> <title>OpenMAXBellagio: omx_base_source.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">OpenMAXBellagio  <span id="projectnumber">0.9.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('omx__base__source_8c.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">omx_base_source.c File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="omxcore_8h_source.html">omxcore.h</a>></code><br /> <code>#include <<a class="el" href="omx__base__source_8h_source.html">omx_base_source.h</a>></code><br /> </div> <p><a href="omx__base__source_8c_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a88b86cbcfe6dac3c0ee4b926c7bfd8ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_o_m_x___core_8h.html#a4e2923ea92fd56f5bd9783a6dac7629a">OMX_ERRORTYPE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="omx__base__source_8c.html#a88b86cbcfe6dac3c0ee4b926c7bfd8ee">omx_base_source_Constructor</a> (<a class="el" href="struct_o_m_x___c_o_m_p_o_n_e_n_t_t_y_p_e.html">OMX_COMPONENTTYPE</a> *openmaxStandComp, <a class="el" href="_o_m_x___types_8h.html#a35830b439b00948006e5ef824fef715f">OMX_STRING</a> cComponentName)</td></tr> <tr class="separator:a88b86cbcfe6dac3c0ee4b926c7bfd8ee"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae0bda98afec0d9c2d21f381954869372"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_o_m_x___core_8h.html#a4e2923ea92fd56f5bd9783a6dac7629a">OMX_ERRORTYPE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="omx__base__source_8c.html#ae0bda98afec0d9c2d21f381954869372">omx_base_source_Destructor</a> (<a class="el" href="struct_o_m_x___c_o_m_p_o_n_e_n_t_t_y_p_e.html">OMX_COMPONENTTYPE</a> *openmaxStandComp)</td></tr> <tr class="separator:ae0bda98afec0d9c2d21f381954869372"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0d19094fdb888620ea755e308dad59c1"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="omx__base__source_8c.html#a0d19094fdb888620ea755e308dad59c1">omx_base_source_BufferMgmtFunction</a> (void *param)</td></tr> <tr class="separator:a0d19094fdb888620ea755e308dad59c1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4fe4d63021b431d30bc883acbf05118b"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="omx__base__source_8c.html#a4fe4d63021b431d30bc883acbf05118b">omx_base_source_twoport_BufferMgmtFunction</a> (void *param)</td></tr> <tr class="separator:a4fe4d63021b431d30bc883acbf05118b"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="a0d19094fdb888620ea755e308dad59c1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* omx_base_source_BufferMgmtFunction </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"><em>param</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>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. </p> <p>Definition at line <a class="el" href="omx__base__source_8c_source.html#l00068">68</a> of file <a class="el" href="omx__base__source_8c_source.html">omx_base_source.c</a>.</p> <p>References <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::callbackData</a>, <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::callbacks</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00039">DEB_LEV_ERR</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00054">DEB_LEV_FULL_SEQ</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00059">DEB_LEV_FUNCTION_NAME</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00048">DEB_LEV_SIMPLE_SEQ</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00077">DEBUG</a>, <a class="el" href="queue_8c_source.html#l00122">dequeue()</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00530">OMX_CALLBACKTYPE::EventHandler</a>, <a class="el" href="omx__base__source_8h_source.html#l00038">OMX_BASE_SOURCE_OUTPUTPORT_INDEX</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00299">OMX_BUFFERFLAG_EOS</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00485">OMX_EventBufferFlag</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00483">OMX_EventMark</a>, <a class="el" href="_o_m_x___types_8h_source.html#l00190">OMX_FALSE</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00105">OMX_StateExecuting</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00102">OMX_StateIdle</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00094">OMX_StateInvalid</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00097">OMX_StateLoaded</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00107">OMX_StatePause</a>, <a class="el" href="omx__base__component_8h_source.html#l00088">OMX_TransStateLoadedToIdle</a>, <a class="el" href="_o_m_x___types_8h_source.html#l00191">OMX_TRUE</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::pBufferQueue</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::pBufferSem</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00326">OMX_COMPONENTTYPE::pComponentPrivate</a>, <a class="el" href="omx__base__port_8h_source.html#l00039">PORT_IS_BEING_FLUSHED</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::ReturnBufferFunction</a>, <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::state</a>, <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::transientState</a>, <a class="el" href="tsemaphore_8c_source.html#l00097">tsem_down()</a>, <a class="el" href="tsemaphore_8c_source.html#l00110">tsem_up()</a>, and <a class="el" href="tsemaphore_8c_source.html#l00131">tsem_wait()</a>.</p> <p>Referenced by <a class="el" href="omx__base__source_8c_source.html#l00032">omx_base_source_Constructor()</a>.</p> </div> </div> <a class="anchor" id="a88b86cbcfe6dac3c0ee4b926c7bfd8ee"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="_o_m_x___core_8h.html#a4e2923ea92fd56f5bd9783a6dac7629a">OMX_ERRORTYPE</a> omx_base_source_Constructor </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_m_x___c_o_m_p_o_n_e_n_t_t_y_p_e.html">OMX_COMPONENTTYPE</a> * </td> <td class="paramname"><em>openmaxStandComp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="_o_m_x___types_8h.html#a35830b439b00948006e5ef824fef715f">OMX_STRING</a> </td> <td class="paramname"><em>cComponentName</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p><a class="el" href="omx__base__source_8c.html">src/base/omx_base_source.c</a></p> <p>OpenMAX base source component. This component does not perform any multimedia processing. It derives from base component and contains a single output port. This class can also be used for a two port source component It can be used as base class for source components.</p> <p>Copyright (C) 2007-2009 STMicroelectronics Copyright (C) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).</p> <p>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.</p> <p>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.</p> <p>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 </p> <p>Definition at line <a class="el" href="omx__base__source_8c_source.html#l00032">32</a> of file <a class="el" href="omx__base__source_8c_source.html">omx_base_source.c</a>.</p> <p>References <a class="el" href="omx__base__source_8h_source.html#l00054">omx_base_source_PrivateType::BufferMgmtFunction</a>, <a class="el" href="omxvolcontroltest_8c_source.html#l00034">err</a>, <a class="el" href="omx__base__component_8c_source.html#l00095">omx_base_component_Constructor()</a>, <a class="el" href="omx__base__source_8c_source.html#l00068">omx_base_source_BufferMgmtFunction()</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00131">OMX_ErrorInsufficientResources</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00128">OMX_ErrorNone</a>, and <a class="el" href="_o_m_x___component_8h_source.html#l00326">OMX_COMPONENTTYPE::pComponentPrivate</a>.</p> <p>Referenced by <a class="el" href="omx__clocksrc__component_8c_source.html#l00035">omx_clocksrc_component_Constructor()</a>.</p> </div> </div> <a class="anchor" id="ae0bda98afec0d9c2d21f381954869372"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="_o_m_x___core_8h.html#a4e2923ea92fd56f5bd9783a6dac7629a">OMX_ERRORTYPE</a> omx_base_source_Destructor </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_o_m_x___c_o_m_p_o_n_e_n_t_t_y_p_e.html">OMX_COMPONENTTYPE</a> * </td> <td class="paramname"><em>openmaxStandComp</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>The base source destructor. It simply calls the base destructor </p> <p>Definition at line <a class="el" href="omx__base__source_8c_source.html#l00058">58</a> of file <a class="el" href="omx__base__source_8c_source.html">omx_base_source.c</a>.</p> <p>References <a class="el" href="omx__base__component_8c_source.html#l00271">omx_base_component_Destructor()</a>.</p> <p>Referenced by <a class="el" href="omx__clocksrc__component_8c_source.html#l00121">omx_clocksrc_component_Destructor()</a>.</p> </div> </div> <a class="anchor" id="a4fe4d63021b431d30bc883acbf05118b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* omx_base_source_twoport_BufferMgmtFunction </td> <td>(</td> <td class="paramtype">void * </td> <td class="paramname"><em>param</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>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. </p> <p>Definition at line <a class="el" href="omx__base__source_8c_source.html#l00211">211</a> of file <a class="el" href="omx__base__source_8c_source.html">omx_base_source.c</a>.</p> <p>References <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::bStateSem</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00039">DEB_LEV_ERR</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00054">DEB_LEV_FULL_SEQ</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00059">DEB_LEV_FUNCTION_NAME</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00048">DEB_LEV_SIMPLE_SEQ</a>, <a class="el" href="omx__comp__debug__levels_8h_source.html#l00077">DEBUG</a>, <a class="el" href="queue_8c_source.html#l00122">dequeue()</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00417">OMX_BUFFERHEADERTYPE::hMarkTargetComponent</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00405">OMX_BUFFERHEADERTYPE::nFilledLen</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00438">OMX_BUFFERHEADERTYPE::nFlags</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00474">OMX_PORT_PARAM_TYPE::nPorts</a>, <a class="el" href="omx__base__source_8h_source.html#l00038">OMX_BASE_SOURCE_OUTPUTPORT_INDEX</a>, <a class="el" href="omx__base__source_8h_source.html#l00042">OMX_BASE_SOURCE_OUTPUTPORT_INDEX_1</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00299">OMX_BUFFERFLAG_EOS</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00485">OMX_EventBufferFlag</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00483">OMX_EventMark</a>, <a class="el" href="_o_m_x___types_8h_source.html#l00190">OMX_FALSE</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00051">OMX_PortDomainAudio</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00053">OMX_PortDomainImage</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00054">OMX_PortDomainOther</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00052">OMX_PortDomainVideo</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00105">OMX_StateExecuting</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00102">OMX_StateIdle</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00094">OMX_StateInvalid</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00097">OMX_StateLoaded</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00107">OMX_StatePause</a>, <a class="el" href="omx__base__component_8h_source.html#l00088">OMX_TransStateLoadedToIdle</a>, <a class="el" href="_o_m_x___types_8h_source.html#l00191">OMX_TRUE</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::pBufferQueue</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::pBufferSem</a>, <a class="el" href="_o_m_x___component_8h_source.html#l00326">OMX_COMPONENTTYPE::pComponentPrivate</a>, <a class="el" href="_o_m_x___core_8h_source.html#l00419">OMX_BUFFERHEADERTYPE::pMarkData</a>, <a class="el" href="omx__base__port_8h_source.html#l00039">PORT_IS_BEING_FLUSHED</a>, <a class="el" href="omx__base__port_8h_source.html#l00142">omx_base_PortType::ReturnBufferFunction</a>, <a class="el" href="omx__base__component_8h_source.html#l00164">omx_base_component_PrivateType::sPortTypesParam</a>, <a class="el" href="tsemaphore_8c_source.html#l00097">tsem_down()</a>, <a class="el" href="tsemaphore_8c_source.html#l00110">tsem_up()</a>, and <a class="el" href="tsemaphore_8c_source.html#l00131">tsem_wait()</a>.</p> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <html> <body> <hr size="1"><small>Generated for OpenMAX Bellagio rel. 0.9.3 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small> <br> <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=160680&type=4" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a> </body> </html>