<!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: Teletext PFC packet demultiplexer</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>Teletext PFC packet demultiplexer<br> <small> [<a class="el" href="group__LowDec.html">Low Level Decoding</a>]</small> </h1>Functions to decode data transmissions in Teletext Page Function Clear packets (EN 300 708 section 4). <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structvbi__pfc__block.html">vbi_pfc_block</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">One block of data returned by <a class="el" href="group__PFCDemux.html#g92c46d220a81ab6a01a81a864406e690">vbi_pfc_demux_cb()</a>. <a href="structvbi__pfc__block.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct _vbi_pfc_demux </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">PFC demultiplexer context. <a href="#gdaab0edb3e8a3a858cc2bf6fdaeac498"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#g92c46d220a81ab6a01a81a864406e690">vbi_pfc_demux_cb</a> (<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx, void *user_data, const <a class="el" href="structvbi__pfc__block.html">vbi_pfc_block</a> *block)</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#ge334afca20ce542494b2cf783b8fae39">vbi_pfc_demux_reset</a> (<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx) _vbi_nonnull((1))</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed</a> (<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx, const uint8_t buffer[42])</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#g1389d3cf33437d596faf835ebde346f6">vbi_pfc_demux_feed_frame</a> (<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx, const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> *sliced, unsigned int n_lines)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#g75e8bc1bb2a51e972932993ad2a9e309">vbi_pfc_demux_delete</a> (<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new</a> (<a class="el" href="group__HiDec.html#g8711c9b42b61d518b7f79e941fe94eb1">vbi_pgno</a> pgno, unsigned int stream, <a class="el" href="group__PFCDemux.html#g92c46d220a81ab6a01a81a864406e690">vbi_pfc_demux_cb</a> *callback, void *user_data)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Functions to decode data transmissions in Teletext Page Function Clear packets (EN 300 708 section 4). <hr><h2>Typedef Documentation</h2> <a class="anchor" name="gdaab0edb3e8a3a858cc2bf6fdaeac498"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux" ref="gdaab0edb3e8a3a858cc2bf6fdaeac498" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct _vbi_pfc_demux <a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> </td> </tr> </table> </div> <div class="memdoc"> <p> PFC demultiplexer context. <p> The contents of this structure are private.<p> Call <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a> to allocate a PFC demultiplexer context. </div> </div><p> <a class="anchor" name="g92c46d220a81ab6a01a81a864406e690"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_cb" ref="g92c46d220a81ab6a01a81a864406e690" args="(vbi_pfc_demux *dx, void *user_data, const vbi_pfc_block *block)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef vbi_bool <a class="el" href="group__PFCDemux.html#g92c46d220a81ab6a01a81a864406e690">vbi_pfc_demux_cb</a>(<a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> *dx, void *user_data, const <a class="el" href="structvbi__pfc__block.html">vbi_pfc_block</a> *block) </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>dx</em> </td><td>PFC demultiplexer context returned by vbi_pfx_demux_new() and given to <a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>user_data</em> </td><td>User pointer given to <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>block</em> </td><td>Structure describing the received data block.</td></tr> </table> </dl> Function called by <a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a> when a new data block is available.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>FALSE on error, will be returned by <a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a>.</dd></dl> <dl class="bug" compact><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd><a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a> returns the <em>user_data</em> pointer as second parameter the <em>block</em> pointer as third parameter, but prior to version 0.2.26 this function incorrectly defined <em>block</em> as second and <em>user_data</em> as third parameter. </dd></dl> </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="ge334afca20ce542494b2cf783b8fae39"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_reset" ref="ge334afca20ce542494b2cf783b8fae39" args="(vbi_pfc_demux *dx) _vbi_nonnull((1))" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void vbi_pfc_demux_reset </td> <td>(</td> <td class="paramtype"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> * </td> <td class="paramname"> <em>dx</em> </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>dx</em> </td><td>PFC demultiplexer context allocated with <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>.</td></tr> </table> </dl> Resets the PFC demux context, useful for example after a channel change. </div> </div><p> <a class="anchor" name="ga4b895cf6895630a82608b3225c6412c"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_feed" ref="ga4b895cf6895630a82608b3225c6412c" args="(vbi_pfc_demux *dx, const uint8_t buffer[42])" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_pfc_demux_feed </td> <td>(</td> <td class="paramtype"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> * </td> <td class="paramname"> <em>dx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const uint8_t </td> <td class="paramname"> <em>buffer</em>[42]</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>dx</em> </td><td>PFC demultiplexer context allocated with <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>Teletext packet (last 42 bytes, i. e. without clock run-in and framing code), as in struct <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a>.</td></tr> </table> </dl> This function takes a raw stream of Teletext packets, filters out the page and stream requested with <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a> and assembles the data transmitted in this page in a buffer. When a data block is complete it calls the output function given to <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>FALSE if the packet contained incorrectable errors. </dd></dl> </div> </div><p> <a class="anchor" name="g1389d3cf33437d596faf835ebde346f6"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_feed_frame" ref="g1389d3cf33437d596faf835ebde346f6" args="(vbi_pfc_demux *dx, const vbi_sliced *sliced, unsigned int n_lines)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_pfc_demux_feed_frame </td> <td>(</td> <td class="paramtype"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> * </td> <td class="paramname"> <em>dx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> * </td> <td class="paramname"> <em>sliced</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>n_lines</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>dx</em> </td><td>PFC demultiplexer context allocated with <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>sliced</em> </td><td>Sliced VBI data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>n_lines</em> </td><td>Number of lines in the <em>sliced</em> array.</td></tr> </table> </dl> This function works like <a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a> but operates on sliced VBI data and filters out <code>VBI_SLICED_TELETEXT_B_625</code>.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>FALSE if any Teletext lines contained incorrectable errors.</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl> </div> </div><p> <a class="anchor" name="g75e8bc1bb2a51e972932993ad2a9e309"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_delete" ref="g75e8bc1bb2a51e972932993ad2a9e309" args="(vbi_pfc_demux *dx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void vbi_pfc_demux_delete </td> <td>(</td> <td class="paramtype"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a> * </td> <td class="paramname"> <em>dx</em> </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>dx</em> </td><td>PFC demultiplexer context allocated with <a class="el" href="group__PFCDemux.html#gbb8a4610aa41282267b5e09d98394153">vbi_pfc_demux_new()</a>, can be <code>NULL</code>.</td></tr> </table> </dl> Frees all resources associated with <em>dx</em>. </div> </div><p> <a class="anchor" name="gbb8a4610aa41282267b5e09d98394153"></a><!-- doxytag: member="pfc_demux.h::vbi_pfc_demux_new" ref="gbb8a4610aa41282267b5e09d98394153" args="(vbi_pgno pgno, unsigned int stream, vbi_pfc_demux_cb *callback, void *user_data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__PFCDemux.html#gdaab0edb3e8a3a858cc2bf6fdaeac498">vbi_pfc_demux</a>* vbi_pfc_demux_new </td> <td>(</td> <td class="paramtype"><a class="el" href="group__HiDec.html#g8711c9b42b61d518b7f79e941fe94eb1">vbi_pgno</a> </td> <td class="paramname"> <em>pgno</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int </td> <td class="paramname"> <em>stream</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__PFCDemux.html#g92c46d220a81ab6a01a81a864406e690">vbi_pfc_demux_cb</a> * </td> <td class="paramname"> <em>callback</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"> <em>user_data</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>pgno</em> </td><td>Page to take PFC data from. </td></tr> <tr><td valign="top"></td><td valign="top"><em>stream</em> </td><td>PFC stream to be demultiplexed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>callback</em> </td><td>Function to be called by <a class="el" href="group__PFCDemux.html#ga4b895cf6895630a82608b3225c6412c">vbi_pfc_demux_feed()</a> when a new data block is available. </td></tr> <tr><td valign="top"></td><td valign="top"><em>user_data</em> </td><td>User pointer passed through to <em>cb</em> function.</td></tr> </table> </dl> Allocates a new Page Function Clear (ETS 300 708 section 4) demultiplexer.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to newly allocated PFC demux context which must be freed with <a class="el" href="group__PFCDemux.html#g75e8bc1bb2a51e972932993ad2a9e309">vbi_pfc_demux_delete()</a> when done. <code>NULL</code> on failure (out of memory). </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>