Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > 1af184c486f5d5f476d50602700ee0a0 > files > 32

lib64zvbi-devel-0.2.33-2mdv2010.0.x86_64.rpm

<!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: DVB VBI multiplexer</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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>DVB VBI multiplexer<br>
<small>
[<a class="el" href="group__LowDec.html">Low Level Decoding</a>]</small>
</h1>Converting VBI data to a DVB PES or TS stream.  
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct _vbi_dvb_mux&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">DVB VBI multiplexer context.  <a href="#g332cf3cd9f2ab3046546cfa6ceca31dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gf1a76cf927eeba68a9781f29d515b0b8"></a><!-- doxytag: member="DVBMux::vbi_dvb_mux_cb" ref="gf1a76cf927eeba68a9781f29d515b0b8" args="(vbi_dvb_mux *mx, void *user_data, const uint8_t *packet, unsigned int packet_size)" -->
typedef vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><b>vbi_dvb_mux_cb</b> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx, void *user_data, const uint8_t *packet, unsigned int packet_size)</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gec15eda3c8a2997f2e0de60cf4b45fad">vbi_dvb_multiplex_sliced</a> (uint8_t **packet, unsigned int *packet_left, const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> **sliced, unsigned int *sliced_left, vbi_service_set service_mask, unsigned int data_identifier, vbi_bool stuffing)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g6880de6040ef8a7c0efc0567ad5129b1">vbi_dvb_multiplex_raw</a> (uint8_t **packet, unsigned int *packet_left, const uint8_t **raw, unsigned int *raw_left, unsigned int data_identifier, vbi_videostd_set videostd_set, unsigned int line, unsigned int first_pixel_position, unsigned int n_pixels_total, vbi_bool stuffing)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g7d78b04052d8cb3deb1bf4a6a444212c">vbi_dvb_mux_reset</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx, uint8_t **buffer, unsigned int *buffer_left, const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> **sliced, unsigned int *sliced_lines, vbi_service_set service_mask, const uint8_t *raw, const vbi_sampling_par *sampling_par, int64_t pts)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gd1cda96732f749de532bfdf171ae5ffa">vbi_dvb_mux_feed</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx, const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> *sliced, unsigned int sliced_lines, vbi_service_set service_mask, const uint8_t *raw, const vbi_sampling_par *sampling_par, int64_t pts) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gc4b1ac2189963001b714834d63446831">vbi_dvb_mux_get_data_identifier</a> (const <a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#ge60edb3b7f9436f4ebf8f44341824ad2">vbi_dvb_mux_set_data_identifier</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx, unsigned int data_identifier) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#ge90a0b729073ee1bc0512f9000261bc5">vbi_dvb_mux_get_min_pes_packet_size</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g1f67f8749fdb144faa9ab7a3614a4801">vbi_dvb_mux_get_max_pes_packet_size</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gafb9b3f311bee2d7a69506a3b30b89ca">vbi_dvb_mux_set_pes_packet_size</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx, unsigned int min_size, unsigned int max_size) _vbi_nonnull((1))</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#gf75f95054ae53015fa1dbc8d00678139">vbi_dvb_mux_delete</a> (<a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *mx)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new</a> (vbi_dvb_mux_cb *callback, void *user_data) _vbi_alloc</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new</a> (unsigned int pid, vbi_dvb_mux_cb *callback, void *user_data) _vbi_alloc</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Converting VBI data to a DVB PES or TS stream. 
<p>
These functions convert raw and/or sliced VBI data to a DVB Packetized Elementary Stream or Transport Stream as defined in EN 300 472 "Digital Video Broadcasting (DVB); Specification for conveying ITU-R System B Teletext in DVB bitstreams" and EN 301 775 "Digital Video Broadcasting (DVB); Specification for the carriage of Vertical Blanking Information (VBI) data in DVB bitstreams".<p>
Note EN 300 468 "Digital Video Broadcasting (DVB); Specification for Service Information (SI) in DVB systems" defines another method to transmit VPS data in DVB streams. Libzvbi does not provide functions to generate SI tables but the vbi_encode_dvb_pdc_descriptor() function is available to convert a VPS PIL to a PDC descriptor. <hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g332cf3cd9f2ab3046546cfa6ceca31dc"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux" ref="g332cf3cd9f2ab3046546cfa6ceca31dc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct _vbi_dvb_mux <a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
DVB VBI multiplexer context. 
<p>
The contents of this structure are private.<p>
Call <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a> to allocate a DVB VBI multiplexer context. 
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gec15eda3c8a2997f2e0de60cf4b45fad"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_multiplex_sliced" ref="gec15eda3c8a2997f2e0de60cf4b45fad" args="(uint8_t **packet, unsigned int *packet_left, const vbi_sliced **sliced, unsigned int *sliced_left, vbi_service_set service_mask, unsigned int data_identifier, vbi_bool stuffing)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_multiplex_sliced           </td>
          <td>(</td>
          <td class="paramtype">uint8_t **&nbsp;</td>
          <td class="paramname"> <em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>packet_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> **&nbsp;</td>
          <td class="paramname"> <em>sliced</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>sliced_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_service_set&nbsp;</td>
          <td class="paramname"> <em>service_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>data_identifier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_bool&nbsp;</td>
          <td class="paramname"> <em>stuffing</em></td><td>&nbsp;</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>packet</em>&nbsp;</td><td><em>*packet</em> must point at the output buffer where the data units will be stored. Initially this should be the position of the first data unit in a PES packet, immediately after the data_indentifier byte. <em>*packet</em> will be incremented by the cumulative size of the successfully stored data units. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>packet_left</em>&nbsp;</td><td><em>*packet_left</em> must contain the number of bytes available in the <em>packet</em> buffer. It will be decremented by the cumulative size of the successfully stored data units. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced</em>&nbsp;</td><td><em>*sliced</em> shall point at the sliced VBI data to be converted, or it can be a <code>NULL</code> pointer. All data in this array must belong to the same video frame. The pointer will be advanced by the number of successfully converted structures. On failure it will point at the offending <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced_left</em>&nbsp;</td><td><em>*sliced_left</em> shall contain the number of <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structures in the <em>sliced</em> array, or it can be zero. It will be decremented by the number of successfully converted structures. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>service_mask</em>&nbsp;</td><td>Only data services in this set will be encoded. Other data services in the <em>*sliced</em> array will be discarded without further checks. Create a set by ORing <code>VBI_SLICED_</code> values. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data_identifier</em>&nbsp;</td><td>When the <em>data_indentifier</em> lies in range 0x10 to 0x1F inclusive, the encoded data units will be padded to data_unit_length 0x2C for compatibility with EN 300 472 compliant decoders. The <em>data_identifier</em> itself will NOT be stored in the output buffer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stuffing</em>&nbsp;</td><td>If TRUE, and space remains in the output buffer after all data has been successfully converted, or when <em>*sliced</em> is <code>NULL</code> or <em>*sliced_left</em> is zero, the function fills the buffer up with stuffing data units.</td></tr>
  </table>
</dl>
Converts the sliced VBI data in the <em>sliced</em> array to VBI data units as defined in EN 300 472 and EN 301 775 and stores them in the <em>packet</em> buffer.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure.<ul>
<li><em>*packet</em> is <code>NULL</code> or <em>*packet_left</em> is less than two (the minimum data unit size is two bytes). The output buffer remains unchanged in this case.</li><li>The <em>data_identifier</em> is in range 0x10 to 0x1F inclusive and <em>*packet_left</em> is not a multiple of 46. The output buffer remains unchanged in this case.</li><li>The <em>sliced</em> array is not sorted by ascending line number, except for elements with line number 0 (undefined).</li><li>Only the following data services can be encoded:<ul>
<li><code>VBI_SLICED_TELETEXT_B</code> on lines 7 to 22 and 320 to 335 inclusive, or with line number 0 (undefined). All Teletext lines will be encoded with data_unit_id 0x02 ("EBU Teletext non-subtitle data").</li><li><code>VBI_SLICED_VPS</code> on line 16.</li><li><code>VBI_SLICED_CAPTION_625</code> on line 22.</li><li><code>VBI_SLICED_WSS_625</code> on line 23.</li></ul>
</li><li>A <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure contains a line number outside the valid range specified above.</li></ul>
</dd></dl>
All errors are recoverable. Just call the function again, possibly after skipping the offending sliced VBI data structure, to continue where it left off. Note <em>*packet_left</em> must be &gt;= 2 (or a multiple of 46) in each call.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>According to EN 300 472 and EN 301 775 all lines stored in one PES packet must belong to the same video frame (but the data of one frame may be transmitted in several successive PES packets). They must be encoded in the same order as they would be transmitted in the VBI, no line more than once. The function cannot enforce this if multiple calls are necessary to encode all data.</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g6880de6040ef8a7c0efc0567ad5129b1"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_multiplex_raw" ref="g6880de6040ef8a7c0efc0567ad5129b1" args="(uint8_t **packet, unsigned int *packet_left, const uint8_t **raw, unsigned int *raw_left, unsigned int data_identifier, vbi_videostd_set videostd_set, unsigned int line, unsigned int first_pixel_position, unsigned int n_pixels_total, vbi_bool stuffing)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_multiplex_raw           </td>
          <td>(</td>
          <td class="paramtype">uint8_t **&nbsp;</td>
          <td class="paramname"> <em>packet</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>packet_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t **&nbsp;</td>
          <td class="paramname"> <em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>raw_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>data_identifier</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_videostd_set&nbsp;</td>
          <td class="paramname"> <em>videostd_set</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>first_pixel_position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>n_pixels_total</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_bool&nbsp;</td>
          <td class="paramname"> <em>stuffing</em></td><td>&nbsp;</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>packet</em>&nbsp;</td><td>*packet must point to the output buffer where the data units will be stored. Initially this should be the position of the first data unit in a PES packet, immediately after the data_indentifier byte. <em>*packet</em> will be incremented by the size of the successfully stored data units. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>packet_left</em>&nbsp;</td><td><em>*packet_left</em> must contain the number of bytes available in the <em>packet</em> buffer. It will be decremented by the cumulative size of the successfully stored data units. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>raw</em>&nbsp;</td><td><em>*raw</em> must point at the raw VBI data to be converted, namely luminance samples as defined in ITU-R BT.601 with 8 bits per sample. <em>*raw</em> will be incremented by the number of successfully converted samples. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>raw_left</em>&nbsp;</td><td><em>*raw_left</em> must contain the number of samples left to be encoded in the <em>raw</em> buffer. It will be decremented by the number of successfully converted samples. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data_identifier</em>&nbsp;</td><td>When the <em>data_indentifier</em> lies in range 0x10 to 0x1F inclusive, the encoded data units will be padded to data_unit_length 0x2C for compatibility with EN 300 472 compliant decoders. The <em>data_identifier</em> itself will NOT be stored in the output buffer. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>videostd_set</em>&nbsp;</td><td>The <em>line</em> parameter will be interpreted according to this set of video standards. It must not change until all samples have been encoded. In libzvbi 0.2.x only one of two values are permitted: VBI_VIDEOSTD_SET_625_50 or VBI_VIDEOSTD_SET_525_60. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>line</em>&nbsp;</td><td>The ITU-R line number to be encoded in the data units. It must not change until all samples have been encoded. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>first_pixel_position</em>&nbsp;</td><td>The horizontal offset where decoders shall insert the first sample in the VBI, counting samples from the start of the digital active line as defined in ITU-R BT.601. Usually <em>first_pixel_position</em> is zero and <em>n_pixels_total</em> is 720. <em>first_pixel_position</em> + <em>n_pixels_total</em> must not be greater than 720. This parameter must not change until all samples have been encoded. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n_pixels_total</em>&nbsp;</td><td>Total size of the <em>raw</em> buffer in bytes, and the total number of samples to be encoded. Initially this value must be equal to <em>*raw_left</em>, and it must not change until all samples have been encoded. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stuffing</em>&nbsp;</td><td>If TRUE, and space remains in the output buffer after all samples have been successfully converted, the function fills up the buffer with stuffing data units.</td></tr>
  </table>
</dl>
Converts one line of raw VBI samples to one or more "monochrome 4:2:2 samples" data units as defined in EN 301 775, and stores them in the <em>packet</em> buffer.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure:<ul>
<li><em>*packet</em> is <code>NULL</code> or <em>*packet_left</em> is less than two (the minimum data unit size is two bytes).</li><li><em>*raw</em> is <code>NULL</code> or <em>*raw_left</em> is zero.</li><li>The <em>data_identifier</em> is in range 0x10 to 0x1F inclusive and <em>*packet_left</em> is not a multiple of 46.</li><li>The <em>videostd_set</em> is ambiguous.</li><li>The <em>line</em> parameter is outside the valid range, that is 7 to 23 and 270 to 286 for 525 line standards, 7 to 23 and 320 to 336 for 625 line standards. All numbers inclusive.</li><li><em>*raw_left</em> is greater than <em>n_pixels_total</em>.</li><li><em>first_pixel_position</em> + <em>n_pixels_total</em> is greater than 720.</li></ul>
</dd></dl>
The output buffer remains unchanged on all errors.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>According to EN 301 775 all lines stored in one PES packet must belong to the same video frame (but the data of one frame may be transmitted in several successive PES packets). They must be encoded in the same order as they would be transmitted in the VBI, no line more than once. Samples may have to be split into multiple segments and they must be contiguously encoded into adjacent data units. The function cannot enforce this if multiple calls are necessary to encode all samples.</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g7d78b04052d8cb3deb1bf4a6a444212c"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_reset" ref="g7d78b04052d8cb3deb1bf4a6a444212c" args="(vbi_dvb_mux *mx) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vbi_dvb_mux_reset           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>          </td>
          <td>&nbsp;)&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>.</td></tr>
  </table>
</dl>
Clears the internal buffers of the DVB VBI multiplexer.<p>
After a <a class="el" href="group__DVBMux.html#g7d78b04052d8cb3deb1bf4a6a444212c">vbi_dvb_mux_reset()</a> call the <a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor()</a> function will encode a new PES packet, discarding any data of the previous packet which has not been consumed by the application.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gf840f3c06200398a80aad6f960249d50"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_cor" ref="gf840f3c06200398a80aad6f960249d50" args="(vbi_dvb_mux *mx, uint8_t **buffer, unsigned int *buffer_left, const vbi_sliced **sliced, unsigned int *sliced_lines, vbi_service_set service_mask, const uint8_t *raw, const vbi_sampling_par *sampling_par, int64_t pts)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_mux_cor           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t **&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>buffer_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> **&nbsp;</td>
          <td class="paramname"> <em>sliced</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>sliced_left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_service_set&nbsp;</td>
          <td class="paramname"> <em>service_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vbi_sampling_par *&nbsp;</td>
          <td class="paramname"> <em>sp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>pts</em></td><td>&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td><em>*buffer</em> must point at the output buffer where the converted data will be stored, and will be incremented by the number of bytes stored there. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buffer_left</em>&nbsp;</td><td><em>*buffer_left</em> must contain the number of bytes available in the <em>buffer</em>, and will be decremented by number of bytes stored there. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced</em>&nbsp;</td><td><em>*sliced</em> must point at the sliced VBI data to be converted. All data must belong to the same video frame. The pointer will be advanced by the number of successfully converted structures. On failure it will point at the offending <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced_left</em>&nbsp;</td><td><em>*sliced_left</em> must contain the number of <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structures in the <em>sliced</em> array. It will be decremented by the number of successfully converted structures. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>service_mask</em>&nbsp;</td><td>Only data services in this set will be encoded. Other data services in the <em>sliced</em> array will be discarded without further checks. Create a set by ORing <code>VBI_SLICED_</code> values. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>raw</em>&nbsp;</td><td>Shall point at a raw VBI frame of (<em>sp-&gt;count</em>[0] + <em>sp-&gt;count</em>[1]) lines times <em>sp-&gt;bytes_per_line</em>. The function encodes only those lines which have been selected by <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structures in the <em>sliced</em> array with id <code>VBI_SLICED_VBI_625</code>. The data field of these structures is ignored. When the <em>sliced</em> array does not contain such structures <em>raw</em> can be <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sp</em>&nbsp;</td><td>Describes the data in the <em>raw</em> buffer. When <em>raw</em> is <code>NULL</code>, <em>sp</em> can be <code>NULL</code> too. Otherwise all fields must be valid, with the following additional constraints:<ul>
<li>.videostd_set must contain one or more bits from the <code>VBI_VIDEOSTD_SET_625_50</code>. In libzvbi 0.2.x .scanning must be 625.</li><li>.sampling_format must be <code>VBI_PIXFMT_Y8</code> or <code>VBI_PIXFMT_YUV420</code>. Chrominance samples are ignored.</li><li>.sampling_rate must be <code>13500000</code>.</li><li>.offset must be &gt;= <code>132</code>, and the value must not change until all samples have been encoded.</li><li>.samples_per_line (.bytes_per_line in libzvbi 0.2.x) must be &gt;= <code>1</code>, and the value must not change until all samples have been encoded.</li><li>.offset + .samples_per_line must be &lt;= <code>132</code> + <code>720</code>.</li><li>.synchronous must be <code>TRUE</code>. </li></ul>
</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pts</em>&nbsp;</td><td>This Presentation Time Stamp will be encoded into the PES packet. Bits 33 ... 63 are discarded.</td></tr>
  </table>
</dl>
This function converts raw and/or sliced VBI data to one DVB VBI PES packet or one or more TS packets as defined in EN 300 472 and EN 301 775, and stores them in the output buffer.<p>
If the returned <em>*buffer_left</em> value is zero and the returned <em>*sliced_left</em> value is greater than zero another call will be necessary to convert the remaining data.<p>
After a <a class="el" href="group__DVBMux.html#g7d78b04052d8cb3deb1bf4a6a444212c">vbi_dvb_mux_reset()</a> call the <a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor()</a> function will encode a new PES packet, discarding any data of the previous packet which has not been consumed by the application.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure:<ul>
<li><em>*buffer</em> is <code>NULL</code> or <em>*buffer_left</em> is zero.</li><li><em>*sliced</em> in <code>NULL</code> or <em>*sliced_left</em> is zero.</li><li>The maximum PES packet size, or the value selected with <a class="el" href="group__DVBMux.html#gafb9b3f311bee2d7a69506a3b30b89ca">vbi_dvb_mux_set_pes_packet_size()</a>, is too small to contain all the sliced and raw VBI data.</li><li>The <em>sliced</em> array is not sorted by ascending line number, except for elements with line number 0 (undefined).</li><li>Only the following data services can be encoded:<ul>
<li><code>VBI_SLICED_TELETEXT_B</code> on lines 7 to 22 and 320 to 335 inclusive, or with line number 0 (undefined). All Teletext lines will be encoded with data_unit_id 0x02 ("EBU Teletext non-subtitle data").</li><li><code>VBI_SLICED_VPS</code> on line 16.</li><li><code>VBI_SLICED_CAPTION_625</code> on line 22.</li><li><code>VBI_SLICED_WSS_625</code> on line 23.</li><li>Raw VBI data with id <code>VBI_SLICED_VBI_625</code> can be encoded on lines 7 to 23 and 320 to 336 inclusive. Note for compliance with the Teletext buffer model defined in EN 300 472, EN 301 775 recommends to encode at most one raw and one sliced, or two raw VBI lines per frame.</li></ul>
</li><li>A <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure contains a line number outside the valid range specified above.</li><li><em>raw</em> is <code>NULL</code> although the <em>*sliced</em> array contains a structure with id <code>VBI_SLICED_VBI_625</code>.</li><li><em>sp</em> is <code>NULL</code> although the <em>*sliced</em> array contains a structure with id <code>VBI_SLICED_VBI_625</code>.</li><li>One or more fields of the <em>sp</em> structure are invalid.</li><li>A <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure with id <code>VBI_SLICED_VBI_625</code> contains a line number outside the ranges defined by <em>sp-&gt;start</em>[] and <em>sp-&gt;count</em>[] (i.e. the line is not in the <em>raw</em> buffer).</li></ul>
</dd></dl>
On all errors <em>*sliced</em> will point at the offending <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure and the output buffer remains unchanged.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gd1cda96732f749de532bfdf171ae5ffa"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_feed" ref="gd1cda96732f749de532bfdf171ae5ffa" args="(vbi_dvb_mux *mx, const vbi_sliced *sliced, unsigned int sliced_lines, vbi_service_set service_mask, const uint8_t *raw, const vbi_sampling_par *sampling_par, int64_t pts) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_mux_feed           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structvbi__sliced.html">vbi_sliced</a> *&nbsp;</td>
          <td class="paramname"> <em>sliced</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>sliced_lines</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_service_set&nbsp;</td>
          <td class="paramname"> <em>service_mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&nbsp;</td>
          <td class="paramname"> <em>raw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vbi_sampling_par *&nbsp;</td>
          <td class="paramname"> <em>sp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>pts</em></td><td>&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced</em>&nbsp;</td><td>Pointer to the sliced VBI data to be converted. All data must belong to the same video frame. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sliced_lines</em>&nbsp;</td><td>The number of <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structures in the <em>sliced</em> array. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>service_mask</em>&nbsp;</td><td>Only data services in this set will be encoded. Other data services in the <em>sliced</em> array will be discarded without further checks. Create a set by ORing <code>VBI_SLICED_</code> values. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>raw</em>&nbsp;</td><td>Shall point at a raw VBI frame of (<em>sp-&gt;count</em>[0] + <em>sp-&gt;count</em>[1]) lines times <em>sp-&gt;bytes_per_line</em>. The function encodes only those lines which have been selected by <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structures in the <em>sliced</em> array with id <code>VBI_SLICED_VBI_625</code>. The data field of these structures is ignored. When the <em>sliced</em> array does not contain such structures <em>raw</em> can be <code>NULL</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sp</em>&nbsp;</td><td>Describes the data in the <em>raw</em> buffer. When <em>raw</em> is <code>NULL</code>, <em>sp</em> can be <code>NULL</code> too. Otherwise all fields must be valid, with the following additional constraints:<ul>
<li>.videostd_set must contain one or more bits from the <code>VBI_VIDEOSTD_SET_625_50</code>. In libzvbi 0.2.x .scanning must be 625.</li><li>.sampling_format must be <code>VBI_PIXFMT_Y8</code> or <code>VBI_PIXFMT_YUV420</code>. Chrominance samples are ignored.</li><li>.sampling_rate must be <code>13500000</code>.</li><li>.offset must be &gt;= <code>132</code>.</li><li>.samples_per_line (in libzvbi 0.2.x .bytes_per_line) must be &gt;= <code>1</code>.</li><li>.offset + .samples_per_line must be &lt;= <code>132</code> + <code>720</code>.</li><li>.synchronous must be <code>TRUE</code>. </li></ul>
</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pts</em>&nbsp;</td><td>This Presentation Time Stamp will be encoded into the PES packet. Bits 33 ... 63 are discarded.</td></tr>
  </table>
</dl>
This function converts raw and/or sliced VBI data to one DVB VBI PES packet or one or more TS packets as defined in EN 300 472 and EN 301 775. For output it calls the callback function passed to <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a> once for each PES or TS packet.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure.<ul>
<li>No callback function was selected with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>.</li><li>The callback function returned <code>FALSE</code>. Any remaining TS packets which have not been output yet are discarded.</li><li>The maximum PES packet size, or the value selected with <a class="el" href="group__DVBMux.html#gafb9b3f311bee2d7a69506a3b30b89ca">vbi_dvb_mux_set_pes_packet_size()</a>, is too small to contain all the sliced and raw VBI data.</li><li>The <em>sliced</em> array is not sorted by ascending line number, except for elements with line number 0 (undefined).</li><li>Only the following data services can be encoded:<ul>
<li><code>VBI_SLICED_TELETEXT_B</code> on lines 7 to 22 and 320 to 335 inclusive, or with line number 0 (undefined). All Teletext lines will be encoded with data_unit_id 0x02 ("EBU Teletext non-subtitle data").</li><li><code>VBI_SLICED_VPS</code> on line 16.</li><li><code>VBI_SLICED_CAPTION_625</code> on line 22.</li><li><code>VBI_SLICED_WSS_625</code> on line 23.</li><li>Raw VBI data with id <code>VBI_SLICED_VBI_625</code> can be encoded on lines 7 to 23 and 320 to 336 inclusive.</li></ul>
</li><li>A <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure contains a line number outside the valid range specified above.</li><li><em>raw</em> is <code>NULL</code> although the <em>sliced</em> array contains a structure with id <code>VBI_SLICED_VBI_625</code>.</li><li><em>sp</em> is <code>NULL</code> although the <em>sliced</em> array contains a structure with id <code>VBI_SLICED_VBI_625</code>.</li><li>One or more fields of the <em>sp</em> structure are invalid.</li><li>A <a class="el" href="structvbi__sliced.html" title="This structure holds one scan line of sliced vbi data.">vbi_sliced</a> structure with id <code>VBI_SLICED_VBI_625</code> contains a line number outside the ranges defined by <em>sp-&gt;start</em>[] and <em>sp-&gt;count</em>[] (i.e. the line is not in the <em>raw</em> buffer).</li></ul>
</dd></dl>
The function does not call the callback function on failure.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gc4b1ac2189963001b714834d63446831"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_get_data_identifier" ref="gc4b1ac2189963001b714834d63446831" args="(const vbi_dvb_mux *mx) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int vbi_dvb_mux_get_data_identifier           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>          </td>
          <td>&nbsp;)&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>.</td></tr>
  </table>
