/usr/share/doc/libzvbi-doc/html/group__ProgramID.html is in libzvbi-doc 0.2.35-13.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | <!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<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
 <span id="projectnumber">0.2.35</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<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  </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"> </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"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga749715601c404fe3fb1d6273c950e9df">VBI_PIL</a>(month, day, hour, minute)   (((day) << 15) | ((month) << 11) | ((hour) << 6) | (minute))</td></tr>
<tr class="memdesc:ga749715601c404fe3fb1d6273c950e9df"><td class="mdescLeft"> </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"> </td></tr>
<tr class="memitem:gaae3974c3e680d42322edaad37b35ebcc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaae3974c3e680d42322edaad37b35ebcc">VBI_PIL_MONTH</a>(pil)   (((pil) >> 11) & 15)</td></tr>
<tr class="separator:gaae3974c3e680d42322edaad37b35ebcc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga138a4f95542c36527f6df6ee08094f2f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga138a4f95542c36527f6df6ee08094f2f">VBI_PIL_DAY</a>(pil)   (((pil) >> 15) & 31)</td></tr>
<tr class="separator:ga138a4f95542c36527f6df6ee08094f2f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga78d71b2b88dd3729e5364f6061000ebf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga78d71b2b88dd3729e5364f6061000ebf">VBI_PIL_HOUR</a>(pil)   (((pil) >> 6) & 31)</td></tr>
<tr class="separator:ga78d71b2b88dd3729e5364f6061000ebf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaacada356d88add876dc7484892231e73"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#gaacada356d88add876dc7484892231e73">VBI_PIL_MINUTE</a>(pil)   ((pil) & 63)</td></tr>
<tr class="separator:gaacada356d88add876dc7484892231e73"><td class="memSeparator" colspan="2"> </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 </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"> </td><td class="mdescRight">Program Identification Label. <a href="#ga870eeecedc6aed609b9f53d4dbe0f6c7">More...</a><br /></td></tr>
<tr class="separator:ga870eeecedc6aed609b9f53d4dbe0f6c7"><td class="memSeparator" colspan="2"> </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  </td><td class="memItemRight" valign="bottom">{ <br />
  <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d">VBI_PIL_TIMER_CONTROL</a> = VBI_PIL (15, 0, 31, 63),
<br />
  <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd">VBI_PIL_INHIBIT_TERMINATE</a> = VBI_PIL (15, 0, 30, 63),
<br />
  <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4">VBI_PIL_INTERRUPTION</a> = VBI_PIL (15, 0, 29, 63),
<br />
  <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1">VBI_PIL_CONTINUE</a> = VBI_PIL (15, 0, 28, 63),
<br />
  <a class="el" href="group__ProgramID.html#gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9">VBI_PIL_NSPV</a> = VBI_PIL (15, 15, 31, 63),
<br />
  <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"> </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"> </td></tr>
<tr class="memitem:ga289ec10e87cef7655799144bc898f262"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga289ec10e87cef7655799144bc898f262">vbi_pid_channel</a> { <br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a51a53db4366781f100d5d02836d6452e">VBI_PID_CHANNEL_LCI_0</a> = 0,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262afdd62439879c03c78fce236bf7dcc081">VBI_PID_CHANNEL_LCI_1</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262ac9a4d6e6932f0f4fd2a19f71f07f4447">VBI_PID_CHANNEL_LCI_2</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a969d34250cbd4e60539740cc4f3398f1">VBI_PID_CHANNEL_LCI_3</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a232efb61f9f576d83a778ad18b90e296">VBI_PID_CHANNEL_VPS</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a9ac263afbaf6fee07902a8ad757c928e">VBI_PID_CHANNEL_PDC_DESCRIPTOR</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262afc0136ef197f37d06ba1a93bdf828024">VBI_PID_CHANNEL_XDS_CURRENT</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a22b0667766d14757d7819f00cb7b2ff7">VBI_PID_CHANNEL_XDS_FUTURE</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga289ec10e87cef7655799144bc898f262a4d686ec8bbbcbac78fb4526374cecb01">VBI_MAX_PID_CHANNELS</a>
<br />
}<tr class="memdesc:ga289ec10e87cef7655799144bc898f262"><td class="mdescLeft"> </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"> </td></tr>
<tr class="memitem:ga64267f70a2cef8c8557d82c9cd85563f"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramID.html#ga64267f70a2cef8c8557d82c9cd85563f">vbi_pcs_audio</a> { <br />
  <a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa5994f0d2781ca031198bcda8c23d59bf">VBI_PCS_AUDIO_UNKNOWN</a> = 0,
