libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
atsc_stt.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2006-2012 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 stt.h
19 
20 */
21 
28 #ifndef _ATSC_STT_H
29 #define _ATSC_STT_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /*****************************************************************************
36  * dvbpsi_atsc_stt_t
37  *****************************************************************************/
48 typedef struct dvbpsi_atsc_stt_s
49 {
50  uint8_t i_table_id;
51  uint16_t i_extension;
53  uint8_t i_version;
56  uint32_t i_system_time;
57  uint8_t i_gps_utc_offset;
58  uint16_t i_daylight_savings;
62 
63 /*****************************************************************************
64  * dvbpsi_atsc_stt_callback
65  *****************************************************************************/
71 typedef void (* dvbpsi_atsc_stt_callback)(void* p_priv, dvbpsi_atsc_stt_t* p_new_stt);
72 
73 /*****************************************************************************
74  * dvbpsi_atsc_stt_attach
75  *****************************************************************************/
87 bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
88  dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv);
89 
100 __attribute__((deprecated,unused))
101 inline bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
102  dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv)
103 {
104  return dvbpsi_atsc_stt_attach(p_dvbpsi, i_table_id, i_extension,
105  pf_stt_callback, p_priv);
106 }
107 
108 /*****************************************************************************
109  * dvbpsi_atsc_stt_detach
110  *****************************************************************************/
121 void dvbpsi_atsc_stt_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion);
122 
131 __attribute__((deprecated,unused))
132 inline void dvbpsi_atsc_DetachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion)
133 {
134  dvbpsi_atsc_stt_detach(p_dvbpsi, i_table_id, i_externsion);
135 }
136 
137 /*****************************************************************************
138  * dvbpsi_atsc_stt_init
139  *****************************************************************************/
152 void dvbpsi_atsc_stt_init(dvbpsi_atsc_stt_t *p_stt, uint8_t i_table_id, uint16_t i_extension,
153  uint8_t i_protocol, bool b_current_next);
154 
164 __attribute__((deprecated,unused))
165 inline void dvbpsi_atsc_InitSTT(dvbpsi_atsc_stt_t *p_stt, uint8_t i_table_id,
166  uint16_t i_extension, uint8_t i_protocol, bool b_current_next)
167 {
168  dvbpsi_atsc_stt_init(p_stt, i_table_id, i_extension, i_protocol, b_current_next);
169 }
170 
171 /*****************************************************************************
172  * dvbpsi_atsc_stt_new
173  *****************************************************************************/
184 dvbpsi_atsc_stt_t *dvbpsi_atsc_stt_new(uint8_t i_table_id, uint16_t i_extension,
185  uint8_t i_version, bool b_current_next);
186 
195 __attribute__((deprecated,unused))
196 inline dvbpsi_atsc_stt_t *dvbpsi_atsc_NewSTT(uint8_t i_table_id, uint16_t i_extension,
197  uint8_t i_version, bool b_current_next)
198 {
199  return dvbpsi_atsc_stt_new(i_table_id, i_extension, i_version, b_current_next);
200 }
201 
202 /*****************************************************************************
203  * dvbpsi_atsc_stt_empty
204  *****************************************************************************/
212 
219 __attribute__((deprecated,unused))
220 inline void dvbpsi_atsc_EmptySTT(dvbpsi_atsc_stt_t *p_stt)
221 {
222  dvbpsi_atsc_stt_empty(p_stt);
223 }
224 
225 /*****************************************************************************
226  * dvbpsi_atsc_stt_delete
227  *****************************************************************************/
235 
242 __attribute__((deprecated,unused))
243 inline void dvbpsi_atsc_DeleteSTT(dvbpsi_atsc_stt_t *p_stt)
244 {
245  dvbpsi_atsc_stt_delete(p_stt);
246 }
247 
248 #ifdef __cplusplus
249 };
250 #endif
251 
252 #endif
void dvbpsi_atsc_stt_empty(dvbpsi_atsc_stt_t *p_stt)
Clean a dvbpsi_atsc_stt_t structure.
__attribute__((deprecated, unused)) inline bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi
dvbpsi_atsc_AttachSTT is deprecated use
Definition: atsc_stt.h:219
void dvbpsi_atsc_stt_delete(dvbpsi_atsc_stt_t *p_stt)
Clean and free a dvbpsi_atsc_stt_t structure.
void dvbpsi_atsc_stt_init(dvbpsi_atsc_stt_t *p_stt, uint8_t i_table_id, uint16_t i_extension, uint8_t i_protocol, bool b_current_next)
Initialize a user-allocated dvbpsi_atsc_stt_t structure.
void dvbpsi_atsc_stt_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion)
Destroy a STT decoder.
void(* dvbpsi_atsc_stt_callback)(void *p_priv, dvbpsi_atsc_stt_t *p_new_stt)
Callback type definition.
Definition: atsc_stt.h:71
struct dvbpsi_atsc_stt_s dvbpsi_atsc_stt_t
dvbpsi_atsc_stt_t type definition.
dvbpsi_atsc_stt_t * dvbpsi_atsc_stt_new(uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next)
Allocate and initialize a new dvbpsi_atsc_stt_t structure. Use ObjectRefDec to delete it.
STT structure.
Definition: atsc_stt.h:49
uint16_t i_daylight_savings
Definition: atsc_stt.h:58
uint32_t i_system_time
Definition: atsc_stt.h:56
uint8_t i_table_id
Definition: atsc_stt.h:50
uint8_t i_version
Definition: atsc_stt.h:53
uint8_t i_gps_utc_offset
Definition: atsc_stt.h:57
bool b_current_next
Definition: atsc_stt.h:54
dvbpsi_descriptor_t * p_first_descriptor
Definition: atsc_stt.h:60
uint16_t i_extension
Definition: atsc_stt.h:51
Descriptor structure.
Definition: descriptor.h:83
DVBPSI handle structure.
Definition: dvbpsi.h:143