00001 /* 00002 Copyright (C) 2006 Adam Charrett 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with this library; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 00018 vct.h 00019 00020 Decode PSIP Virtual Channel Table. 00021 00022 */ 00023 00030 #ifndef _ATSC_VCT_H 00031 #define _ATSC_VCT_H 00032 00033 #ifdef __cplusplus 00034 extern "C" { 00035 #endif 00036 00037 /***************************************************************************** 00038 * dvbpsi_atsc_vct_channel_t 00039 *****************************************************************************/ 00050 typedef struct dvbpsi_atsc_vct_channel_s 00051 { 00052 uint8_t i_short_name[14]; 00053 uint16_t i_major_number; 00054 uint16_t i_minor_number; 00056 uint8_t i_modulation; 00057 uint32_t i_carrier_freq; 00058 uint16_t i_channel_tsid; 00059 uint16_t i_program_number; 00060 uint8_t i_etm_location; 00061 bool b_access_controlled; 00062 bool b_path_select; 00063 bool b_out_of_band; 00065 bool b_hidden; 00066 bool b_hide_guide; 00068 uint8_t i_service_type; 00069 uint16_t i_source_id; 00071 dvbpsi_descriptor_t *p_first_descriptor; 00073 struct dvbpsi_atsc_vct_channel_s *p_next; 00074 } dvbpsi_atsc_vct_channel_t; 00075 00076 /***************************************************************************** 00077 * dvbpsi_atsc_vct_t 00078 *****************************************************************************/ 00089 typedef struct dvbpsi_atsc_vct_s 00090 { 00091 uint8_t i_table_id; 00092 uint16_t i_extension; 00094 uint8_t i_version; 00095 bool b_current_next; 00096 uint8_t i_protocol; 00097 bool b_cable_vct; 00099 dvbpsi_descriptor_t *p_first_descriptor; 00100 dvbpsi_atsc_vct_channel_t *p_first_channel; 00102 } dvbpsi_atsc_vct_t; 00103 00104 /***************************************************************************** 00105 * dvbpsi_vct_callback 00106 *****************************************************************************/ 00112 typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, dvbpsi_atsc_vct_t* p_new_vct); 00113 00114 /***************************************************************************** 00115 * dvbpsi_atsc_AttachVCT 00116 *****************************************************************************/ 00129 bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, 00130 uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback, 00131 void* p_cb_data); 00132 00133 /***************************************************************************** 00134 * dvbpsi_DetachVCT 00135 *****************************************************************************/ 00146 void dvbpsi_atsc_DetachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension); 00147 00148 /***************************************************************************** 00149 * dvbpsi_atsc_InitVCT 00150 *****************************************************************************/ 00165 void dvbpsi_atsc_InitVCT(dvbpsi_atsc_vct_t* p_vct, uint8_t i_table_id, 00166 uint16_t i_extension, uint8_t i_protocol, bool b_cable_vct, 00167 uint8_t i_version, bool b_current_next); 00168 00169 /***************************************************************************** 00170 * dvbpsi_atsc_NewVCT 00171 *****************************************************************************/ 00185 dvbpsi_atsc_vct_t *dvbpsi_atsc_NewVCT(uint8_t i_table_id, uint16_t i_extension, 00186 uint8_t i_protocol, bool b_cable_vct, uint8_t i_version, 00187 bool b_current_next); 00188 00189 /***************************************************************************** 00190 * dvbpsi_atsc_EmptyVCT 00191 *****************************************************************************/ 00198 void dvbpsi_atsc_EmptyVCT(dvbpsi_atsc_vct_t *p_vct); 00199 00200 /***************************************************************************** 00201 * dvbpsi_atsc_DeleteVCT 00202 *****************************************************************************/ 00209 void dvbpsi_atsc_DeleteVCT(dvbpsi_atsc_vct_t *p_vct); 00210 00211 #ifdef __cplusplus 00212 }; 00213 #endif 00214 00215 #endif