libdvbpsi  1.2.0
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 
37 #ifndef _DVBPSI_TOT_H_
38 #define _DVBPSI_TOT_H_
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 /*****************************************************************************
45  * dvbpsi_tot_t
46  *****************************************************************************/
58 typedef struct dvbpsi_tot_s
59 {
60  uint8_t i_table_id;
61  uint16_t i_extension;
63  /* Subtable specific */
64  uint8_t i_version;
67  uint64_t i_utc_time;
71 } __attribute__((packed)) dvbpsi_tot_t;
72 
73 /*****************************************************************************
74  * dvbpsi_tot_callback
75  *****************************************************************************/
81 typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_tot);
82 
83 /*****************************************************************************
84  * dvbpsi_tot_attach
85  *****************************************************************************/
97 bool 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  *****************************************************************************/
111 void 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  *****************************************************************************/
129 void 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 
143 dvbpsi_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  *****************************************************************************/
155 void dvbpsi_tot_empty(dvbpsi_tot_t* p_tot);
156 
163 void 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  *****************************************************************************/
196 dvbpsi_psi_section_t* dvbpsi_tot_sections_generate(dvbpsi_t* p_dvbpsi, dvbpsi_tot_t* p_tot);
197 
198 #ifdef __cplusplus
199 };
200 #endif
201 
202 #else
203 #error "Multiple inclusions of tot.h"
204 #endif