libdvbpsi
0.2.2
|
00001 /***************************************************************************** 00002 * cat.h 00003 * Copyright (C) 2001-2011 VideoLAN 00004 * $Id$ 00005 * 00006 * Authors: Johann Hanne 00007 * heavily based on pmt.h 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_CAT_H_ 00036 #define _DVBPSI_CAT_H_ 00037 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 00042 00043 /***************************************************************************** 00044 * dvbpsi_cat_t 00045 *****************************************************************************/ 00057 typedef struct dvbpsi_cat_s 00058 { 00059 uint8_t i_version; 00060 int b_current_next; 00062 dvbpsi_descriptor_t * p_first_descriptor; 00064 } dvbpsi_cat_t; 00065 00066 00067 /***************************************************************************** 00068 * dvbpsi_cat_callback 00069 *****************************************************************************/ 00075 typedef void (* dvbpsi_cat_callback)(void* p_cb_data, dvbpsi_cat_t* p_new_cat); 00076 00077 00078 /***************************************************************************** 00079 * dvbpsi_AttachCAT 00080 *****************************************************************************/ 00089 __attribute__((deprecated)) 00090 dvbpsi_handle dvbpsi_AttachCAT(dvbpsi_cat_callback pf_callback, 00091 void* p_cb_data); 00092 00093 00094 /***************************************************************************** 00095 * dvbpsi_DetachCAT 00096 *****************************************************************************/ 00105 __attribute__((deprecated)) 00106 void dvbpsi_DetachCAT(dvbpsi_handle h_dvbpsi); 00107 00108 00109 /***************************************************************************** 00110 * dvbpsi_InitCAT/dvbpsi_NewCAT 00111 *****************************************************************************/ 00121 __attribute__((deprecated)) 00122 void dvbpsi_InitCAT(dvbpsi_cat_t* p_cat, 00123 uint8_t i_version, int b_current_next); 00124 00134 #define dvbpsi_NewCAT(p_cat, \ 00135 i_version, b_current_next) \ 00136 do { \ 00137 p_cat = (dvbpsi_cat_t*)malloc(sizeof(dvbpsi_cat_t)); \ 00138 if(p_cat != NULL) \ 00139 dvbpsi_InitCAT(p_cat, i_version, b_current_next); \ 00140 } while(0); 00141 00142 00143 /***************************************************************************** 00144 * dvbpsi_EmptyCAT/dvbpsi_DeleteCAT 00145 *****************************************************************************/ 00152 __attribute__((deprecated)) 00153 void dvbpsi_EmptyCAT(dvbpsi_cat_t* p_cat); 00154 00161 #define dvbpsi_DeleteCAT(p_cat) \ 00162 do { \ 00163 dvbpsi_EmptyCAT(p_cat); \ 00164 free(p_cat); \ 00165 } while(0); 00166 00167 00168 /***************************************************************************** 00169 * dvbpsi_CATAddDescriptor 00170 *****************************************************************************/ 00183 __attribute__((deprecated)) 00184 dvbpsi_descriptor_t* dvbpsi_CATAddDescriptor(dvbpsi_cat_t* p_cat, 00185 uint8_t i_tag, uint8_t i_length, 00186 uint8_t* p_data); 00187 00188 00189 /***************************************************************************** 00190 * dvbpsi_GenCATSections 00191 *****************************************************************************/ 00200 __attribute__((deprecated)) 00201 dvbpsi_psi_section_t* dvbpsi_GenCATSections(dvbpsi_cat_t* p_cat); 00202 00203 00204 #ifdef __cplusplus 00205 }; 00206 #endif 00207 00208 #else 00209 #error "Multiple inclusions of cat.h" 00210 #endif 00211