libdvbpsi 1.3.2
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
35
36#ifndef _DVBPSI_NIT_H_
37#define _DVBPSI_NIT_H_
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/*****************************************************************************
44 * dvbpsi_nit_ts_t
45 *****************************************************************************/
68
69/*****************************************************************************
70 * dvbpsi_nit_t
71 *****************************************************************************/
97
98/*****************************************************************************
99 * dvbpsi_nit_callback
100 *****************************************************************************/
106typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_nit);
107
108/*****************************************************************************
109 * dvbpsi_nit_attach
110 *****************************************************************************/
122bool 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 *****************************************************************************/
137void 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 *****************************************************************************/
155void 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 *****************************************************************************/
184
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
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
void dvbpsi_nit_init(dvbpsi_nit_t *p_nit, uint8_t i_table_id, uint16_t i_extension, uint16_t i_network_id, uint8_t i_version, bool b_current_next)
Initialize a user-allocated dvbpsi_nit_t structure.
void dvbpsi_nit_delete(dvbpsi_nit_t *p_nit)
Clean and free a dvbpsi_nit_t structure.
struct dvbpsi_nit_s dvbpsi_nit_t
dvbpsi_nit_t type definition.
dvbpsi_nit_ts_t * dvbpsi_nit_ts_add(dvbpsi_nit_t *p_nit, uint16_t i_ts_id, uint16_t i_orig_network_id)
Add an TS in the NIT.
dvbpsi_descriptor_t * dvbpsi_nit_descriptor_add(dvbpsi_nit_t *p_nit, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the NIT.
void dvbpsi_nit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a NIT decoder.
void(* dvbpsi_nit_callback)(void *p_cb_data, dvbpsi_nit_t *p_new_nit)
Callback type definition.
Definition nit.h:106
void dvbpsi_nit_empty(dvbpsi_nit_t *p_nit)
Clean a dvbpsi_nit_t structure.
struct dvbpsi_nit_ts_s dvbpsi_nit_ts_t
dvbpsi_nit_ts_t type definition.
dvbpsi_descriptor_t * dvbpsi_nit_ts_descriptor_add(dvbpsi_nit_ts_t *p_ts, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
Add a descriptor in the NIT TS.
dvbpsi_psi_section_t * dvbpsi_nit_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_nit_t *p_nit, uint8_t i_table_id)
NIT generator.
bool dvbpsi_nit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_nit_callback pf_callback, void *p_cb_data)
Creation and initialization of a NIT decoder. It is attached to p_dvbpsi.
dvbpsi_nit_t * dvbpsi_nit_new(uint8_t i_table_id, uint16_t i_extension, uint16_t i_network_id, uint8_t i_version, bool b_current_next)
Allocate and initialize a new dvbpsi_nit_t structure.
uint8_t i_table_id
Definition sis.h:1
uint8_t i_version
Definition sis.h:5
uint16_t i_ts_id
Definition sis.h:4
bool b_current_next
Definition sis.h:8
uint16_t i_extension
Definition sis.h:2
NIT structure.
Definition nit.h:84
uint8_t i_table_id
Definition nit.h:85
uint16_t i_network_id
Definition nit.h:88
uint16_t i_extension
Definition nit.h:86
dvbpsi_nit_ts_t * p_first_ts
Definition nit.h:94
bool b_current_next
Definition nit.h:90
dvbpsi_descriptor_t * p_first_descriptor
Definition nit.h:92
uint8_t i_version
Definition nit.h:89
NIT TS structure.
Definition nit.h:58
uint16_t i_orig_network_id
Definition nit.h:60
struct dvbpsi_nit_ts_s * p_next
Definition nit.h:64
dvbpsi_descriptor_t * p_first_descriptor
Definition nit.h:62
uint16_t i_ts_id
Definition nit.h:59