libdvbpsi
1.3.0
|
00001 /***************************************************************************** 00002 * demux.h 00003 * 00004 * Copyright (C) 2001-2011 VideoLAN 00005 * $Id$ 00006 * 00007 * Authors: Johan Bilien <jobi@via.ecp.fr> 00008 * Jean-Paul Saman <jpsaman@videolan.org> 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 00034 #ifndef _DVBPSI_DEMUX_H_ 00035 #define _DVBPSI_DEMUX_H_ 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 /***************************************************************************** 00042 * dvbpsi_demux_new_cb_t 00043 *****************************************************************************/ 00051 typedef void (*dvbpsi_demux_new_cb_t) (dvbpsi_t *p_dvbpsi, 00052 uint8_t i_table_id, 00053 uint16_t i_extension, 00054 void * p_cb_data); 00062 typedef void (*dvbpsi_demux_gather_cb_t) (dvbpsi_t *p_dvbpsi, 00063 dvbpsi_decoder_t *p_decoder, 00064 dvbpsi_psi_section_t *p_section); 00072 typedef void (*dvbpsi_demux_detach_cb_t) (dvbpsi_t *p_dvbpsi, 00073 uint8_t i_table_id, 00074 uint16_t i_extension); 00076 /***************************************************************************** 00077 * dvbpsi_demux_subdec_t 00078 *****************************************************************************/ 00090 typedef struct dvbpsi_demux_subdec_s 00091 { 00092 uint32_t i_id; 00094 dvbpsi_demux_gather_cb_t pf_gather; 00095 dvbpsi_decoder_t *p_decoder; 00097 dvbpsi_demux_detach_cb_t pf_detach; 00099 struct dvbpsi_demux_subdec_s *p_next; 00100 } dvbpsi_demux_subdec_t; 00101 00102 00103 /***************************************************************************** 00104 * dvbpsi_demux_s 00105 *****************************************************************************/ 00117 typedef struct dvbpsi_demux_s dvbpsi_demux_t; 00118 00119 struct dvbpsi_demux_s 00120 { 00121 DVBPSI_DECODER_COMMON 00122 00123 dvbpsi_demux_subdec_t * p_first_subdec; 00125 /* New subtable callback */ 00126 dvbpsi_demux_new_cb_t pf_new_callback; 00127 void * p_new_cb_data; 00129 }; 00130 00131 /***************************************************************************** 00132 * dvbpsi_AttachDemux 00133 *****************************************************************************/ 00142 bool dvbpsi_AttachDemux(dvbpsi_t * p_dvbpsi, 00143 dvbpsi_demux_new_cb_t pf_new_cb, 00144 void * p_new_cb_data); 00145 00146 /***************************************************************************** 00147 * dvbpsi_DetachDemux 00148 *****************************************************************************/ 00155 void dvbpsi_DetachDemux(dvbpsi_t *p_dvbpsi); 00156 00157 /***************************************************************************** 00158 * dvbpsi_demuxGetSubDec 00159 *****************************************************************************/ 00169 dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec(dvbpsi_demux_t * p_demux, 00170 uint8_t i_table_id, 00171 uint16_t i_extension); 00172 00173 /***************************************************************************** 00174 * dvbpsi_Demux 00175 *****************************************************************************/ 00183 void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section); 00184 00185 /***************************************************************************** 00186 * dvbpsi_NewDemuxSubDecoder 00187 *****************************************************************************/ 00202 dvbpsi_demux_subdec_t *dvbpsi_NewDemuxSubDecoder(const uint8_t i_table_id, 00203 const uint16_t i_extension, 00204 dvbpsi_demux_detach_cb_t pf_detach, 00205 dvbpsi_demux_gather_cb_t pf_gather, 00206 dvbpsi_decoder_t *p_decoder); 00207 00208 /***************************************************************************** 00209 * dvbpsi_DeleteDemuxSubDecoder 00210 *****************************************************************************/ 00218 void dvbpsi_DeleteDemuxSubDecoder(dvbpsi_demux_subdec_t *p_subdec); 00219 00220 /***************************************************************************** 00221 * dvbpsi_AttachDemuxSubDecoder 00222 *****************************************************************************/ 00230 void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec); 00231 00232 /***************************************************************************** 00233 * dvbpsi_DetachDemuxSubDecoder 00234 *****************************************************************************/ 00242 void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec); 00243 00244 #ifdef __cplusplus 00245 }; 00246 #endif 00247 00248 #else 00249 #error "Multiple inclusions of demux.h" 00250 #endif