</dl>
Returns the data_identifier the multiplexer encodes into PES packets.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ge60edb3b7f9436f4ebf8f44341824ad2"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_set_data_identifier" ref="ge60edb3b7f9436f4ebf8f44341824ad2" args="(vbi_dvb_mux *mx, unsigned int data_identifier) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_mux_set_data_identifier           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>data_identifier</em></td><td>&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data_identifier</em>&nbsp;</td><td>The data_identifier byte to be stored in PES packets.</td></tr>
  </table>
</dl>
Determines the data_identifier byte to be stored in PES packets. For compatibility with decoders compliant to EN 300 472 this should be a value in the range 0x10 to 0x1F inclusive. The values 0x99 to 0x9B inclusive as defined in EN 301 775 are also permitted.<p>
The default data_identifier is 0x10.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> if the <em>data_identifier</em> is outside the valid ranges specified above.</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ge90a0b729073ee1bc0512f9000261bc5"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_get_min_pes_packet_size" ref="ge90a0b729073ee1bc0512f9000261bc5" args="(vbi_dvb_mux *mx) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int vbi_dvb_mux_get_min_pes_packet_size           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>          </td>
          <td>&nbsp;)&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>.</td></tr>
  </table>
</dl>
Returns the maximum size of PES packets the multiplexer generates.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g1f67f8749fdb144faa9ab7a3614a4801"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_get_max_pes_packet_size" ref="g1f67f8749fdb144faa9ab7a3614a4801" args="(vbi_dvb_mux *mx) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int vbi_dvb_mux_get_max_pes_packet_size           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>          </td>
          <td>&nbsp;)&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>.</td></tr>
  </table>
