libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
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_priv, 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_priv);
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
__attribute__((deprecated, unused)) bool dvbpsi_AttachDemux(dvbpsi_t *p_dvbpsi
dvbpsi_atsc_DetachEIT is deprecated use
Definition: atsc_eit.h:257
Descriptor structure.
Definition: descriptor.h:83
PSI section structure.
Definition: psi.h:69
DVBPSI handle structure.
Definition: dvbpsi.h:143
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
uint8_t i_table_id
Definition: tot.h:0
uint8_t i_version
Definition: tot.h:4
void dvbpsi_tot_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a TDT/TOT decoder.
void dvbpsi_tot_empty(dvbpsi_tot_t *p_tot)
Clean a dvbpsi_tot_t structure.
uint64_t i_utc_time
Definition: tot.h:7
bool b_current_next
Definition: tot.h:5
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.
uint16_t i_extension
Definition: tot.h:1
bool dvbpsi_tot_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_tot_callback pf_callback, void *p_priv)
Creation and initialization of a TDT/TOT decoder.
void dvbpsi_tot_delete(dvbpsi_tot_t *p_tot)
Clean and free a dvbpsi_tot_t structure.
void(* dvbpsi_tot_callback)(void *p_priv, dvbpsi_tot_t *p_new_tot)
Callback type definition.
Definition: tot.h:81
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.
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.