Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

sdt.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * sdt.h
00003  * (c)2001-2002 VideoLAN
00004  * $Id: sdt.h,v 1.1 2002/12/11 13:04:57 jobi Exp $
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 
00036 #ifndef _DVBPSI_SDT_H_
00037 #define _DVBPSI_SDT_H_
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 
00044 /*****************************************************************************
00045  * dvbpsi_sdt_service_t
00046  *****************************************************************************/
00058 typedef struct dvbpsi_sdt_service_s
00059 {
00060   uint16_t                  i_service_id;           
00061   int                       b_eit_schedule;         
00062   int                       b_eit_present;          
00064   uint8_t                   i_running_status;       
00065   int                       b_free_ca;              
00066   uint16_t                  i_descriptors_length;   
00068   dvbpsi_descriptor_t *     p_first_descriptor;     
00072   struct dvbpsi_sdt_service_s * p_next;             
00075 } dvbpsi_sdt_service_t;
00076 
00077 
00078 /*****************************************************************************
00079  * dvbpsi_sdt_t
00080  *****************************************************************************/
00092 typedef struct dvbpsi_sdt_s
00093 {
00094   uint16_t                  i_ts_id;            
00095   uint8_t                   i_version;          
00096   int                       b_current_next;     
00097   uint16_t                  i_network_id;       
00099   dvbpsi_sdt_service_t *    p_first_service;    
00102 } dvbpsi_sdt_t;
00103 
00104 
00105 /*****************************************************************************
00106  * dvbpsi_sdt_callback
00107  *****************************************************************************/
00113 typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_sdt);
00114 
00115 
00116 /*****************************************************************************
00117  * dvbpsi_AttachSDT
00118  *****************************************************************************/
00131 int dvbpsi_AttachSDT(dvbpsi_decoder_t * p_psi_decoder, uint8_t i_table_id,
00132           uint16_t i_extension, dvbpsi_sdt_callback pf_callback,
00133                                void* p_cb_data);
00134 
00135 
00136 /*****************************************************************************
00137  * dvbpsi_DetachSDT
00138  *****************************************************************************/
00148 void dvbpsi_DetachSDT(dvbpsi_demux_t * p_demux, uint8_t i_table_id,
00149           uint16_t i_extension);
00150 
00151 
00152 /*****************************************************************************
00153  * dvbpsi_InitSDT/dvbpsi_NewSDT
00154  *****************************************************************************/
00166 void dvbpsi_InitSDT(dvbpsi_sdt_t* p_sdt, uint16_t i_ts_id, uint8_t i_version,
00167                     int b_current_next, uint16_t i_network_id);
00168 
00179 #define dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next,i_network_id) \
00180   p_sdt = (dvbpsi_sdt_t*)malloc(sizeof(dvbpsi_sdt_t));                  \
00181   if(p_sdt != NULL)                                                     \
00182     dvbpsi_InitSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_id);
00183 
00184 
00185 /*****************************************************************************
00186  * dvbpsi_EmptySDT/dvbpsi_DeleteSDT
00187  *****************************************************************************/
00194 void dvbpsi_EmptySDT(dvbpsi_sdt_t* p_sdt);
00195 
00202 #define dvbpsi_DeleteSDT(p_sdt)                                         \
00203   dvbpsi_EmptySDT(p_sdt);                                               \
00204   free(p_sdt);
00205 
00206 
00207 /*****************************************************************************
00208  * dvbpsi_SDTAddService
00209  *****************************************************************************/
00226 dvbpsi_sdt_service_t* dvbpsi_SDTAddService(dvbpsi_sdt_t* p_sdt,
00227     uint16_t i_service_id, int b_eit_schedule, int b_eit_present,
00228     uint8_t i_running_status,int b_free_ca);
00229 
00230 #ifdef __cplusplus
00231 };
00232 #endif
00233 
00234 #else
00235 #error "Multiple inclusions of sdt.h"
00236 #endif
00237 

Generated on Thu Nov 27 19:22:49 2003 for libdvbpsi by doxygen 1.3.3