<br />
  <a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa494fe015c2497742fc4b1f70a27de49d">VBI_PCS_AUDIO_MONO</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563fa7e3d3e9c70bc5e28c44601e8c3d44b2f">VBI_PCS_AUDIO_STEREO</a>,
<br />
  <a class="el" href="group__ProgramID.html#gga64267f70a2cef8c8557d82c9cd85563faf571f5caa5f9a68476eada594d322ffc">VBI_PCS_AUDIO_BILINGUAL</a>
<br />
}<tr class="memdesc:ga64267f70a2cef8c8557d82c9cd85563f"><td class="mdescLeft"> </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"> </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 </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"> </td></tr>
<tr class="memitem:gaf4a0271a359ada115e66bcd0612bd184"><td class="memItemLeft" align="right" valign="top">time_t </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"> </td></tr>
<tr class="memitem:gae29384d60da1db037cc029bd97fcdd5d"><td class="memItemLeft" align="right" valign="top">time_t </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"> </td></tr>
<tr class="memitem:ga494bfcc0863e5cc9cbe8f9e213096ad1"><td class="memItemLeft" align="right" valign="top">vbi_bool </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"> </td></tr>
<tr class="memitem:gac256d7e11100b73967b68cd90d578b0e"><td class="memItemLeft" align="right" valign="top">vbi_bool </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"> </td></tr>
<tr class="memitem:gaa366a729fc2d72127baf3991e91a3f31"><td class="memItemLeft" align="right" valign="top">vbi_bool </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"> </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 id="ga749715601c404fe3fb1d6273c950e9df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga749715601c404fe3fb1d6273c950e9df">§ </a></span>VBI_PIL</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VBI_PIL</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">month, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">day, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">hour, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">minute </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>   (((day) << 15) | ((month) << 11) | ((hour) << 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 id="gaae3974c3e680d42322edaad37b35ebcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaae3974c3e680d42322edaad37b35ebcc">§ </a></span>VBI_PIL_MONTH</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VBI_PIL_MONTH</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">pil</td><td>)</td>
<td>   (((pil) >> 11) & 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 id="ga138a4f95542c36527f6df6ee08094f2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga138a4f95542c36527f6df6ee08094f2f">§ </a></span>VBI_PIL_DAY</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VBI_PIL_DAY</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">pil</td><td>)</td>
<td>   (((pil) >> 15) & 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 id="ga78d71b2b88dd3729e5364f6061000ebf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga78d71b2b88dd3729e5364f6061000ebf">§ </a></span>VBI_PIL_HOUR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VBI_PIL_HOUR</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">pil</td><td>)</td>
<td>   (((pil) >> 6) & 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 id="gaacada356d88add876dc7484892231e73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaacada356d88add876dc7484892231e73">§ </a></span>VBI_PIL_MINUTE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define VBI_PIL_MINUTE</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">pil</td><td>)</td>
<td>   ((pil) & 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 id="ga870eeecedc6aed609b9f53d4dbe0f6c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga870eeecedc6aed609b9f53d4dbe0f6c7">§ </a></span>vbi_pil</h2>
<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 id="ga05589fbab0657f08285ebdfe93f5ec9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga05589fbab0657f08285ebdfe93f5ec9e">§ </a></span>anonymous enum</h2>
<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 id="gga05589fbab0657f08285ebdfe93f5ec9eae7cbef095ebb79470785785bebdb2f8d"></a>VBI_PIL_TIMER_CONTROL </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 id="gga05589fbab0657f08285ebdfe93f5ec9eaad30c6505f26ef2b6e26626afdff02dd"></a>VBI_PIL_INHIBIT_TERMINATE </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 id="gga05589fbab0657f08285ebdfe93f5ec9ea835908e1f719f7761589ac1f3b968cb4"></a>VBI_PIL_INTERRUPTION </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 id="gga05589fbab0657f08285ebdfe93f5ec9ea4084b4cb78ad4667f7645101adebb3e1"></a>VBI_PIL_CONTINUE </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 id="gga05589fbab0657f08285ebdfe93f5ec9eac9b7c435e58a2f76a87f1acb221630f9"></a>VBI_PIL_NSPV </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 id="gga05589fbab0657f08285ebdfe93f5ec9ea6e6335917a64f23fc354338b033136a8"></a>VBI_PIL_END </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 id="ga289ec10e87cef7655799144bc898f262"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga289ec10e87cef7655799144bc898f262">§ </a></span>vbi_pid_channel</h2>
<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 id="gga289ec10e87cef7655799144bc898f262a51a53db4366781f100d5d02836d6452e"></a>VBI_PID_CHANNEL_LCI_0 </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 id="gga289ec10e87cef7655799144bc898f262afdd62439879c03c78fce236bf7dcc081"></a>VBI_PID_CHANNEL_LCI_1 </td><td class="fielddoc"><p>Data from Teletext packet 8/30 format 2, Label Channel 1. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga289ec10e87cef7655799144bc898f262ac9a4d6e6932f0f4fd2a19f71f07f4447"></a>VBI_PID_CHANNEL_LCI_2 </td><td class="fielddoc"><p>Data from Teletext packet 8/30 format 2, Label Channel 2. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga289ec10e87cef7655799144bc898f262a969d34250cbd4e60539740cc4f3398f1"></a>VBI_PID_CHANNEL_LCI_3 </td><td class="fielddoc"><p>Data from Teletext packet 8/30 format 2, Label Channel 3. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga289ec10e87cef7655799144bc898f262a232efb61f9f576d83a778ad18b90e296"></a>VBI_PID_CHANNEL_VPS </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 id="gga289ec10e87cef7655799144bc898f262a9ac263afbaf6fee07902a8ad757c928e"></a>VBI_PID_CHANNEL_PDC_DESCRIPTOR </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 id="gga289ec10e87cef7655799144bc898f262afc0136ef197f37d06ba1a93bdf828024"></a>VBI_PID_CHANNEL_XDS_CURRENT </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 id="gga289ec10e87cef7655799144bc898f262a22b0667766d14757d7819f00cb7b2ff7"></a>VBI_PID_CHANNEL_XDS_FUTURE </td><td class="fielddoc"><p>Data from an XDS Future Program ID packet. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga289ec10e87cef7655799144bc898f262a4d686ec8bbbcbac78fb4526374cecb01"></a>VBI_MAX_PID_CHANNELS </td><td class="fielddoc"><p>Note this value may change. </p>
</td></tr>
</table>
</div>
</div>
<a id="ga64267f70a2cef8c8557d82c9cd85563f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64267f70a2cef8c8557d82c9cd85563f">§ </a></span>vbi_pcs_audio</h2>
<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 id="gga64267f70a2cef8c8557d82c9cd85563fa5994f0d2781ca031198bcda8c23d59bf"></a>VBI_PCS_AUDIO_UNKNOWN </td><td class="fielddoc"><p>Nothing known about audio channels. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga64267f70a2cef8c8557d82c9cd85563fa494fe015c2497742fc4b1f70a27de49d"></a>VBI_PCS_AUDIO_MONO </td><td class="fielddoc"><p>Mono audio is broadcast. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga64267f70a2cef8c8557d82c9cd85563fa7e3d3e9c70bc5e28c44601e8c3d44b2f"></a>VBI_PCS_AUDIO_STEREO </td><td class="fielddoc"><p>Stereo audio. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga64267f70a2cef8c8557d82c9cd85563faf571f5caa5f9a68476eada594d322ffc"></a>VBI_PCS_AUDIO_BILINGUAL </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 id="gab4bd9f39f2540cf6e92d2ee13e27ef91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab4bd9f39f2540cf6e92d2ee13e27ef91">§ </a></span>vbi_pil_is_valid_date()</h2>
<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> </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 id="gaf4a0271a359ada115e66bcd0612bd184"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf4a0271a359ada115e66bcd0612bd184">§ </a></span>vbi_pil_to_time()</h2>
<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> </td>
<td class="paramname"><em>pil</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tz</em> </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 id="gae29384d60da1db037cc029bd97fcdd5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae29384d60da1db037cc029bd97fcdd5d">§ </a></span>vbi_pil_lto_to_time()</h2>
<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> </td>
<td class="paramname"><em>pil</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>seconds_east</em> </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 id="ga494bfcc0863e5cc9cbe8f9e213096ad1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga494bfcc0863e5cc9cbe8f9e213096ad1">§ </a></span>vbi_pty_validity_window()</h2>
<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 * </td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t * </td>
<td class="paramname"><em>end</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t </td>
<td class="paramname"><em>last_transm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tz</em> </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 (>= 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 id="gac256d7e11100b73967b68cd90d578b0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac256d7e11100b73967b68cd90d578b0e">§ </a></span>vbi_pil_validity_window()</h2>
<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 * </td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t * </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> </td>
<td class="paramname"><em>pil</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tz</em> </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 id="gaa366a729fc2d72127baf3991e91a3f31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa366a729fc2d72127baf3991e91a3f31">§ </a></span>vbi_pil_lto_validity_window()</h2>
<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 * </td>
<td class="paramname"><em>begin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t * </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> </td>
<td class="paramname"><em>pil</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">time_t </td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>seconds_east</em> </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  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>
|