libdvbpsi  1.2.0
eit.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * eit.h
3  * Copyright (C) 2004-2011 VideoLAN
4  * $Id: eit.h 88 2004-02-24 14:31:18Z sam $
5  *
6  * Authors: Christophe Massiot <massiot@via.ecp.fr>
7  * Jean-Paul Saman <jpsaman@videolan.org>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  *****************************************************************************/
24 
34 #ifndef _DVBPSI_EIT_H_
35 #define _DVBPSI_EIT_H_
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /*****************************************************************************
42  * dvbpsi_eit_event_t
43  *****************************************************************************/
55 typedef struct dvbpsi_eit_event_s
56 {
57  uint16_t i_event_id;
58  uint64_t i_start_time;
59  uint32_t i_duration;
60  uint8_t i_running_status;
61  bool b_free_ca;
62  bool b_nvod;
72 
73 /*****************************************************************************
74  * dvbpsi_eit_t
75  *****************************************************************************/
87 typedef struct dvbpsi_eit_s
88 {
89  uint8_t i_table_id;
90  uint16_t i_extension;
92  uint8_t i_version;
94  uint16_t i_ts_id;
95  uint16_t i_network_id;
97  uint8_t i_last_table_id;
101 } dvbpsi_eit_t;
102 
103 /*****************************************************************************
104  * dvbpsi_eit_callback
105  *****************************************************************************/
110 typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit);
111 
112 /*****************************************************************************
113  * dvbpsi_AttachEIT
114  *****************************************************************************/
127 bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
128  dvbpsi_eit_callback pf_callback, void* p_cb_data);
129 
130 /*****************************************************************************
131  * dvbpsi_eit_detach
132  *****************************************************************************/
143 void dvbpsi_eit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
144 
145 /*****************************************************************************
146  * dvbpsi_eit_init/dvbpsi_eit_new
147  *****************************************************************************/
166 void dvbpsi_eit_init(dvbpsi_eit_t* p_eit, uint8_t i_table_id,
167  uint16_t i_extension, uint8_t i_version,
168  bool b_current_next, uint16_t i_ts_id, uint16_t i_network_id,
169  uint8_t i_segment_last_section_number,
170  uint8_t i_last_table_id);
171 
189  uint8_t i_version, bool b_current_next,
190  uint16_t i_ts_id, uint16_t i_network_id,
191  uint8_t i_segment_last_section_number,
192  uint8_t i_last_table_id);
193 
194 /*****************************************************************************
195  * dvbpsi_eit_empty/dvbpsi_eit_delete
196  *****************************************************************************/
203 void dvbpsi_eit_empty(dvbpsi_eit_t* p_eit);
204 
211 void dvbpsi_eit_delete(dvbpsi_eit_t* p_eit);
212 
213 /*****************************************************************************
214  * dvbpsi_eit_event_add
215  *****************************************************************************/
236  uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration,
237  uint8_t i_running_status, bool b_free_ca,
238  uint16_t i_event_descriptor_length);
239 
240 /*****************************************************************************
241  * dvbpsi_eit_nvod_event_add
242  *****************************************************************************/
259  uint16_t i_event_id, uint32_t i_duration, bool b_free_ca,
260  uint16_t i_event_descriptor_length);
261 
262 /*****************************************************************************
263  * dvbpsi_eit_event_descriptor_add
264  *****************************************************************************/
278  dvbpsi_eit_event_t* p_event,
279  uint8_t i_tag, uint8_t i_length,
280  uint8_t* p_data);
281 
282 /*****************************************************************************
283  * dvbpsi_eit_sections_generate
284  *****************************************************************************
285  * Generate EIT sections based on the dvbpsi_eit_t structure.
286  *****************************************************************************/
297  uint8_t i_table_id);
298 
299 #ifdef __cplusplus
300 };
301 #endif
302 
303 #else
304 #error "Multiple inclusions of eit.h"
305 #endif
306