libdvbpsi 1.3.2
tot.h
Go to the documentation of this file.
1/*****************************************************************************
2 * tot.h
3 * Copyright (C) 2001-2011 VideoLAN
4 * $Id$
5 *
6 * Authors: Johann Hanne
7 * heavily based on pmt.c which was written by
8 * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
9 * Jean-Paul Saman <jpsaman@videolan.org>
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 *
25 *****************************************************************************/
26
36
37#ifndef _DVBPSI_TOT_H_
38#define _DVBPSI_TOT_H_
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44/*****************************************************************************
45 * dvbpsi_tot_t
46 *****************************************************************************/
58typedef struct dvbpsi_tot_s
59{
60 uint8_t i_table_id;
61 uint16_t i_extension;
62
63 /* Subtable specific */
64 uint8_t i_version;
66
67 uint64_t i_utc_time;
68
70
71} __attribute__((packed)) dvbpsi_tot_t;
72
73/*****************************************************************************
74 * dvbpsi_tot_callback
75 *****************************************************************************/
81typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_tot);
82
83/*****************************************************************************
84 * dvbpsi_tot_attach
85 *****************************************************************************/
97bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
98 dvbpsi_tot_callback pf_callback, void* p_cb_data);
99
100/*****************************************************************************
101 * dvbpsi_tot_detach
102 *****************************************************************************/
111void dvbpsi_tot_detach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
112 uint16_t i_extension);
113
114/*****************************************************************************
115 * dvbpsi_tot_init/dvbpsi_tot_new
116 *****************************************************************************/
129void dvbpsi_tot_init(dvbpsi_tot_t* p_tot, uint8_t i_table_id, uint16_t i_extension,
130 uint8_t i_version, bool b_current_next, uint64_t i_utc_time);
131
143dvbpsi_tot_t *dvbpsi_tot_new(uint8_t i_table_id, uint16_t i_extension, uint8_t i_version,
144 bool b_current_next, uint64_t i_utc_time);
145
146/*****************************************************************************
147 * dvbpsi_tot_empty/dvbpsi_tot_delete
148 *****************************************************************************/
155void dvbpsi_tot_empty(dvbpsi_tot_t* p_tot);
156
163void dvbpsi_tot_delete(dvbpsi_tot_t* p_tot);
164
165/*****************************************************************************
166 * dvbpsi_tot_descriptor_add
167 *****************************************************************************/
181 uint8_t i_tag, uint8_t i_length,
182 uint8_t* p_data);
183
184/*****************************************************************************
185 * dvbpsi_tot_sections_generate
186 *****************************************************************************/
197
198#ifdef __cplusplus
199};
200#endif
201
202#else
203#error "Multiple inclusions of tot.h"
204#endif
struct dvbpsi_descriptor_s dvbpsi_descriptor_t
dvbpsi_descriptor_t type definition.
struct dvbpsi_psi_section_s dvbpsi_psi_section_t
dvbpsi_psi_section_t type definition.
Definition dvbpsi.h:209
struct dvbpsi_s dvbpsi_t
DVBPSI handle structure abstration.
Definition dvbpsi.h:66
uint8_t i_table_id
Definition sis.h:1
uint8_t i_version
Definition sis.h:5
bool b_current_next
Definition sis.h:8
uint16_t i_extension
Definition sis.h:2
TDT/TOT structure.
Definition tot.h:59
uint8_t i_table_id
Definition tot.h:60
bool b_current_next
Definition tot.h:65
dvbpsi_descriptor_t * p_first_descriptor
Definition tot.h:69
uint8_t i_version
Definition tot.h:64
uint16_t i_extension
Definition tot.h:61
uint64_t i_utc_time
Definition tot.h:67
void(* dvbpsi_tot_callback)(void *p_cb_data, dvbpsi_tot_t *p_new_tot)
Callback type definition.
Definition tot.h:81
void dvbpsi_tot_empty(dvbpsi_tot_t *p_tot)
Clean a dvbpsi_tot_t structure.
uint64_t i_utc_time
Definition tot.h:7
dvbpsi_tot_t * dvbpsi_tot_new(uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint64_t i_utc_time)
Allocate and initialize a new dvbpsi_tot_t structure.
void dvbpsi_tot_delete(dvbpsi_tot_t *p_tot)
Clean and free a dvbpsi_tot_t structure.
dvbpsi_psi_section_t * dvbpsi_tot_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_tot_t *p_tot)
TDT/TOT generator.
void dvbpsi_tot_init(dvbpsi_tot_t *p_tot, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint64_t i_utc_time)
Initialize a user-allocated dvbpsi_tot_t structure.
bool dvbpsi_tot_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_tot_callback pf_callback, void *p_cb_data)
Creation and initialization of a TDT/TOT decoder.
dvbpsi_descriptor_t * dvbpsi_tot_descriptor_add(dvbpsi_tot_t *p_tot, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the TOT.
void dvbpsi_tot_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a TDT/TOT decoder.