<!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: DataFormat 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_1DataFormat.html">DataFormat</a> </div> </div> <div class="contents"> <h1>DataFormat Class Reference</h1><!-- doxytag: class="TelEngine::DataFormat" --><!-- doxytag: inherits="TelEngine::String" -->A Data format. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="yatephone_8h-source.html">yatephone.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for DataFormat:</div> <div class="dynsection"> <p><center><img src="classTelEngine_1_1DataFormat.png" usemap="#DataFormat_map" border="0" alt=""></center> <map name="DataFormat_map"> <area href="classTelEngine_1_1String.html" alt="String" shape="rect" coords="0,56,77,80"> <area href="classTelEngine_1_1GenObject.html" alt="GenObject" shape="rect" coords="0,0,77,24"> </map> </div> <p> <a href="classTelEngine_1_1DataFormat-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#01b6850185c5712724e728450c5c720d">DataFormat</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#e7d5fd79e576e1ff772c882c26a00cf8">DataFormat</a> (const char *value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#a8657bfd60179859b26127c6e0ab1672">DataFormat</a> (const <a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> &value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#87392e1bda9aebe43f000a11132fd229">DataFormat</a> (const <a class="el" href="classTelEngine_1_1String.html">String</a> &value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#2a1d7fdab9b546aaceacec634759bb16">DataFormat</a> (const <a class="el" href="classTelEngine_1_1String.html">String</a> *value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#5e85d4a12d57ee499b8ca65663d7a06c">DataFormat</a> (const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> *format)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#54fdfeb52cc2c1dbbaa460b42c3ab357">operator=</a> (const <a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> &value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#6f04b72cc2ce542326ed26e96b8358b0">getInfo</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#583085e7d64efaf452353a1ce41812bf">frameSize</a> (int defValue=0) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#c50f7df7d38387dcb5eefaec2c601e6b">frameTime</a> (int defValue=0) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#6eda4a536d2e20a408130d1fdb5b8eb0">sampleRate</a> (int defValue=0) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#a9325818ffc5ea7b8ae6c824fe3972d7">numChannels</a> (int defValue=1) const </td></tr> <tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classTelEngine_1_1DataFormat.html#60416725e977bd9da56c54ce34083363">changed</a> ()</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A Data format. <p> An extension of a <a class="el" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> that can parse data formats <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="01b6850185c5712724e728450c5c720d"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="01b6850185c5712724e728450c5c720d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Creates a new, empty format string. </div> </div><p> <a class="anchor" name="e7d5fd79e576e1ff772c882c26a00cf8"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="e7d5fd79e576e1ff772c882c26a00cf8" args="(const char *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Creates a new initialized format. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Initial value of the format </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="a8657bfd60179859b26127c6e0ab1672"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="a8657bfd60179859b26127c6e0ab1672" args="(const DataFormat &value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Copy constructor. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Initial value of the format </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="87392e1bda9aebe43f000a11132fd229"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="87392e1bda9aebe43f000a11132fd229" args="(const String &value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor from <a class="el" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> reference <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Initial value of the format </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="2a1d7fdab9b546aaceacec634759bb16"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="2a1d7fdab9b546aaceacec634759bb16" args="(const String *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1String.html">String</a> * </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor from <a class="el" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> pointer. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>Initial value of the format </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="5e85d4a12d57ee499b8ca65663d7a06c"></a><!-- doxytag: member="TelEngine::DataFormat::DataFormat" ref="5e85d4a12d57ee499b8ca65663d7a06c" args="(const FormatInfo *format)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> </td> <td>(</td> <td class="paramtype">const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> * </td> <td class="paramname"> <em>format</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor from format information <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>format</em> </td><td>Pointer to existing <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a> </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="60416725e977bd9da56c54ce34083363"></a><!-- doxytag: member="TelEngine::DataFormat::changed" ref="60416725e977bd9da56c54ce34083363" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void changed </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Called whenever the value changed (except in constructors). <p>Reimplemented from <a class="el" href="classTelEngine_1_1String.html#60416725e977bd9da56c54ce34083363">String</a>.</p> </div> </div><p> <a class="anchor" name="583085e7d64efaf452353a1ce41812bf"></a><!-- doxytag: member="TelEngine::DataFormat::frameSize" ref="583085e7d64efaf452353a1ce41812bf" args="(int defValue=0) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int frameSize </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>defValue</em> = <code>0</code> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrive the frame size <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>defValue</em> </td><td>Default value to return if format is unknown </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Frame size in octets/frame, 0 for non-framed, defValue if unknown </dd></dl> </div> </div><p> <a class="anchor" name="c50f7df7d38387dcb5eefaec2c601e6b"></a><!-- doxytag: member="TelEngine::DataFormat::frameTime" ref="c50f7df7d38387dcb5eefaec2c601e6b" args="(int defValue=0) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int frameTime </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>defValue</em> = <code>0</code> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrive the frame time <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>defValue</em> </td><td>Default value to return if format is unknown </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Frame time in microseconds, 0 for variable, defValue if unknown </dd></dl> </div> </div><p> <a class="anchor" name="6f04b72cc2ce542326ed26e96b8358b0"></a><!-- doxytag: member="TelEngine::DataFormat::getInfo" ref="6f04b72cc2ce542326ed26e96b8358b0" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="structTelEngine_1_1FormatInfo.html">FormatInfo</a>* getInfo </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p> Retrive a pointer to the format information <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to the associated format info or NULL if error </dd></dl> </div> </div><p> <a class="anchor" name="a9325818ffc5ea7b8ae6c824fe3972d7"></a><!-- doxytag: member="TelEngine::DataFormat::numChannels" ref="a9325818ffc5ea7b8ae6c824fe3972d7" args="(int defValue=1) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int numChannels </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>defValue</em> = <code>1</code> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrive the number of channels <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>defValue</em> </td><td>Default value to return if format is unknown </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of channels (typically 1), defValue if unknown format </dd></dl> </div> </div><p> <a class="anchor" name="54fdfeb52cc2c1dbbaa460b42c3ab357"></a><!-- doxytag: member="TelEngine::DataFormat::operator=" ref="54fdfeb52cc2c1dbbaa460b42c3ab357" args="(const DataFormat &value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a>& operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classTelEngine_1_1DataFormat.html">DataFormat</a> & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Assignment operator. <p>References <a class="el" href="yateclass_8h-source.html#l01485">String::operator=()</a>.</p> </div> </div><p> <a class="anchor" name="6eda4a536d2e20a408130d1fdb5b8eb0"></a><!-- doxytag: member="TelEngine::DataFormat::sampleRate" ref="6eda4a536d2e20a408130d1fdb5b8eb0" args="(int defValue=0) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int sampleRate </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>defValue</em> = <code>0</code> </td> <td> ) </td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Retrive the sample rate <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>defValue</em> </td><td>Default value to return if format is unknown </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Rate in samples/second (audio) or 1e-6 frames/second (video), 0 for unknown, defValue if unknown format </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>