libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
atsc_ett.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 ett.h
19 
20 */
21 
28 #ifndef _ATSC_ETT_H
29 #define _ATSC_ETT_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /*****************************************************************************
36  * dvbpsi_atsc_ett_t
37  *****************************************************************************/
55 typedef struct dvbpsi_atsc_ett_s
56 {
57  /* general PSI table */
58  uint8_t i_table_id;
59  uint16_t i_extension;
63  uint8_t i_version;
65  uint8_t i_protocol;
67  /* ETT specific */
68  uint32_t i_etm_id;
71  uint32_t i_etm_length;
72  uint8_t *p_etm_data;
77 
78 /*****************************************************************************
79  * dvbpsi_atsc_ett_callback
80  *****************************************************************************/
86 typedef void (* dvbpsi_atsc_ett_callback)(void* p_priv, dvbpsi_atsc_ett_t* p_new_ett);
87 
88 /*****************************************************************************
89  * dvbpsi_atsc_ett_attach
90  *****************************************************************************/
103 bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
104  dvbpsi_atsc_ett_callback pf_callback, void* p_priv);
105 
115 __attribute__((deprecated,unused))
116 inline bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
117  dvbpsi_atsc_ett_callback pf_callback, void* p_priv)
118 {
119  return dvbpsi_atsc_ett_attach(p_dvbpsi, i_table_id, i_extension,
120  pf_callback, p_priv);
121 }
122 
123 /*****************************************************************************
124  * dvbpsi_atsc_ett_detach
125  *****************************************************************************/
135 void dvbpsi_atsc_ett_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
136  uint16_t i_extension);
137 
145 __attribute__((deprecated,unused))
146 inline void dvbpsi_atsc_DetachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
147  uint16_t i_extension)
148 {
149  dvbpsi_atsc_ett_detach(p_dvbpsi, i_table_id, i_extension);
150 }
151 
152 /*****************************************************************************
153  * dvbpsi_atsc_ett_init
154  *****************************************************************************/
168 void dvbpsi_atsc_ett_init(dvbpsi_atsc_ett_t *p_ett, uint8_t i_table_id, uint16_t i_extension,
169  uint8_t i_version, uint8_t i_protocol,
170  uint32_t i_etm_id, bool b_current_next);
171 
183 __attribute__((deprecated,unused))
184 inline void dvbpsi_atsc_InitETT(dvbpsi_atsc_ett_t *p_ett, uint8_t i_table_id, uint16_t i_extension,
185  uint8_t i_version, uint8_t i_protocol,
186  uint32_t i_etm_id, bool b_current_next)
187 {
188  dvbpsi_atsc_ett_init(p_ett, i_table_id, i_extension, i_version, i_protocol,
189  i_etm_id, b_current_next);
190 }
191 
192 /*****************************************************************************
193  * dvbpsi_atsc_ett_new
194  *****************************************************************************/
208 dvbpsi_atsc_ett_t *dvbpsi_atsc_ett_new(uint8_t i_table_id, uint16_t i_extension,
209  uint8_t i_version, uint8_t i_protocol,
210  uint32_t i_etm_id, bool b_current_next);
211 
222 __attribute__((deprecated,unused))
223 inline dvbpsi_atsc_ett_t *dvbpsi_atsc_NewETT(uint8_t i_table_id, uint16_t i_extension,
224  uint8_t i_version, uint8_t i_protocol,
225  uint32_t i_etm_id, bool b_current_next)
226 {
227  return dvbpsi_atsc_ett_new(i_table_id, i_extension, i_version, i_protocol,
228  i_etm_id, b_current_next);
229 }
230 
231 /*****************************************************************************
232  * dvbpsi_atsc_ett_empty
233  *****************************************************************************/
241 
247 __attribute__((deprecated,unused))
248 inline void dvbpsi_atsc_EmptyETT(dvbpsi_atsc_ett_t *p_ett)
249 {
250  dvbpsi_atsc_ett_empty(p_ett);
251 }
252 
253 /*****************************************************************************
254  * dvbpsi_atsc_ett_delete
255  *****************************************************************************/
263 
269 __attribute__((deprecated,unused))
270 inline void dvbpsi_atsc_DeleteETT(dvbpsi_atsc_ett_t *p_ett)
271 {
272  dvbpsi_atsc_ett_delete(p_ett);
273 }
274 
275 #ifdef __cplusplus
276 };
277 #endif
278 
279 #endif
__attribute__((deprecated, unused)) inline bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi
dvbpsi_atsc_AttachETT is deprecated use
Definition: atsc_ett.h:247
dvbpsi_atsc_ett_t * dvbpsi_atsc_ett_new(uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, uint8_t i_protocol, uint32_t i_etm_id, bool b_current_next)
Allocate and initialize a new dvbpsi_atsc_ett_t structure. Use ObjectRefDec to delete it.
void dvbpsi_atsc_ett_init(dvbpsi_atsc_ett_t *p_ett, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, uint8_t i_protocol, uint32_t i_etm_id, bool b_current_next)
Initialize a user-allocated dvbpsi_atsc_ett_t structure.
void dvbpsi_atsc_ett_empty(dvbpsi_atsc_ett_t *p_ett)
Clean a dvbpsi_atsc_ett_t structure.
void(* dvbpsi_atsc_ett_callback)(void *p_priv, dvbpsi_atsc_ett_t *p_new_ett)
Callback type definition.
Definition: atsc_ett.h:86
void dvbpsi_atsc_ett_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a ETT decoder.
struct dvbpsi_atsc_ett_s dvbpsi_atsc_ett_t
dvbpsi_atsc_ett_t type definition.
void dvbpsi_atsc_ett_delete(dvbpsi_atsc_ett_t *p_ett)
Clean and free a dvbpsi_atsc_ett_t structure.
ATSC ETT structure.
Definition: atsc_ett.h:56
bool b_current_next
Definition: atsc_ett.h:64
uint8_t i_table_id
Definition: atsc_ett.h:58
uint32_t i_etm_id
Definition: atsc_ett.h:68
uint32_t i_etm_length
Definition: atsc_ett.h:71
dvbpsi_descriptor_t * p_first_descriptor
Definition: atsc_ett.h:75
uint8_t i_version
Definition: atsc_ett.h:63
uint8_t i_protocol
Definition: atsc_ett.h:65
uint16_t i_extension
Definition: atsc_ett.h:59
uint8_t * p_etm_data
Definition: atsc_ett.h:72
Descriptor structure.
Definition: descriptor.h:83
DVBPSI handle structure.
Definition: dvbpsi.h:143