<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>ZVBI Library: Video Program System Decoder</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <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><a href="examples.html"><span>Examples</span></a></li> </ul> </div> </div> <div class="contents"> <h1>Video Program System Decoder<br> <small> [<a class="el" href="group__LowDec.html">Low Level Decoding</a>]</small> </h1>Functions to decode and encode VPS packets (EN 300 231, EN 300 468). <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__VPS.html#ge7fc7752981892961b360789f3a22496">vbi_decode_vps_cni</a> (unsigned int *cni, const uint8_t buffer[13])</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__VPS.html#g8cd549b25532ae4c6aa4f32a9b1eaa96">vbi_encode_vps_cni</a> (uint8_t buffer[13], unsigned int cni) _vbi_nonnull((1))</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Functions to decode and encode VPS packets (EN 300 231, EN 300 468). <hr><h2>Function Documentation</h2> <a class="anchor" name="ge7fc7752981892961b360789f3a22496"></a><!-- doxytag: member="vps.h::vbi_decode_vps_cni" ref="ge7fc7752981892961b360789f3a22496" args="(unsigned int *cni, const uint8_t buffer[13])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_decode_vps_cni </td> <td>(</td> <td class="paramtype">unsigned int * </td> <td class="paramname"> <em>cni</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const uint8_t </td> <td class="paramname"> <em>buffer</em>[13]</td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>cni</em> </td><td>CNI of type VBI_CNI_TYPE_VPS will be stored here. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>VPS packet as defined for <code>VBI_SLICED_VPS</code>, i.e. 13 bytes without clock run-in and start code.</td></tr> </table> </dl> Decodes a VPS packet according to EN 300 231, returning the 12 bit Country and Network Identifier in <em>cni</em>.<p> The code 0xDC3 is translated according to TR 101 231: "As this code is used for a time in two networks a distinction for automatic tuning systems is given in data line 16 [VPS]: bit 3 of byte 5 = 1 for the ARD network / = 0 for the ZDF network."<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Always <code>TRUE</code>, no error checking possible. It may be prudent to wait until two identical CNIs have been received.</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.20 </dd></dl> </div> </div><p> <a class="anchor" name="g8cd549b25532ae4c6aa4f32a9b1eaa96"></a><!-- doxytag: member="vps.h::vbi_encode_vps_cni" ref="g8cd549b25532ae4c6aa4f32a9b1eaa96" args="(uint8_t buffer[13], unsigned int cni) _vbi_nonnull((1))" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_encode_vps_cni </td> <td>(</td> <td class="paramtype">uint8_t </td> <td class="paramname"> <em>buffer</em>[13], </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>cni</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>VPS packet as defined for <code>VBI_SLICED_VPS</code>, i.e. 13 bytes without clock run-in and start code. </td></tr> <tr><td valign="top"></td><td valign="top"><em>cni</em> </td><td>CNI of type VBI_CNI_TYPE_VPS.</td></tr> </table> </dl> Stores the 12 bit Country and Network Identifier <em>cni</em> in a VPS packet according to EN 300 231.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> if <em>cni</em> is invalid. In this case <em>buffer</em> remains unmodified.</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.20 </dd></dl> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 04:47:58 2009 for ZVBI Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>