libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
atsc_eit.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2006 Adam Charrett
3 
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8 
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13 
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 
18 eit.h
19 
20 */
21 
28 #ifndef _ATSC_EIT_H
29 #define _ATSC_EIT_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /*****************************************************************************
36  * dvbpsi_atsc_eit_event_t
37  *****************************************************************************/
49 {
50  uint16_t i_event_id;
51  uint32_t i_start_time;
52  uint8_t i_etm_location;
53  uint32_t i_length_seconds;
54  uint8_t i_title_length;
55  uint8_t i_title[256];
62 
63 /*****************************************************************************
64  * dvbpsi_atsc_eit_t
65  *****************************************************************************/
76 typedef struct dvbpsi_atsc_eit_s
77 {
78  uint8_t i_table_id;
79  uint16_t i_extension;
81  uint8_t i_version;
83  uint16_t i_source_id;
84  uint8_t i_protocol;
90 
91 /*****************************************************************************
92  * dvbpsi_eit_callback
93  *****************************************************************************/
99 typedef void (* dvbpsi_atsc_eit_callback)(void* p_priv, dvbpsi_atsc_eit_t* p_new_eit);
100 
101 /*****************************************************************************
102  * dvbpsi_atsc_eit_attach
103  *****************************************************************************/
116 bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
117  dvbpsi_atsc_eit_callback pf_callback, void* p_priv);
118 
128 __attribute__((deprecated,unused))
129 inline bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
130  dvbpsi_atsc_eit_callback pf_callback, void* p_priv)
131 {
132  return dvbpsi_atsc_eit_attach(p_dvbpsi, i_table_id, i_extension,
133  pf_callback, p_priv);
134 }
135 
136 /*****************************************************************************
137  * dvbpsi_atsc_eit_detach
138  *****************************************************************************/
148 void dvbpsi_atsc_eit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
149 
157 __attribute__((deprecated,unused))
158 inline void dvbpsi_atsc_DetachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
159 {
160  dvbpsi_atsc_eit_detach(p_dvbpsi, i_table_id, i_extension);
161 }
162 
163 /*****************************************************************************
164  * dvbpsi_atsc_eit_init
165  *****************************************************************************/
180 void dvbpsi_atsc_eit_init(dvbpsi_atsc_eit_t* p_eit, uint8_t i_table_id, uint16_t i_extension,
181  uint8_t i_version, uint8_t i_protocol, uint16_t i_source_id, bool b_current_next);
182 
194 __attribute__((deprecated,unused))
195 inline void dvbpsi_atsc_InitEIT(dvbpsi_atsc_eit_t* p_eit, uint8_t i_table_id, uint16_t i_extension,
196  uint8_t i_version, uint8_t i_protocol, uint16_t i_source_id, bool b_current_next)
197 {
198  dvbpsi_atsc_eit_init(p_eit, i_table_id, i_extension, i_version,
199  i_protocol, i_source_id, b_current_next);
200 }
201 
202 /*****************************************************************************
203  * dvbpsi_atsc_eit_new
204  *****************************************************************************/
218 dvbpsi_atsc_eit_t *dvbpsi_atsc_eit_new(uint8_t i_table_id, uint16_t i_extension,
219  uint8_t i_version, uint8_t i_protocol,
220  uint16_t i_source_id, bool b_current_next);
221 
232 __attribute__((deprecated,unused))
233 inline dvbpsi_atsc_eit_t *dvbpsi_atsc_NewEIT(uint8_t i_table_id, uint16_t i_extension,
234  uint8_t i_version, uint8_t i_protocol,
235  uint16_t i_source_id, bool b_current_next)
236 {
237  return dvbpsi_atsc_eit_new(i_table_id, i_extension,
238  i_version, i_protocol,
239  i_source_id, b_current_next);
240 }
241 
242 /*****************************************************************************
243  * dvbpsi_atsc_eit_empty
244  *****************************************************************************/
252 
257 __attribute__((deprecated,unused))
258 inline void dvbpsi_atsc_EmptyEIT(dvbpsi_atsc_eit_t *p_eit)
259 {
260  dvbpsi_atsc_eit_empty(p_eit);
261 }
262 
263 /*****************************************************************************
264  * dvbpsi_atsc_eit_delete
265  *****************************************************************************/
273 
278 __attribute__((deprecated,unused))
279 inline void dvbpsi_atsc_DeleteEIT(dvbpsi_atsc_eit_t *p_eit)
280 {
281  dvbpsi_atsc_eit_delete(p_eit);
282 }
283 
284 #ifdef __cplusplus
285 };
286 #endif
287 
288 #endif
void dvbpsi_atsc_eit_delete(dvbpsi_atsc_eit_t *p_eit)
Clean and free a dvbpsi_eit_t structure.
dvbpsi_atsc_eit_t * dvbpsi_atsc_eit_new(uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, uint8_t i_protocol, uint16_t i_source_id, bool b_current_next)
Allocate and initialize a new dvbpsi_eit_t structure. Use ObjectRefDec to delete it.
void dvbpsi_atsc_eit_init(dvbpsi_atsc_eit_t *p_eit, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, uint8_t i_protocol, uint16_t i_source_id, bool b_current_next)
Initialize a user-allocated dvbpsi_atsc_eit_t structure.
__attribute__((deprecated, unused)) inline bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi
dvbpsi_atsc_AttachEIT is deprecated use
Definition: atsc_eit.h:257
struct dvbpsi_atsc_eit_s dvbpsi_atsc_eit_t
dvbpsi_atsc_eit_t type definition.
void dvbpsi_atsc_eit_empty(dvbpsi_atsc_eit_t *p_eit)
Clean a dvbpsi_eit_t structure.
void(* dvbpsi_atsc_eit_callback)(void *p_priv, dvbpsi_atsc_eit_t *p_new_eit)
Callback type definition.
Definition: atsc_eit.h:99
void dvbpsi_atsc_eit_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a EIT decoder.
struct dvbpsi_atsc_eit_event_s dvbpsi_atsc_eit_event_t
dvbpsi_atsc_eit_event_t type definition.
ATSC EIT Event structure.
Definition: atsc_eit.h:49
struct dvbpsi_atsc_eit_event_s * p_next
Definition: atsc_eit.h:59
uint8_t i_title[256]
Definition: atsc_eit.h:55
uint32_t i_start_time
Definition: atsc_eit.h:51
dvbpsi_descriptor_t * p_first_descriptor
Definition: atsc_eit.h:57
uint16_t i_event_id
Definition: atsc_eit.h:50
uint32_t i_length_seconds
Definition: atsc_eit.h:53
uint8_t i_etm_location
Definition: atsc_eit.h:52
uint8_t i_title_length
Definition: atsc_eit.h:54
ATSC EIT structure.
Definition: atsc_eit.h:77
uint8_t i_protocol
Definition: atsc_eit.h:84
bool b_current_next
Definition: atsc_eit.h:82
uint8_t i_table_id
Definition: atsc_eit.h:78
dvbpsi_atsc_eit_event_t * p_first_event
Definition: atsc_eit.h:86
uint16_t i_source_id
Definition: atsc_eit.h:83
uint16_t i_extension
Definition: atsc_eit.h:79
uint8_t i_version
Definition: atsc_eit.h:81
dvbpsi_descriptor_t * p_first_descriptor
Definition: atsc_eit.h:88
Descriptor structure.
Definition: descriptor.h:83
DVBPSI handle structure.
Definition: dvbpsi.h:143