00001 /***************************************************************************** 00002 * demux.h 00003 * (c)2001-2002 VideoLAN 00004 * $Id: demux.h 108 2005-04-19 12:33:21Z gbazin $ 00005 * 00006 * Authors: Johan Bilien <jobi@via.ecp.fr> 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU General Public License 00010 * as published by the Free Software Foundation; either version 2 00011 * of the License, or (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 * 00022 *****************************************************************************/ 00023 00032 #ifndef _DVBPSI_DEMUX_H_ 00033 #define _DVBPSI_DEMUX_H_ 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 00040 /***************************************************************************** 00041 * dvbpsi_demux_new_cb_t 00042 *****************************************************************************/ 00050 typedef void (*dvbpsi_demux_new_cb_t) (void * p_cb_data, 00051 dvbpsi_handle h_dvbpsi, 00052 uint8_t i_table_id, 00053 uint16_t i_extension); 00054 00055 /***************************************************************************** 00056 * dvbpsi_demux_subdec_cb_t 00057 *****************************************************************************/ 00065 typedef void (*dvbpsi_demux_subdec_cb_t) 00066 (dvbpsi_decoder_t* p_psi_decoder, 00067 void* p_private_decoder, 00068 dvbpsi_psi_section_t* p_section); 00069 00070 /***************************************************************************** 00071 * dvbpsi_demux_subdec_t 00072 *****************************************************************************/ 00084 struct dvbpsi_demux_s; 00085 typedef struct dvbpsi_demux_subdec_s 00086 { 00087 uint32_t i_id; 00088 dvbpsi_demux_subdec_cb_t pf_callback; 00089 void * p_cb_data; 00090 struct dvbpsi_demux_subdec_s * p_next; 00091 00092 void (*pf_detach)(struct dvbpsi_demux_s *, uint8_t, uint16_t); 00093 00094 } dvbpsi_demux_subdec_t; 00095 00096 /***************************************************************************** 00097 * dvbpsi_demux_t 00098 *****************************************************************************/ 00110 typedef struct dvbpsi_demux_s 00111 { 00112 dvbpsi_handle p_decoder; 00113 dvbpsi_demux_subdec_t * p_first_subdec; 00114 /* New subtable callback */ 00115 dvbpsi_demux_new_cb_t pf_new_callback; 00116 void * p_new_cb_data; 00119 } dvbpsi_demux_t; 00120 00121 00122 /***************************************************************************** 00123 * dvbpsi_AttachDemux 00124 *****************************************************************************/ 00132 dvbpsi_handle dvbpsi_AttachDemux(dvbpsi_demux_new_cb_t pf_new_cb, 00133 void * p_new_cb_data); 00134 00135 /***************************************************************************** 00136 * dvbpsi_DetachDemux 00137 *****************************************************************************/ 00144 void dvbpsi_DetachDemux(dvbpsi_handle h_dvbpsi); 00145 00146 /***************************************************************************** 00147 * dvbpsi_demuxGetSubDec 00148 *****************************************************************************/ 00158 dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux, 00159 uint8_t i_table_id, 00160 uint16_t i_extension); 00161 /***************************************************************************** 00162 * dvbpsi_Demux 00163 *****************************************************************************/ 00171 void dvbpsi_Demux(dvbpsi_handle h_dvbpsi, 00172 dvbpsi_psi_section_t * p_section); 00173 00174 #ifdef __cplusplus 00175 }; 00176 #endif 00177 00178 #else 00179 #error "Multiple inclusions of demux.h" 00180 #endif 00181