libdvbpsi  1.2.0
nit.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * nit.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 #ifndef _DVBPSI_NIT_H_
37 #define _DVBPSI_NIT_H_
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /*****************************************************************************
44  * dvbpsi_nit_ts_t
45  *****************************************************************************/
57 typedef struct dvbpsi_nit_ts_s
58 {
59  uint16_t i_ts_id;
60  uint16_t i_orig_network_id;
68 
69 /*****************************************************************************
70  * dvbpsi_nit_t
71  *****************************************************************************/
83 typedef struct dvbpsi_nit_s
84 {
85  uint8_t i_table_id;
86  uint16_t i_extension;
88  uint16_t i_network_id;
89  uint8_t i_version;
96 } dvbpsi_nit_t;
97 
98 /*****************************************************************************
99  * dvbpsi_nit_callback
100  *****************************************************************************/
106 typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_nit);
107 
108 /*****************************************************************************
109  * dvbpsi_nit_attach
110  *****************************************************************************/
122 bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
123  dvbpsi_nit_callback pf_callback, void* p_cb_data);
124 
125 /*****************************************************************************
126  * dvbpsi_nit_detach
127  *****************************************************************************/
137 void dvbpsi_nit_detach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
138  uint16_t i_extension);
139 
140 /*****************************************************************************
141  * dvbpsi_nit_init/dvbpsi_nit_new
142  *****************************************************************************/
155 void dvbpsi_nit_init(dvbpsi_nit_t* p_nit, uint8_t i_table_id, uint16_t i_extension,
156  uint16_t i_network_id, uint8_t i_version, bool b_current_next);
157 
171  uint16_t i_network_id, uint8_t i_version,
172  bool b_current_next);
173 
174 /*****************************************************************************
175  * dvbpsi_nit_empty/dvbpsi_nit_delete
176  *****************************************************************************/
183 void dvbpsi_nit_empty(dvbpsi_nit_t* p_nit);
184 
191 void dvbpsi_nit_delete(dvbpsi_nit_t *p_nit);
192 
193 /*****************************************************************************
194  * dvbpsi_nit_descriptor_add
195  *****************************************************************************/
209  uint8_t i_tag, uint8_t i_length,
210  uint8_t *p_data);
211 
212 /*****************************************************************************
213  * dvbpsi_nit_ts_add
214  *****************************************************************************/
225  uint16_t i_ts_id, uint16_t i_orig_network_id);
226 
227 /*****************************************************************************
228  * dvbpsi_nit_ts_descriptor_add
229  *****************************************************************************/
243  uint8_t i_tag, uint8_t i_length,
244  uint8_t* p_data);
245 
246 /*****************************************************************************
247  * dvbpsi_nit_sections_generate
248  *****************************************************************************/
261  uint8_t i_table_id);
262 
263 #ifdef __cplusplus
264 };
265 #endif
266 
267 #else
268 #error "Multiple inclusions of nit.h"
269 #endif
270