• Main Page
  • Related Pages
  • Data Structures
  • Files
  • File List
  • Globals

sdt.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * sdt.h
00003  * Copyright (C) 2001-2011 VideoLAN
00004  * $Id$
00005  *
00006  * Authors: Johan Bilien <jobi@via.ecp.fr>
00007  *          Jean-Paul Saman <jpsaman@videolan.org>
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022  *
00023  *****************************************************************************/
00024 
00034 #ifndef _DVBPSI_SDT_H_
00035 #define _DVBPSI_SDT_H_
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 /*****************************************************************************
00042  * dvbpsi_sdt_service_t
00043  *****************************************************************************/
00055 typedef struct dvbpsi_sdt_service_s
00056 {
00057   uint16_t                  i_service_id;           
00058   bool                      b_eit_schedule;         
00059   bool                      b_eit_present;          
00061   uint8_t                   i_running_status;       
00062   bool                      b_free_ca;              
00063   uint16_t                  i_descriptors_length;   
00065   dvbpsi_descriptor_t *     p_first_descriptor;     
00068   struct dvbpsi_sdt_service_s * p_next;             
00071 } dvbpsi_sdt_service_t;
00072 
00073 /*****************************************************************************
00074  * dvbpsi_sdt_t
00075  *****************************************************************************/
00087 typedef struct dvbpsi_sdt_s
00088 {
00089   uint16_t                  i_ts_id;            
00090   uint8_t                   i_version;          
00091   bool                      b_current_next;     
00092   uint16_t                  i_network_id;       
00094   dvbpsi_sdt_service_t *    p_first_service;    
00097 } dvbpsi_sdt_t;
00098 
00099 /*****************************************************************************
00100  * dvbpsi_sdt_callback
00101  *****************************************************************************/
00107 typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_sdt);
00108 
00109 /*****************************************************************************
00110  * dvbpsi_AttachSDT
00111  *****************************************************************************/
00124 bool dvbpsi_AttachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
00125                       dvbpsi_sdt_callback pf_callback, void* p_cb_data);
00126 
00127 /*****************************************************************************
00128  * dvbpsi_DetachSDT
00129  *****************************************************************************/
00139 void dvbpsi_DetachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
00140 
00141 /*****************************************************************************
00142  * dvbpsi_InitSDT/dvbpsi_NewSDT
00143  *****************************************************************************/
00155 void dvbpsi_InitSDT(dvbpsi_sdt_t *p_sdt, uint16_t i_ts_id, uint8_t i_version,
00156                     bool b_current_next, uint16_t i_network_id);
00157 
00168 dvbpsi_sdt_t *dvbpsi_NewSDT(uint16_t i_ts_id, uint8_t i_version,
00169                              bool b_current_next, uint16_t i_network_id);
00170 
00171 /*****************************************************************************
00172  * dvbpsi_EmptySDT/dvbpsi_DeleteSDT
00173  *****************************************************************************/
00180 void dvbpsi_EmptySDT(dvbpsi_sdt_t *p_sdt);
00181 
00188 void dvbpsi_DeleteSDT(dvbpsi_sdt_t *p_sdt);
00189 
00190 /*****************************************************************************
00191  * dvbpsi_SDTAddService
00192  *****************************************************************************/
00209 dvbpsi_sdt_service_t *dvbpsi_SDTAddService(dvbpsi_sdt_t* p_sdt,
00210     uint16_t i_service_id, bool b_eit_schedule, bool b_eit_present,
00211     uint8_t i_running_status, bool b_free_ca);
00212 
00213 /*****************************************************************************
00214  * dvbpsi_SDTServiceAddDescriptor
00215  *****************************************************************************/
00228 dvbpsi_descriptor_t *dvbpsi_SDTServiceAddDescriptor(
00229                                                dvbpsi_sdt_service_t *p_service,
00230                                                uint8_t i_tag, uint8_t i_length,
00231                                                uint8_t *p_data);
00232 
00233 /*****************************************************************************
00234  * dvbpsi_GenSDTSections
00235  *****************************************************************************
00236  * Generate SDT sections based on the dvbpsi_sdt_t structure.
00237  *****************************************************************************/
00248 dvbpsi_psi_section_t *dvbpsi_GenSDTSections(dvbpsi_t *p_dvbpsi, dvbpsi_sdt_t * p_sdt);
00249 
00250 #ifdef __cplusplus
00251 };
00252 #endif
00253 
00254 #else
00255 #error "Multiple inclusions of sdt.h"
00256 #endif

Generated on Wed May 16 2012 07:56:18 for libdvbpsi by  doxygen 1.7.1