libdvbpsi  2.0.0-git
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_cb_data, dvbpsi_atsc_stt_t* p_new_stt);
72 
73 /*****************************************************************************
74  * dvbpsi_atsc_AttachSTT
75  *****************************************************************************/
87 bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
88  dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data);
89 
90 /*****************************************************************************
91  * dvbpsi_atsc_DetachSTT
92  *****************************************************************************/
103 void dvbpsi_atsc_DetachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion);
104 
105 /*****************************************************************************
106  * dvbpsi_atsc_InitSTT/dvbpsi_atsc_NewSTT
107  *****************************************************************************/
120 void dvbpsi_atsc_InitSTT(dvbpsi_atsc_stt_t *p_stt, uint8_t i_table_id, uint16_t i_extension,
121  uint8_t i_protocol, bool b_current_next);
122 
133 dvbpsi_atsc_stt_t *dvbpsi_atsc_NewSTT(uint8_t i_table_id, uint16_t i_extension,
134  uint8_t i_version, bool b_current_next);
135 
136 /*****************************************************************************
137  * dvbpsi_atsc_EmptySTT
138  *****************************************************************************/
146 
154 
155 #ifdef __cplusplus
156 };
157 #endif
158 
159 #endif
uint32_t i_system_time
Definition: atsc_stt.h:56
bool b_current_next
Definition: sis.h:107
void dvbpsi_atsc_DeleteSTT(dvbpsi_atsc_stt_t *p_stt)
Clean and free a dvbpsi_atsc_stt_t structure.
void dvbpsi_atsc_DetachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion)
Destroy a STT decoder.
uint16_t i_daylight_savings
Definition: atsc_stt.h:58
void(* dvbpsi_atsc_stt_callback)(void *p_cb_data, dvbpsi_atsc_stt_t *p_new_stt)
Callback type definition.
Definition: atsc_stt.h:71
uint8_t i_gps_utc_offset
Definition: atsc_stt.h:57
STT structure.
Definition: atsc_stt.h:48
uint8_t i_table_id
Definition: atsc_stt.h:50
struct dvbpsi_atsc_stt_s dvbpsi_atsc_stt_t
dvbpsi_atsc_stt_t type definition.
bool b_current_next
Definition: atsc_stt.h:54
dvbpsi_descriptor_t * p_first_descriptor
Definition: atsc_stt.h:60
dvbpsi_atsc_stt_t * dvbpsi_atsc_NewSTT(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...
uint16_t i_extension
Definition: atsc_stt.h:51
void dvbpsi_atsc_InitSTT(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.
bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_atsc_stt_callback pf_stt_callback, void *p_cb_data)
Creation and initialization of a STT decoder.
void dvbpsi_atsc_EmptySTT(dvbpsi_atsc_stt_t *p_stt)
Clean a dvbpsi_atsc_stt_t structure.
DVBPSI handle structure.
Definition: dvbpsi.h:142
uint8_t i_version
Definition: atsc_stt.h:53
Descriptor structure.
Definition: descriptor.h:82
uint8_t i_version
Definition: sis.h:104