libdvbpsi
1.3.0
|
00001 /* 00002 Copyright (C) 2006 Adam Charrett 00003 Copyright (C) 2011-2012 Michael Krufky 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 mgt.h 00020 00021 Decode PSIP Master Guide Table. 00022 00023 */ 00024 00031 #ifndef _ATSC_MGT_H 00032 #define _ATSC_MGT_H 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 /***************************************************************************** 00039 * dvbpsi_atsc_mgt_table_t 00040 *****************************************************************************/ 00051 typedef struct dvbpsi_atsc_mgt_table_s 00052 { 00053 uint16_t i_table_type; 00054 uint16_t i_table_type_pid; 00055 uint8_t i_table_type_version; 00056 uint32_t i_number_bytes; 00058 dvbpsi_descriptor_t *p_first_descriptor; 00060 struct dvbpsi_atsc_mgt_table_s *p_next; 00061 } dvbpsi_atsc_mgt_table_t; 00062 00063 /***************************************************************************** 00064 * dvbpsi_atsc_mgt_t 00065 *****************************************************************************/ 00076 typedef struct dvbpsi_atsc_mgt_s 00077 { 00078 uint8_t i_table_id; 00079 uint16_t i_extension; 00081 uint8_t i_version; 00082 bool b_current_next; 00083 uint16_t i_table_id_ext; 00084 uint8_t i_protocol; 00086 dvbpsi_atsc_mgt_table_t *p_first_table; 00088 dvbpsi_descriptor_t *p_first_descriptor; 00089 } dvbpsi_atsc_mgt_t; 00090 00091 /***************************************************************************** 00092 * dvbpsi_mgt_callback 00093 *****************************************************************************/ 00099 typedef void (* dvbpsi_atsc_mgt_callback)(void* p_cb_data, dvbpsi_atsc_mgt_t* p_new_mgt); 00100 00101 /***************************************************************************** 00102 * dvbpsi_atsc_AttachMGT 00103 *****************************************************************************/ 00116 bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, 00117 dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data); 00118 00119 /***************************************************************************** 00120 * dvbpsi_DetachMGT 00121 *****************************************************************************/ 00131 void dvbpsi_atsc_DetachMGT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_extension); 00132 00133 /***************************************************************************** 00134 * dvbpsi_atsc_InitMGT/dvbpsi_atsc_NewMGT 00135 *****************************************************************************/ 00148 void dvbpsi_atsc_InitMGT(dvbpsi_atsc_mgt_t* p_mgt, uint8_t i_table_id, uint16_t i_extension, 00149 uint8_t i_version, uint8_t i_protocol, bool b_current_next); 00150 00162 dvbpsi_atsc_mgt_t *dvbpsi_atsc_NewMGT(uint8_t i_table_id, uint16_t i_extension, 00163 uint8_t i_version, uint8_t i_protocol, bool b_current_next); 00164 00165 /***************************************************************************** 00166 * dvbpsi_atsc_EmptyMGT/dvbpsi_atsc_DeleteMGT 00167 *****************************************************************************/ 00174 void dvbpsi_atsc_EmptyMGT(dvbpsi_atsc_mgt_t *p_mgt); 00175 00182 void dvbpsi_atsc_DeleteMGT(dvbpsi_atsc_mgt_t *p_mgt); 00183 00184 #ifdef __cplusplus 00185 }; 00186 #endif 00187 00188 #endif