</dl>
Returns the minimum size of PES packets the multiplexer generates.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gafb9b3f311bee2d7a69506a3b30b89ca"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_set_pes_packet_size" ref="gafb9b3f311bee2d7a69506a3b30b89ca" args="(vbi_dvb_mux *mx, unsigned int min_size, unsigned int max_size) _vbi_nonnull((1))" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_dvb_mux_set_pes_packet_size           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>min_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>max_size</em></td><td>&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>min_size</em>&nbsp;</td><td>Minimum PES packet size. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_size</em>&nbsp;</td><td>Maximum PES packet size.</td></tr>
  </table>
</dl>
Determines the minimum and maximum total size of PES packets generated by the multiplexer, including all header bytes. When the data to be stored in a packet is smaller than the minimum size, the multiplexer will fill the packet up with stuffing bytes. When the data is larger than the maximum size the <a class="el" href="group__DVBMux.html#gd1cda96732f749de532bfdf171ae5ffa">vbi_dvb_mux_feed()</a> and <a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor()</a> functions will fail.<p>
The PES packet size must be a multiple of 184 bytes, in the range 184 to 65504 bytes inclusive, and this function will round <em>min_size</em> up and <em>max_size</em> down accordingly. If after rounding the maximum size is lower than the minimum, it will be set to the same value as the minimum size.<p>
The default minimum size is 184, the default maximum 65504 bytes. For compatibility with decoders compliant to the Teletext buffer model defined in EN 300 472 the maximum should not exceed 1472 bytes.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure (out of memory).</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gf75f95054ae53015fa1dbc8d00678139"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_mux_delete" ref="gf75f95054ae53015fa1dbc8d00678139" args="(vbi_dvb_mux *mx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vbi_dvb_mux_delete           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a> *&nbsp;</td>
          <td class="paramname"> <em>mx</em>          </td>
          <td>&nbsp;)&nbsp;</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>mx</em>&nbsp;</td><td>DVB VBI multiplexer context allocated with <a class="el" href="group__DVBMux.html#g2e805d970cba543c154ad56488fde4d5">vbi_dvb_pes_mux_new()</a> or <a class="el" href="group__DVBMux.html#g36a19426a652077248c892940760bcc7">vbi_dvb_ts_mux_new()</a>. Can be <code>NULL</code>.</td></tr>
  </table>
