Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 2a781e5f78e233aedaa1e51ed196dcc3 > files > 52

lib64zvbi-devel-0.2.35-5.mga6.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ZVBI Library: VPS/PDC Program ID</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ZVBI Library
   &#160;<span id="projectnumber">0.2.35</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">VPS/PDC Program ID<div class="ingroups"><a class="el" href="group__LowDec.html">Low Level Decoding</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Functions to decode VPS/PDC Program IDs and helper functions.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structvbi__program__id.html">vbi_program_id</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program Identification.  <a href="structvbi__program__id.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga749715601c404fe3fb1d6273c950e9df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga749715601c404fe3fb1d6273c950e9df">VBI_PIL</a>(month,  day,  hour,  minute)&#160;&#160;&#160;(((day) &lt;&lt; 15) | ((month) &lt;&lt; 11) | ((hour) &lt;&lt; 6) | (minute))</td></tr>
<tr class="memdesc:ga749715601c404fe3fb1d6273c950e9df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to create a PIL.  <a href="#ga749715601c404fe3fb1d6273c950e9df">More...</a><br /></td></tr>
<tr class="separator:ga749715601c404fe3fb1d6273c950e9df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaae3974c3e680d42322edaad37b35ebcc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaae3974c3e680d42322edaad37b35ebcc">VBI_PIL_MONTH</a>(pil)&#160;&#160;&#160;(((pil) &gt;&gt; 11) &amp; 15)</td></tr>
<tr class="separator:gaae3974c3e680d42322edaad37b35ebcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga138a4f95542c36527f6df6ee08094f2f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga138a4f95542c36527f6df6ee08094f2f">VBI_PIL_DAY</a>(pil)&#160;&#160;&#160;(((pil) &gt;&gt; 15) &amp; 31)</td></tr>
<tr class="separator:ga138a4f95542c36527f6df6ee08094f2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga78d71b2b88dd3729e5364f6061000ebf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>(pil)&#160;&#160;&#160;(((pil) &gt;&gt; 6) &amp; 31)</td></tr>
<tr class="separator:ga78d71b2b88dd3729e5364f6061000ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaacada356d88add876dc7484892231e73"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaacada356d88add876dc7484892231e73">VBI_PIL_MINUTE</a>(pil)&#160;&#160;&#160;((pil) &amp; 63)</td></tr>
<tr class="separator:gaacada356d88add876dc7484892231e73"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga870eeecedc6aed609b9f53d4dbe0f6c7"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a></td></tr>
<tr class="memdesc:ga870eeecedc6aed609b9f53d4dbe0f6c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Program Identification Label.  <a href="#ga870eeecedc6aed609b9f53d4dbe0f6c7">More...</a><br /></td></tr>
<tr class="separator:ga870eeecedc6aed609b9f53d4dbe0f6c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d">VBI_PIL_TIMER_CONTROL</a> = VBI_PIL (15, 0, 31, 63), 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd">VBI_PIL_INHIBIT_TERMINATE</a> = VBI_PIL (15, 0, 30, 63), 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4">VBI_PIL_INTERRUPTION</a> = VBI_PIL (15, 0, 29, 63), 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1">VBI_PIL_CONTINUE</a> = VBI_PIL (15, 0, 28, 63), 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9">VBI_PIL_NSPV</a> = VBI_PIL (15, 15, 31, 63), 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea6e6335917a64f23fc354338b033136a8">VBI_PIL_END</a> = VBI_PIL (15, 15, 31, 63)
<br />
 }<tr class="memdesc:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">PIL Service Codes.  <a href="group__ProgramID.html#ga05589fbab0657f08285ebdfe93f5ec9e">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga05589fbab0657f08285ebdfe93f5ec9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga289ec10e87cef7655799144bc898f262"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga289ec10e87cef7655799144bc898f262">vbi_pid_channel</a> { <br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a51a53db4366781f100d5d02836d6452e">VBI_PID_CHANNEL_LCI_0</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262afdd62439879c03c78fce236bf7dcc081">VBI_PID_CHANNEL_LCI_1</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262ac9a4d6e6932f0f4fd2a19f71f07f4447">VBI_PID_CHANNEL_LCI_2</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a969d34250cbd4e60539740cc4f3398f1">VBI_PID_CHANNEL_LCI_3</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a232efb61f9f576d83a778ad18b90e296">VBI_PID_CHANNEL_VPS</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a9ac263afbaf6fee07902a8ad757c928e">VBI_PID_CHANNEL_PDC_DESCRIPTOR</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262afc0136ef197f37d06ba1a93bdf828024">VBI_PID_CHANNEL_XDS_CURRENT</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a22b0667766d14757d7819f00cb7b2ff7">VBI_PID_CHANNEL_XDS_FUTURE</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a4d686ec8bbbcbac78fb4526374cecb01">VBI_MAX_PID_CHANNELS</a>
<br />
 }<tr class="memdesc:ga289ec10e87cef7655799144bc898f262"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sources of PIDs.  <a href="group__ProgramID.html#ga289ec10e87cef7655799144bc898f262">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga289ec10e87cef7655799144bc898f262"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64267f70a2cef8c8557d82c9cd85563f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga64267f70a2cef8c8557d82c9cd85563f">vbi_pcs_audio</a> { <br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa5994f0d2781ca031198bcda8c23d59bf">VBI_PCS_AUDIO_UNKNOWN</a> = 0, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa494fe015c2497742fc4b1f70a27de49d">VBI_PCS_AUDIO_MONO</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa7e3d3e9c70bc5e28c44601e8c3d44b2f">VBI_PCS_AUDIO_STEREO</a>, 
<br />
&#160;&#160;<a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563faf571f5caa5f9a68476eada594d322ffc">VBI_PCS_AUDIO_BILINGUAL</a>
<br />
 }<tr class="memdesc:ga64267f70a2cef8c8557d82c9cd85563f"><td class="mdescLeft">&#160;</td><td class="mdescRight">PDC Program Control Status - Audio.  <a href="group__ProgramID.html#ga64267f70a2cef8c8557d82c9cd85563f">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga64267f70a2cef8c8557d82c9cd85563f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab4bd9f39f2540cf6e92d2ee13e27ef91"><td class="memItemLeft" align="right" valign="top">vbi_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date</a> (<a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a> pil)</td></tr>
