libdvbpsi
1.1.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
src
tables
bat.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* bat.h
3
* Copyright (C) 2001-2011 VideoLAN
4
* $Id: bat.h $
5
*
6
* Authors: Zhu zhenglu <zhuzlu@gmail.com>
7
* heavily based on nit.h which was written by
8
* Johann Hanne
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
*****************************************************************************/
27
41
#ifndef _DVBPSI_BAT_H_
42
#define _DVBPSI_BAT_H_
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
48
/*****************************************************************************
49
* dvbpsi_bat_ts_t
50
*****************************************************************************/
62
typedef
struct
dvbpsi_bat_ts_s
63
{
64
uint16_t
i_ts_id
;
65
uint16_t
i_orig_network_id
;
67
dvbpsi_descriptor_t
*
p_first_descriptor
;
69
struct
dvbpsi_bat_ts_s
*
p_next
;
72
}
dvbpsi_bat_ts_t
;
73
74
75
/*****************************************************************************
76
* dvbpsi_bat_t
77
*****************************************************************************/
89
typedef
struct
dvbpsi_bat_s
90
{
91
uint8_t
i_table_id
;
92
uint16_t
i_extension
;
94
uint8_t
i_version
;
95
bool
b_current_next
;
97
dvbpsi_descriptor_t
*
p_first_descriptor
;
99
dvbpsi_bat_ts_t
*
p_first_ts
;
102
}
dvbpsi_bat_t
;
103
104
/*****************************************************************************
105
* dvbpsi_bat_callback
106
*****************************************************************************/
112
typedef
void (*
dvbpsi_bat_callback
)(
void
* p_cb_data,
dvbpsi_bat_t
* p_new_bat);
113
114
/*****************************************************************************
115
* dvbpsi_bat_attach
116
*****************************************************************************/
128
bool
dvbpsi_bat_attach
(
dvbpsi_t
*p_dvbpsi, uint8_t
i_table_id
, uint16_t
i_extension
,
129
dvbpsi_bat_callback
pf_callback,
void
* p_cb_data);
130
131
/*****************************************************************************
132
* dvbpsi_bat_detach
133
*****************************************************************************/
143
void
dvbpsi_bat_detach
(
dvbpsi_t
*p_dvbpsi, uint8_t
i_table_id
, uint16_t
i_extension
);
144
145
/*****************************************************************************
146
* dvbpsi_bat_init/dvbpsi_bat_new
147
*****************************************************************************/
159
void
dvbpsi_bat_init
(
dvbpsi_bat_t
*p_bat, uint8_t
i_table_id
, uint16_t
i_extension
,
160
uint8_t
i_version
,
bool
b_current_next
);
161
172
dvbpsi_bat_t
*
dvbpsi_bat_new
(uint8_t
i_table_id
, uint16_t
i_extension
,
173
uint8_t
i_version
,
bool
b_current_next
);
174
175
/*****************************************************************************
176
* dvbpsi_bat_empty/dvbpsi_bat_delete
177
*****************************************************************************/
184
void
dvbpsi_bat_empty
(
dvbpsi_bat_t
*p_bat);
185
192
void
dvbpsi_bat_delete
(
dvbpsi_bat_t
*p_bat);
193
194
/*****************************************************************************
195
* dvbpsi_bat_descriptor_add
196
*****************************************************************************/
209
dvbpsi_descriptor_t
*
dvbpsi_bat_bouquet_descriptor_add
(
dvbpsi_bat_t
* p_bat,
210
uint8_t i_tag, uint8_t i_length,
211
uint8_t* p_data);
212
213
/*****************************************************************************
214
* dvbpsi_bat_ts_add
215
*****************************************************************************/
227
dvbpsi_bat_ts_t
*
dvbpsi_bat_ts_add
(
dvbpsi_bat_t
* p_bat,
228
uint16_t
i_ts_id
, uint16_t i_orig_network_id);
229
230
/*****************************************************************************
231
* dvbpsi_bat_ts_descriptor_add
232
*****************************************************************************/
245
dvbpsi_descriptor_t
*
dvbpsi_bat_ts_descriptor_add
(
dvbpsi_bat_ts_t
*p_bat,
246
uint8_t i_tag, uint8_t i_length,
247
uint8_t *p_data);
248
249
/*****************************************************************************
250
* dvbpsi_bat_sections_generate
251
*****************************************************************************/
261
dvbpsi_psi_section_t
*
dvbpsi_bat_sections_generate
(
dvbpsi_t
*p_dvbpsi,
dvbpsi_bat_t
* p_bat);
262
263
#ifdef __cplusplus
264
};
265
#endif
266
267
#else
268
#error "Multiple inclusions of bat.h"
269
#endif
Generated on Sat May 25 2013 17:44:12 for libdvbpsi by
1.8.4