libdvbpsi 0.2.0
|
00001 /***************************************************************************** 00002 * tot.h 00003 * Copyright (C) 2001-2011 VideoLAN 00004 * $Id$ 00005 * 00006 * Authors: Johann Hanne 00007 * heavily based on pmt.c which was written by 00008 * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr> 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00023 * 00024 *****************************************************************************/ 00025 00035 #ifndef _DVBPSI_TOT_H_ 00036 #define _DVBPSI_TOT_H_ 00037 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 00043 /***************************************************************************** 00044 * dvbpsi_tot_t 00045 *****************************************************************************/ 00057 typedef struct dvbpsi_tot_s 00058 { 00059 uint64_t i_utc_time; 00061 dvbpsi_descriptor_t * p_first_descriptor; 00063 uint32_t i_crc; 00065 } dvbpsi_tot_t; 00066 00067 00068 /***************************************************************************** 00069 * dvbpsi_tot_callback 00070 *****************************************************************************/ 00076 typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_tot); 00077 00078 00079 /***************************************************************************** 00080 * dvbpsi_AttachTOT 00081 *****************************************************************************/ 00093 __attribute__((deprecated)) 00094 int dvbpsi_AttachTOT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id, 00095 uint16_t i_extension, 00096 dvbpsi_tot_callback pf_callback, void* p_cb_data); 00097 00098 00099 /***************************************************************************** 00100 * dvbpsi_DetachTOT 00101 *****************************************************************************/ 00110 __attribute__((deprecated)) 00111 void dvbpsi_DetachTOT(dvbpsi_demux_t * p_demux, uint8_t i_table_id, 00112 uint16_t i_extension); 00113 00114 00115 /***************************************************************************** 00116 * dvbpsi_InitTOT/dvbpsi_NewTOT 00117 *****************************************************************************/ 00125 __attribute__((deprecated)) 00126 void dvbpsi_InitTOT(dvbpsi_tot_t* p_tot, uint64_t i_utc_time); 00127 00135 #define dvbpsi_NewTOT(p_tot, i_utc_time) \ 00136 do { \ 00137 p_tot = (dvbpsi_tot_t*)malloc(sizeof(dvbpsi_tot_t)); \ 00138 if(p_tot != NULL) \ 00139 dvbpsi_InitTOT(p_tot, i_utc_time); \ 00140 } while(0); 00141 00142 00143 /***************************************************************************** 00144 * dvbpsi_EmptyTOT/dvbpsi_DeleteTOT 00145 *****************************************************************************/ 00152 __attribute__((deprecated)) 00153 void dvbpsi_EmptyTOT(dvbpsi_tot_t* p_tot); 00154 00161 #define dvbpsi_DeleteTOT(p_tot) \ 00162 do { \ 00163 dvbpsi_EmptyTOT(p_tot); \ 00164 free(p_tot); \ 00165 } while(0); 00166 00167 00168 /***************************************************************************** 00169 * dvbpsi_TOTAddDescriptor 00170 *****************************************************************************/ 00183 __attribute__((deprecated)) 00184 dvbpsi_descriptor_t* dvbpsi_TOTAddDescriptor(dvbpsi_tot_t* p_tot, 00185 uint8_t i_tag, uint8_t i_length, 00186 uint8_t* p_data); 00187 00188 00189 /***************************************************************************** 00190 * dvbpsi_GenTOTSections 00191 *****************************************************************************/ 00200 __attribute__((deprecated)) 00201 dvbpsi_psi_section_t* dvbpsi_GenTOTSections(dvbpsi_tot_t* p_tot); 00202 00203 00204 #ifdef __cplusplus 00205 }; 00206 #endif 00207 00208 #else 00209 #error "Multiple inclusions of tot.h" 00210 #endif 00211