</dl>
Frees all resources associated with <em>mx</em>.<p>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g2e805d970cba543c154ad56488fde4d5"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_pes_mux_new" ref="g2e805d970cba543c154ad56488fde4d5" args="(vbi_dvb_mux_cb *callback, void *user_data) _vbi_alloc" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a>* vbi_dvb_pes_mux_new           </td>
          <td>(</td>
          <td class="paramtype">vbi_dvb_mux_cb *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>user_data</em></td><td>&nbsp;</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>callback</em>&nbsp;</td><td>Function to be called by <a class="el" href="group__DVBMux.html#gd1cda96732f749de532bfdf171ae5ffa">vbi_dvb_mux_feed()</a> when a new packet is available. Can be <code>NULL</code> if you want to use the <a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor()</a> coroutine instead. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>User pointer passed through to the <em>callback</em> function.</td></tr>
  </table>
</dl>
Allocates a new DVB VBI multiplexer converting raw and/or sliced VBI data to MPEG-2 Packetized Elementary Stream (PES) packets as defined in the standards EN 300 472 and EN 301 775.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to newly allocated DVB VBI multiplexer context, which must be freed with <a class="el" href="group__DVBMux.html#gf75f95054ae53015fa1dbc8d00678139">vbi_dvb_mux_delete()</a> when done. <code>NULL</code> on failure (out of memory).</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g36a19426a652077248c892940760bcc7"></a><!-- doxytag: member="dvb_mux.h::vbi_dvb_ts_mux_new" ref="g36a19426a652077248c892940760bcc7" args="(unsigned int pid, vbi_dvb_mux_cb *callback, void *user_data) _vbi_alloc" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__DVBMux.html#g332cf3cd9f2ab3046546cfa6ceca31dc">vbi_dvb_mux</a>* vbi_dvb_ts_mux_new           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vbi_dvb_mux_cb *&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>user_data</em></td><td>&nbsp;</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>pid</em>&nbsp;</td><td>This Program ID will be stored in the header of the generated TS packets. The <em>pid</em> must be in range <code>0x0010</code> to <code>0x1FFE</code> inclusive. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td>Function to be called by <a class="el" href="group__DVBMux.html#gd1cda96732f749de532bfdf171ae5ffa">vbi_dvb_mux_feed()</a> when a new packet is available. Can be <code>NULL</code> if you want to use the <a class="el" href="group__DVBMux.html#gf840f3c06200398a80aad6f960249d50">vbi_dvb_mux_cor()</a> coroutine instead. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>User pointer passed through to the <em>callback</em> function.</td></tr>
  </table>
</dl>
Allocates a new DVB VBI multiplexer converting raw and/or sliced VBI data to MPEG-2 Transport Stream (TS) packets as defined in the standards EN 300 472 and EN 301 775.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to newly allocated DVB VBI multiplexer context, which must be freed with <a class="el" href="group__DVBMux.html#gf75f95054ae53015fa1dbc8d00678139">vbi_dvb_mux_delete()</a> when done. <code>NULL</code> on failure (out of memory or invalid <em>pid</em>).</dd></dl>
<dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </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&nbsp;
<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>