<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Yate: FormatRepository Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespaceTelEngine.html">TelEngine</a>::<a class="el" href="classTelEngine_1_1FormatRepository.html">FormatRepository</a> </div> </div> <div class="contents"> <h1>FormatRepository Class Reference</h1><!-- doxytag: class="TelEngine::FormatRepository" -->A repository for media formats. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="yatephone_8h-source.html">yatephone.h</a>></code> <p> <p> <a href="classTelEngine_1_1FormatRepository-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1FormatRepository.html#a836b590d55646c6590cfd3aa3e9829e">getFormat</a> (const <a class="el" href="classTelEngine_1_1String.html">String</a> &name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1FormatRepository.html#08c7b193280176ee2646eac29752c3da">addFormat</a> (const <a class="el" href="classTelEngine_1_1String.html">String</a> &name, int fsize, int ftime, const <a class="el" href="classTelEngine_1_1String.html">String</a> &type="audio", int srate=8000, int nchan=1)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A repository for media formats. <p> This is just a holder for the list of media formats supported by Yate <hr><h2>Member Function Documentation</h2> <a class="anchor" name="08c7b193280176ee2646eac29752c3da"></a><!-- doxytag: member="TelEngine::FormatRepository::addFormat" ref="08c7b193280176ee2646eac29752c3da" args="(const String &name, int fsize, int ftime, const String &type="audio", int srate=8000, int nchan=1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a>* addFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>fsize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>ftime</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td> <td class="paramname"> <em>type</em> = <code>"audio"</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>srate</em> = <code>8000</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>nchan</em> = <code>1</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add a new format to the repository <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>Standard no-blanks lowercase format name </td></tr> <tr><td valign="top"></td><td valign="top"><em>fsize</em> </td><td>Data frame size in octets/frame, 0 for non-framed formats </td></tr> <tr><td valign="top"></td><td valign="top"><em>ftime</em> </td><td>Data frame duration in microseconds, 0 for variable </td></tr> <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>Format type: "audio", "video", "text" </td></tr> <tr><td valign="top"></td><td valign="top"><em>srate</em> </td><td>Rate in samples/second (audio) or 1e-6 frames/second (video), 0 for unknown </td></tr> <tr><td valign="top"></td><td valign="top"><em>nchan</em> </td><td>Number of channels, typically 1 </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the format info or NULL if another incompatible format with the same name was already registered </dd></dl> </div> </div><p> <a class="anchor" name="a836b590d55646c6590cfd3aa3e9829e"></a><!-- doxytag: member="TelEngine::FormatRepository::getFormat" ref="a836b590d55646c6590cfd3aa3e9829e" args="(const String &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a>* getFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td> <td class="paramname"> <em>name</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrieve a format by name and type <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>Standard name of the format to find </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the format info or NULL if not found </dd></dl> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="yatephone_8h-source.html">yatephone.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Dec 7 21:36:12 2008 for Yate by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address> </body> </html>