<tr class="separator:gab4bd9f39f2540cf6e92d2ee13e27ef91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4a0271a359ada115e66bcd0612bd184"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaf4a0271a359ada115e66bcd0612bd184">vbi_pil_to_time</a> (<a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a> pil, time_t start, const char *tz)</td></tr>
<tr class="separator:gaf4a0271a359ada115e66bcd0612bd184"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae29384d60da1db037cc029bd97fcdd5d"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gae29384d60da1db037cc029bd97fcdd5d">vbi_pil_lto_to_time</a> (<a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a> pil, time_t start, int seconds_east)</td></tr>
<tr class="separator:gae29384d60da1db037cc029bd97fcdd5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga494bfcc0863e5cc9cbe8f9e213096ad1"><td class="memItemLeft" align="right" valign="top">vbi_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window</a> (time_t *begin, time_t *end, time_t time, const char *tz)</td></tr>
<tr class="separator:ga494bfcc0863e5cc9cbe8f9e213096ad1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac256d7e11100b73967b68cd90d578b0e"><td class="memItemLeft" align="right" valign="top">vbi_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gac256d7e11100b73967b68cd90d578b0e">vbi_pil_validity_window</a> (time_t *begin, time_t *end, <a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a> pil, time_t start, const char *tz)</td></tr>
<tr class="separator:gac256d7e11100b73967b68cd90d578b0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa366a729fc2d72127baf3991e91a3f31"><td class="memItemLeft" align="right" valign="top">vbi_bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaa366a729fc2d72127baf3991e91a3f31">vbi_pil_lto_validity_window</a> (time_t *begin, time_t *end, <a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a> pil, time_t start, int seconds_east)</td></tr>
<tr class="separator:gaa366a729fc2d72127baf3991e91a3f31"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions to decode VPS/PDC Program IDs and helper functions. </p>
<p>Program IDs are transmitted by networks to remotely control video recorders. They can be used to</p><ul>
<li>start and stop recording exactly when a program starts and ends, even when the program is early or late or overruns,</li>
<li>pause recording during a planned or unplanned interruption (you can safely assume that no station transmits a pause code during commercial breaks),</li>
<li>keep recording a program which continues on a different channel,</li>
<li>record a program after it has been postponed to a later date and possibly a different channel,</li>
<li>record all episodes of a series without prior knowledge of the broadcast times,</li>
<li>alert the user about emergency messages.</li>
</ul>
<p>The basic principle is to transmit a label along with the program containing the originally announced start date and time. When the label is no longer transmitted the program has ended. When two programs on different channels are scheduled for recording the recorder may have to scan the channels alternately. Better accuracy than a few seconds within the actual start should not be expected.</p>
<p>Libzvbi supports Program IDs transmitted in Teletext packet 8/30 format 2 and in VPS packets as defined in EN 300 231 "Television systems; Specification of the domestic video Programme Delivery Control system (PDC)", and DVB PDC descriptors as defined in EN 300
468 "Specification for Service Information (SI) in DVB systems". Support for XDS Current/Future Program ID packets as defined in EIA 608-B "Recommended Practice for Line 21 Data Service" is planned but not implemented yet.</p>
<p>Program IDs are available through the low level functions <a class="el" href="group__Packet830.html#gad0461de5ceb8ef217d2ad62cb4438809">vbi_decode_teletext_8302_pdc()</a>, <a class="el" href="group__VPS.html#gafeaf0db61475e7c6b2b7b52fbc8470f3">vbi_decode_vps_pdc()</a>, <a class="el" href="group__VPS.html#ga46c57ac82a3fabe71d7c1059dabfec96">vbi_decode_dvb_pdc_descriptor()</a> and the <em><a class="el" href="structvbi__decoder.html">vbi_decoder</a></em> event <code>VBI_EVENT_PROG_ID</code>. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga749715601c404fe3fb1d6273c950e9df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBI_PIL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">month, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">day, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">hour, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">minute&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;(((day) &lt;&lt; 15) | ((month) &lt;&lt; 11) | ((hour) &lt;&lt; 6) | (minute))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Macro to create a PIL. </p>
<p>Valid values for <em>month</em> are 1 ... 12, for <em>day</em> 1 ... 31, for <em>hour</em> 0 ... 23 and for <em>minute</em> 0 ... 59.</p>
<p>Note in the PDC system (EN 300 231) networks may also transmit unreal dates or times like 14-00 25:63. You can determine if a PIL represents a valid date and time with the <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a> function.</p>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="examples_2pdc2_8c-example.html#a29">examples/pdc2.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="gaae3974c3e680d42322edaad37b35ebcc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBI_PIL_MONTH</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pil</td><td>)</td>
          <td>&#160;&#160;&#160;(((pil) &gt;&gt; 11) &amp; 15)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Extract the month from a PIL. Valid values are in range 1 ... 12. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="examples_2pdc1_8c-example.html#a7">examples/pdc1.c</a>, and <a class="el" href="examples_2pdc2_8c-example.html#a14">examples/pdc2.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>, <a class="el" href="group__ProgramID.html#gaa366a729fc2d72127baf3991e91a3f31">vbi_pil_lto_validity_window()</a>, and <a class="el" href="group__ProgramID.html#gac256d7e11100b73967b68cd90d578b0e">vbi_pil_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="ga138a4f95542c36527f6df6ee08094f2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBI_PIL_DAY</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pil</td><td>)</td>
          <td>&#160;&#160;&#160;(((pil) &gt;&gt; 15) &amp; 31)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Extract the day from a PIL. Valid values are in range 1 ... 31. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="examples_2pdc1_8c-example.html#a8">examples/pdc1.c</a>, and <a class="el" href="examples_2pdc2_8c-example.html#a15">examples/pdc2.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>, <a class="el" href="group__ProgramID.html#gaa366a729fc2d72127baf3991e91a3f31">vbi_pil_lto_validity_window()</a>, and <a class="el" href="group__ProgramID.html#gac256d7e11100b73967b68cd90d578b0e">vbi_pil_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="ga78d71b2b88dd3729e5364f6061000ebf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBI_PIL_HOUR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pil</td><td>)</td>
          <td>&#160;&#160;&#160;(((pil) &gt;&gt; 6) &amp; 31)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Extract the hour from a PIL. Valid values are in range 0 ... 23. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="examples_2pdc1_8c-example.html#a9">examples/pdc1.c</a>, and <a class="el" href="examples_2pdc2_8c-example.html#a16">examples/pdc2.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>, <a class="el" href="group__ProgramID.html#gaa366a729fc2d72127baf3991e91a3f31">vbi_pil_lto_validity_window()</a>, <a class="el" href="group__ProgramID.html#gaf4a0271a359ada115e66bcd0612bd184">vbi_pil_to_time()</a>, and <a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="gaacada356d88add876dc7484892231e73"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBI_PIL_MINUTE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">pil</td><td>)</td>
          <td>&#160;&#160;&#160;((pil) &amp; 63)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Extract the minute from a PIL. Valid values are in range 0 ... 59. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="examples_2pdc1_8c-example.html#a10">examples/pdc1.c</a>, and <a class="el" href="examples_2pdc2_8c-example.html#a17">examples/pdc2.c</a>.</dd>
