libdvbpsi  1.2.0
atsc_mgt.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2006 Adam Charrett
3 Copyright (C) 2011-2012 Michael Krufky
4 
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 mgt.h
20 
21 Decode PSIP Master Guide Table.
22 
23 */
24 
31 #ifndef _ATSC_MGT_H
32 #define _ATSC_MGT_H
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /*****************************************************************************
39  * dvbpsi_atsc_mgt_table_t
40  *****************************************************************************/
52 {
53  uint16_t i_table_type;
54  uint16_t i_table_type_pid;
56  uint32_t i_number_bytes;
62 
63 /*****************************************************************************
64  * dvbpsi_atsc_mgt_t
65  *****************************************************************************/
76 typedef struct dvbpsi_atsc_mgt_s
77 {
78  uint8_t i_table_id;
79  uint16_t i_extension;
81  uint8_t i_version;
83  uint16_t i_table_id_ext;
84  uint8_t i_protocol;
90 
91 /*****************************************************************************
92  * dvbpsi_mgt_callback
93  *****************************************************************************/
99 typedef void (* dvbpsi_atsc_mgt_callback)(void* p_cb_data, dvbpsi_atsc_mgt_t* p_new_mgt);
100 
101 /*****************************************************************************
102  * dvbpsi_atsc_AttachMGT
103  *****************************************************************************/
116 bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
117  dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data);
118 
119 /*****************************************************************************
120  * dvbpsi_DetachMGT
121  *****************************************************************************/
131 void dvbpsi_atsc_DetachMGT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
132 
133 /*****************************************************************************
134  * dvbpsi_atsc_InitMGT/dvbpsi_atsc_NewMGT
135  *****************************************************************************/
148 void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt, uint8_t i_table_id, uint16_t i_extension,
149  uint8_t i_version, uint8_t i_protocol, bool b_current_next);
150 
163  uint8_t i_version, uint8_t i_protocol, bool b_current_next);
164 
165 /*****************************************************************************
166  * dvbpsi_atsc_EmptyMGT/dvbpsi_atsc_DeleteMGT
167  *****************************************************************************/
175 
183 
184 #ifdef __cplusplus
185 };
186 #endif
187 
188 #endif