</dl>
<p>Referenced by <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>, and <a class="el" href="group__ProgramID.html#gaf4a0271a359ada115e66bcd0612bd184">vbi_pil_to_time()</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga870eeecedc6aed609b9f53d4dbe0f6c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned int <a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Program Identification Label. </p>
<p>This is a packed representation of the originally announced start date and time ("AT-2" in EN 300 231 parlance, "Scheduled Start
Time" in EIA 608-B) of a program.</p>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga05589fbab0657f08285ebdfe93f5ec9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PIL Service Codes. </p>
<p>PILs can be zero, or specify a valid date and time, or an unreal time such as 31:00 if a new label has been assigned to a program but no transmission time has been decided yet. Some PILs with unreal date and time have a special meaning.</p>
<p>These codes are defined in EN 300 231 Section 6.2, Annex E.3 and Annex F, and in EIA 608-B Section 9.5.1.1.</p>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d"></a>VBI_PIL_TIMER_CONTROL&#160;</td><td class="fielddoc">
<p>Only in Teletext packets 8/30 format 2, VPS packets and DVB PDC descriptors: "Timer Control".</p>
<p>No program IDs are available, use the timer to control recording. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd"></a>VBI_PIL_INHIBIT_TERMINATE&#160;</td><td class="fielddoc">
<p>Teletext, VPS, DVB: "Recording Inhibit/Terminate".</p>
<p>When the PIL changes from a valid program label to <code>VBI_PIL_INHIBIT_TERMINATE</code> the current program has ended and the next program has not started yet. VCRs recording the current program shall stop recording and remove the program from their schedule. VCRs waiting for a new PIL shall continue waiting. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4"></a>VBI_PIL_INTERRUPTION&#160;</td><td class="fielddoc">
<p>Teletext, VPS, DVB: "Interruption".</p>
<p>When the PIL changes from a valid program label to <code>VBI_PIL_INTERRUPTION</code>, the current program has stopped but will continue later. This code is transmitted for example at the start of a halftime pause or at a film break. VCRs recording the current program shall stop recording, but not delete the program from their schedule. The network may broadcast other programs with different PILs before the interrupted program continues. VCRs waiting for a new PIL shall continue waiting. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1"></a>VBI_PIL_CONTINUE&#160;</td><td class="fielddoc">
<p>Teletext, VPS, DVB: "Continuation code".</p>
<p>This code is transmitted during a service interruption, the PDC service should resume operation shortly. VCRs recording the current program shall continue recording, VCRs waiting for a new PIL shall continue waiting. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9"></a>VBI_PIL_NSPV&#160;</td><td class="fielddoc">
<p>Teletext, VPS, DVB: "No Specific PIL Value".</p>
<p>Networks may transmit this label with an unplanned program such as an emergency message. The program type (PTY) field may still be valid. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga05589fbab0657f08285ebdfe93f5ec9ea6e6335917a64f23fc354338b033136a8"></a>VBI_PIL_END&#160;</td><td class="fielddoc">
<p>Only in XDS Current Program ID packets:</p>
<p>The current program has ended and the next program not started yet. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga289ec10e87cef7655799144bc898f262"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__ProgramID.html#ga289ec10e87cef7655799144bc898f262">vbi_pid_channel</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sources of PIDs. </p>
<p>A program identification can be transmitted on different logical channels. Teletext packet 8/30 format 2 contains a Label Channel Identifier. XDS Program ID packets can refer to the current or next program.</p>
<p>This information is returned in struct <em><a class="el" href="structvbi__program__id.html" title="Program Identification. ">vbi_program_id</a></em> by the low level functions <a class="el" href="group__Packet830.html#gad0461de5ceb8ef217d2ad62cb4438809">vbi_decode_teletext_8302_pdc()</a>, <a class="el" href="group__VPS.html#gafeaf0db61475e7c6b2b7b52fbc8470f3">vbi_decode_vps_pdc()</a>, <a class="el" href="group__VPS.html#ga46c57ac82a3fabe71d7c1059dabfec96">vbi_decode_dvb_pdc_descriptor()</a> and the <em><a class="el" href="structvbi__decoder.html">vbi_decoder</a></em> event <code>VBI_EVENT_PROG_ID</code>.</p>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a51a53db4366781f100d5d02836d6452e"></a>VBI_PID_CHANNEL_LCI_0&#160;</td><td class="fielddoc">
<p>Data from Teletext packet 8/30 format 2, Label Channel 0 (EN 300 706 section 9.8.2, EN 300 231 section 8.2.1).</p>
<p>Teletext packets contain a CNI, PIL, LUF, MI, PRF, PCS and PTY. They are transmitted once per second for each Label Channel in use.</p>
<p>The purpose of Label Channels is to transmit overlapping PIDs, for example one referring the current program and another announcing the imminent start of the next program. Programs can also have multiple PIDs, for example a sports magazine with several segments, where the entire program has a PID and each segment has its own PID, transmitted on a different Label Channel.</p>
<p>Label Channels are used in no particular order or hierarchy. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262afdd62439879c03c78fce236bf7dcc081"></a>VBI_PID_CHANNEL_LCI_1&#160;</td><td class="fielddoc">
<p>Data from Teletext packet 8/30 format 2, Label Channel 1. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262ac9a4d6e6932f0f4fd2a19f71f07f4447"></a>VBI_PID_CHANNEL_LCI_2&#160;</td><td class="fielddoc">
<p>Data from Teletext packet 8/30 format 2, Label Channel 2. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a969d34250cbd4e60539740cc4f3398f1"></a>VBI_PID_CHANNEL_LCI_3&#160;</td><td class="fielddoc">
<p>Data from Teletext packet 8/30 format 2, Label Channel 3. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a232efb61f9f576d83a778ad18b90e296"></a>VBI_PID_CHANNEL_VPS&#160;</td><td class="fielddoc">
<p>Data from a VPS packet (EN 300 231).</p>
<p>These packets contain a CNI, PIL, PCS and PTY. They are transmitted once in each frame, i.e. 25 times per second. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a9ac263afbaf6fee07902a8ad757c928e"></a>VBI_PID_CHANNEL_PDC_DESCRIPTOR&#160;</td><td class="fielddoc">
<p>Data from a DVB PDC descriptor (EN 300 468 Section 6.2.29).</p>
<p>DVB PDC descriptors contain the same PIL as a VPS packet, but no CNI, PCS or PTY. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262afc0136ef197f37d06ba1a93bdf828024"></a>VBI_PID_CHANNEL_XDS_CURRENT&#160;</td><td class="fielddoc">
<p>Data from an XDS Current Program ID packet (EIA 608-B Section 9).</p>
<p>XDS Current/Future Program ID packets contain a PIL and tape-delayed flag. Current class packets refer to the currently transmitted program, Future class packets to the next program.</p>
<p>Decoding of XDS Current/Future Program ID packets is not implemented yet. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a22b0667766d14757d7819f00cb7b2ff7"></a>VBI_PID_CHANNEL_XDS_FUTURE&#160;</td><td class="fielddoc">
<p>Data from an XDS Future Program ID packet. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga289ec10e87cef7655799144bc898f262a4d686ec8bbbcbac78fb4526374cecb01"></a>VBI_MAX_PID_CHANNELS&#160;</td><td class="fielddoc">
<p>Note this value may change. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga64267f70a2cef8c8557d82c9cd85563f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__ProgramID.html#ga64267f70a2cef8c8557d82c9cd85563f">vbi_pcs_audio</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>PDC Program Control Status - Audio. </p>
<p>This information is available with Teletext and VPS program IDs and returned in struct <a class="el" href="structvbi__program__id.html" title="Program Identification. ">vbi_program_id</a> by the low level functions <a class="el" href="group__Packet830.html#gad0461de5ceb8ef217d2ad62cb4438809">vbi_decode_teletext_8302_pdc()</a>, <a class="el" href="group__VPS.html#gafeaf0db61475e7c6b2b7b52fbc8470f3">vbi_decode_vps_pdc()</a> and the <em><a class="el" href="structvbi__decoder.html">vbi_decoder</a></em> event <code>VBI_EVENT_PROG_ID</code>.</p>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga64267f70a2cef8c8557d82c9cd85563fa5994f0d2781ca031198bcda8c23d59bf"></a>VBI_PCS_AUDIO_UNKNOWN&#160;</td><td class="fielddoc">
<p>Nothing known about audio channels. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga64267f70a2cef8c8557d82c9cd85563fa494fe015c2497742fc4b1f70a27de49d"></a>VBI_PCS_AUDIO_MONO&#160;</td><td class="fielddoc">
<p>Mono audio is broadcast. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga64267f70a2cef8c8557d82c9cd85563fa7e3d3e9c70bc5e28c44601e8c3d44b2f"></a>VBI_PCS_AUDIO_STEREO&#160;</td><td class="fielddoc">
<p>Stereo audio. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga64267f70a2cef8c8557d82c9cd85563faf571f5caa5f9a68476eada594d322ffc"></a>VBI_PCS_AUDIO_BILINGUAL&#160;</td><td class="fielddoc">
<p>Primary language on left channel, secondary on right. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab4bd9f39f2540cf6e92d2ee13e27ef91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_pil_is_valid_date </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a>&#160;</td>
          <td class="paramname"><em>pil</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pil</td><td>Program Identification Label.</td></tr>
  </table>
  </dd>
</dl>
<p>Determines if <em>pil</em> represents a valid date and time.</p>
<p>Since PILs have no year field February 29th is considered valid. You can find out if this date is valid in a given year with the <a class="el" href="group__ProgramID.html#gaf4a0271a359ada115e66bcd0612bd184">vbi_pil_to_time()</a> function.</p>
<p>24:00 is not valid (an unreal hour) as defined in EN 300 231 Annex F and EIA 608-B Section 9.5.1.1.</p>
<dl class="section return"><dt>Returns</dt><dd><code>TRUE</code> if <em>pil</em> represents a valid date and time, <code>FALSE</code> if <em>pil</em> contains an unreal date or time (e.g. Jan 0 27:61), a service code or unallocated code.</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34 </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#ga138a4f95542c36527f6df6ee08094f2f">VBI_PIL_DAY</a>, <a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>, <a class="el" href="group__ProgramID.html#gaacada356d88add876dc7484892231e73">VBI_PIL_MINUTE</a>, and <a class="el" href="group__ProgramID.html#gaae3974c3e680d42322edaad37b35ebcc">VBI_PIL_MONTH</a>.</p>

<p>Referenced by <a class="el" href="group__ProgramID.html#gae29384d60da1db037cc029bd97fcdd5d">vbi_pil_lto_to_time()</a>, and <a class="el" href="group__ProgramID.html#gaf4a0271a359ada115e66bcd0612bd184">vbi_pil_to_time()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf4a0271a359ada115e66bcd0612bd184"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">time_t vbi_pil_to_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a>&#160;</td>
          <td class="paramname"><em>pil</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pil</td><td>Program Identification Label (PIL) to convert. </td></tr>
    <tr><td class="paramname">start</td><td>The most recently announced start time of the program. If zero the current system time will be used. </td></tr>
    <tr><td class="paramname">tz</td><td>A time zone name in the same format as the TZ environment variable. If <code>NULL</code> the current value of TZ will be used.</td></tr>
  </table>
  </dd>
</dl>
<p>This function converts a PIL to a time_t in the same manner localtime() converts a broken-down time to time_t.</p>
<p>Since PILs do not contain a year field, the year is determined from the <em>start</em> parameter, that is the most recently announced start time of the program or "AT-1" in EN 300 231 parlance. If <em>pil</em> contains a month more than five months after <em>start</em>, <em>pil</em> is assumed to refer to an earlier date than <em>start</em>.</p>
<p><em>pil</em> is assumed to be a time in the time zone <em>tz</em>. <em>start</em> will be converted to a local time in the same time zone to determine the correct year.</p>
<p>Teletext packet 8/30 format 2, VPS and DVB PDC descriptors give a PIL relative to the time zone of the intended audience of the program. Ideally the time zone would be specified as a geographic area like "Europe/London", such that the function can determine the correct offset from UTC and if daylight-saving time is in effect at the specified date. See the documentation of the localtime() function and the TZ environment variable for details.</p>
<p>XDS Current/Future Program ID packets give a PIL relative to UTC. Just specify time zone "UTC" in this case.</p>
<dl class="section return"><dt>Returns</dt><dd>The PIL as a time_t, that is the number of seconds since 1970-01-01 00:00 UTC. On error the function returns (time_t) -1:<ul>
<li><em>pil</em> does not contain a valid date or time. February 29th is a valid date only if the estimated year is a leap year.</li>
<li><em>tz</em> is empty or contains an equal sign '='.</li>
<li><em>start</em> is zero and the current system time could not be determined.</li>
<li>The time specified by <em>pil</em>, <em>start</em> and <em>tz</em> cannot be represented as a time_t value.</li>
<li>Insufficient memory was available.</li>
</ul>
</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000009">Bug:</a></b></dt><dd>This function is not thread safe unless <em>tz</em> is <code>NULL</code>. That is a limitation of the C library which permits the conversion of a broken-down time in an arbitrary time zone only by setting the TZ environment variable. The function may also fail to restore the value of TZ if insufficient memory is available. </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>, <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>, and <a class="el" href="group__ProgramID.html#gaacada356d88add876dc7484892231e73">VBI_PIL_MINUTE</a>.</p>

</div>
</div>
<a class="anchor" id="gae29384d60da1db037cc029bd97fcdd5d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">time_t vbi_pil_lto_to_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a>&#160;</td>
          <td class="paramname"><em>pil</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>seconds_east</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pil</td><td>Program Identification Label (PIL) to convert. </td></tr>
    <tr><td class="paramname">start</td><td>The most recently announced start time of the program. If zero the current system time will be used. </td></tr>
    <tr><td class="paramname">seconds_east</td><td>A time zone specified as an offset in seconds east of UTC, for example +1 * 60 * 60 for CET. <em>seconds_east</em> may include a daylight-saving time (DST) offset.</td></tr>
  </table>
  </dd>
</dl>
<p>This function converts a PIL to a time_t in the same manner localtime() converts a broken-down time to time_t.</p>
<p>Since PILs do not contain a year field, the year is determined from the <em>start</em> parameter, that is the most recently announced start time of the program or "AT-1" in EN 300 231 parlance. If <em>pil</em> contains a month more than five months after <em>start</em>, <em>pil</em> is assumed to refer to an earlier date than <em>start</em>.</p>
<p><em>pil</em> is assumed to be a time in the time zone specified by <em>seconds_east</em>. <em>start</em> will be converted to a local time in the same time zone to determine the correct year.</p>
<p>Teletext packet 8/30 format 2, VPS and DVB PDC descriptors give a PIL relative to the time zone of the intended audience of the program. An offset from UTC including the DST offset in effect at the specified date may be available on Teletext program announcement pages (see struct vbi_preselection). Another offset from UTC including the <em>current</em> DST offset is available as <code>VBI_EVENT_LOCAL_TIME</code>, but of course that information is insufficient to determine if DST is in effect at other dates.</p>
<p>XDS Current/Future Program ID packets give a PIL relative to UTC, so <em>seconds_east</em> should be zero.</p>
<dl class="section return"><dt>Returns</dt><dd>The PIL as a time_t, that is the number of seconds since 1970-01-01 00:00 UTC. On error the function returns (time_t) -1:<ul>
<li><em>pil</em> does not contain a valid date or time. February 29th is a valid date only if the estimated year is a leap year.</li>
<li><em>start</em> is zero and the current system time could not be determined.</li>
<li>The time specified by <em>pil</em>, <em>start</em> and <em>seconds_east</em> cannot be represented as a time_t value (2038 is closer than you think!).</li>
</ul>
</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>This function is not thread safe. That is a limitation of the C library which permits the conversion of a broken-down time in an arbitrary time zone only by setting the TZ environment variable. The function may also fail to restore the value of TZ if insufficient memory is available. </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#gab4bd9f39f2540cf6e92d2ee13e27ef91">vbi_pil_is_valid_date()</a>.</p>

</div>
</div>
<a class="anchor" id="ga494bfcc0863e5cc9cbe8f9e213096ad1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_pty_validity_window </td>
          <td>(</td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>last_transm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">begin</td><td>The begin of the validity of the PTY will be stored here. </td></tr>
    <tr><td class="paramname">end</td><td>The end of the validity of the PTY will be stored here. </td></tr>
    <tr><td class="paramname">last_transm</td><td>The last time when a program ID with the PTY in question was broadcast by the network. </td></tr>
    <tr><td class="paramname">tz</td><td>A time zone name in the same format as the TZ environment variable. If <code>NULL</code> the current value of TZ will be used.</td></tr>
  </table>
  </dd>
</dl>
<p>This function calculates the validity time window of a Program Type (PTY) code according to EN 300 231. That is the time window where a network can be expected to broadcast another program with the same PTY, approximately up to four weeks after its last transmission. When the PTY is a series code (&gt;= 0x80) and not transmitted again before <em>end</em>, the network may assign the code to another series.</p>
<p><em>tz</em> is the time zone of the intended audience of the program. Ideally the time zone would be specified as a geographic area like "Europe/London", such that the function can determine if daylight-saving time is in effect at <em>time</em> or at the end of the validity time window. See the documentation of the localtime() function and the TZ environment variable for details. If no time zone name is available "UTC" should be specified, the returned <em>end</em> time may be off by one hour in this case.</p>
<dl class="section return"><dt>Returns</dt><dd>On error the function returns <code>FALSE</code> and <em>*begin</em> and <em>*end</em> remain unchanged:<ul>
<li><em>tz</em> is empty or contains an equal sign '='.</li>
<li>The <em>end</em> time cannot be represented as a time_t value (December 2037 is closer than you think!).</li>
<li>Insufficient memory was available.</li>
</ul>
</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000010">Bug:</a></b></dt><dd>This function is not thread safe unless <em>tz</em> is <code>NULL</code>. That is a limitation of the C library which permits the conversion of a broken-down time in an arbitrary time zone only by setting the TZ environment variable. The function may also fail to restore the value of TZ if insufficient memory is available. </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#ga749715601c404fe3fb1d6273c950e9df">VBI_PIL</a>, and <a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>.</p>

<p>Referenced by <a class="el" href="group__ProgramID.html#gac256d7e11100b73967b68cd90d578b0e">vbi_pil_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="gac256d7e11100b73967b68cd90d578b0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_pil_validity_window </td>
          <td>(</td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a>&#160;</td>
          <td class="paramname"><em>pil</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>tz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">begin</td><td>The start of the validity of the PIL will be stored here. </td></tr>
    <tr><td class="paramname">end</td><td>The end of the validity of the PIL will be stored here. </td></tr>
    <tr><td class="paramname">pil</td><td>Program Identification Label (PIL). </td></tr>
    <tr><td class="paramname">start</td><td>The most recently announced start time of the program. If zero the current system time will be used. </td></tr>
    <tr><td class="paramname">tz</td><td>A time zone name in the same format as the TZ environment variable. If <code>NULL</code> the current value of TZ will be used.</td></tr>
  </table>
  </dd>
</dl>
<p>This function calculates the validity time window of a PIL according to EN 300 231. That is the time window where a network can be expected to broadcast this PIL, usually from 00:00 on the same day until 04:00 on the next day.</p>
<p>Since PILs do not contain a year field, the year is determined from the <em>start</em> parameter, that is the most recently announced start time of the program or "AT-1" in EN 300 231 parlance. If <em>pil</em> contains a month more than five months after <em>start</em>, <em>pil</em> is assumed to refer to an earlier date than <em>start</em>.</p>
<p><em>pil</em> is assumed to be a time in the time zone specified by <em>seconds_east</em>. <em>start</em> will be converted to a local time in the same time zone to determine the correct year.</p>
<p>Teletext packet 8/30 format 2, VPS and DVB PDC descriptors give a PIL relative to the time zone of the intended audience of the program. Ideally the time zone would be specified as a geographic area like "Europe/London", such that the function can determine the correct offset from UTC and if daylight-saving time is in effect at any time within the validity window. See the documentation of the localtime() function and the TZ environment variable for details.</p>
<p>If <em>pil</em> is <code>VBI_PIL_NSPV</code> this function returns the same values as <a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>On error the function returns <code>FALSE:</code> <ul>
<li><em>pil</em> is not <code>VBI_PIL_NSPV</code> and does not contain a valid date or time. February 29th is a valid date only if the estimated year is a leap year.</li>
<li><em>tz</em> is empty or contains an equal sign '='.</li>
<li><em>start</em> is zero and the current system time could not be determined.</li>
<li>The time specified by <em>pil</em>, <em>start</em> and <em>tz</em> cannot be represented as a time_t value.</li>
<li>Insufficient memory was available.</li>
</ul>
</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000012">Bug:</a></b></dt><dd>This function is not thread safe unless <em>tz</em> is <code>NULL</code>. That is a limitation of the C library which permits the conversion of a broken-down time in an arbitrary time zone only by setting the TZ environment variable. The function may also fail to restore the value of TZ if insufficient memory is available. </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1">VBI_PIL_CONTINUE</a>, <a class="el" href="group__ProgramID.html#ga138a4f95542c36527f6df6ee08094f2f">VBI_PIL_DAY</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd">VBI_PIL_INHIBIT_TERMINATE</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4">VBI_PIL_INTERRUPTION</a>, <a class="el" href="group__ProgramID.html#gaae3974c3e680d42322edaad37b35ebcc">VBI_PIL_MONTH</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9">VBI_PIL_NSPV</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d">VBI_PIL_TIMER_CONTROL</a>, and <a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window()</a>.</p>

</div>
</div>
<a class="anchor" id="gaa366a729fc2d72127baf3991e91a3f31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vbi_bool vbi_pil_lto_validity_window </td>
          <td>(</td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t *&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__ProgramID.html#ga870eeecedc6aed609b9f53d4dbe0f6c7">vbi_pil</a>&#160;</td>
          <td class="paramname"><em>pil</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">time_t&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>seconds_east</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">begin</td><td>The start of the validity of the PIL will be stored here. </td></tr>
    <tr><td class="paramname">end</td><td>The end of the validity of the PIL will be stored here. </td></tr>
    <tr><td class="paramname">pil</td><td>Program Identification Label (PIL). </td></tr>
    <tr><td class="paramname">start</td><td>The most recently announced start time of the program. If zero the current system time will be used. </td></tr>
    <tr><td class="paramname">seconds_east</td><td>A time zone specified as an offset in seconds east of UTC, for example +1 * 60 * 60 for CET. <em>seconds_east</em> may include a daylight-saving time (DST) offset.</td></tr>
  </table>
  </dd>
</dl>
<p>This function calculates the validity time window of a PIL according to EN 300 231. That is the time window where a network can be expected to broadcast this PIL, usually from 00:00 on the same day until exclusive 04:00 on the next day.</p>
<p>Since PILs do not contain a year field, the year is determined from the <em>start</em> parameter, that is the most recently announced start time of the program or "AT-1" in EN 300 231 parlance. If <em>pil</em> contains a month more than five months after <em>start</em>, <em>pil</em> is assumed to refer to an earlier date than <em>start</em>.</p>
<p><em>pil</em> is assumed to be a time in the time zone specified by <em>seconds_east</em>. <em>start</em> will be converted to a local time in the same time zone to determine the correct year.</p>
<p>Teletext packet 8/30 format 2, VPS and DVB PDC descriptors give a PIL relative to the time zone of the intended audience of the program. An offset from UTC including the DST offset in effect at the specified date may be available on Teletext program announcement pages (see struct vbi_preselection). Another offset from UTC including the current DST offset is available as <code>VBI_EVENT_LOCAL_TIME</code>. But of course these offsets are insufficient to determine if DST is in effect at any given date, so the returned <em>begin</em> or <em>end</em> may be off by one hour if the validity window straddles a DST discontinuity.</p>
<p>If <em>pil</em> is <code>VBI_PIL_NSPV</code> this function ignores <em>seconds_east</em> and returns the same values as <a class="el" href="group__ProgramID.html#ga494bfcc0863e5cc9cbe8f9e213096ad1">vbi_pty_validity_window()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>On error the function returns <code>FALSE:</code> <ul>
<li><em>pil</em> is not <code>VBI_PIL_NSPV</code> and does not contain a valid date or time. February 29th is a valid date only if the estimated year is a leap year.</li>
<li><em>start</em> is zero and the current system time could not be determined.</li>
<li>The time specified by <em>pil</em>, <em>start</em> and <em>seconds_east</em> cannot be represented as a time_t value.</li>
</ul>
</dd></dl>
<dl class="section since"><dt>Since</dt><dd>0.2.34</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000011">Bug:</a></b></dt><dd>This function is not thread safe. That is a limitation of the C library which permits the conversion of a broken-down time in an arbitrary time zone only by setting the TZ environment variable. The function may also fail to restore the value of TZ if insufficient memory is available. </dd></dl>

<p>References <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1">VBI_PIL_CONTINUE</a>, <a class="el" href="group__ProgramID.html#ga138a4f95542c36527f6df6ee08094f2f">VBI_PIL_DAY</a>, <a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd">VBI_PIL_INHIBIT_TERMINATE</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4">VBI_PIL_INTERRUPTION</a>, <a class="el" href="group__ProgramID.html#gaae3974c3e680d42322edaad37b35ebcc">VBI_PIL_MONTH</a>, <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9">VBI_PIL_NSPV</a>, and <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d">VBI_PIL_TIMER_CONTROL</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>