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

eit.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * eit.h
00003  * Copyright (C) 2004-2011 VideoLAN
00004  * $Id: eit.h 88 2004-02-24 14:31:18Z sam $
00005  *
00006  * Authors: Christophe Massiot <massiot@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_EIT_H_
00035 #define _DVBPSI_EIT_H_
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 /*****************************************************************************
00042  * dvbpsi_eit_event_t
00043  *****************************************************************************/
00055 typedef struct dvbpsi_eit_event_s
00056 {
00057   uint16_t                  i_event_id;             
00058   uint64_t                  i_start_time;           
00059   uint32_t                  i_duration;             
00060   uint8_t                   i_running_status;       
00061   bool                      b_free_ca;              
00062   uint16_t                  i_descriptors_length;   
00064   dvbpsi_descriptor_t *     p_first_descriptor;     
00067   struct dvbpsi_eit_event_s * p_next;               
00070 } dvbpsi_eit_event_t;
00071 
00072 /*****************************************************************************
00073  * dvbpsi_eit_t
00074  *****************************************************************************/
00086 typedef struct dvbpsi_eit_s
00087 {
00088   uint16_t                  i_service_id;       
00089   uint8_t                   i_version;          
00090   bool                      b_current_next;     
00091   uint16_t                  i_ts_id;            
00092   uint16_t                  i_network_id;       
00093   uint8_t                   i_segment_last_section_number; 
00094   uint8_t                   i_last_table_id;    
00096   dvbpsi_eit_event_t *      p_first_event;      
00098 } dvbpsi_eit_t;
00099 
00100 /*****************************************************************************
00101  * dvbpsi_eit_callback
00102  *****************************************************************************/
00108 typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit);
00109 
00110 /*****************************************************************************
00111  * dvbpsi_AttachEIT
00112  *****************************************************************************/
00125 bool dvbpsi_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
00126           uint16_t i_extension, dvbpsi_eit_callback pf_callback, void* p_cb_data);
00127 
00128 /*****************************************************************************
00129  * dvbpsi_DetachEIT
00130  *****************************************************************************/
00141 void dvbpsi_DetachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
00142 
00143 /*****************************************************************************
00144  * dvbpsi_InitEIT/dvbpsi_NewEIT
00145  *****************************************************************************/
00162 void dvbpsi_InitEIT(dvbpsi_eit_t* p_eit, uint16_t i_service_id, uint8_t i_version,
00163                     bool b_current_next, uint16_t i_ts_id, uint16_t i_network_id,
00164                     uint8_t i_segment_last_section_number,
00165                     uint8_t i_last_table_id);
00166 
00182 dvbpsi_eit_t* dvbpsi_NewtEIT(uint16_t i_service_id,
00183           uint8_t i_version, bool b_current_next, uint16_t i_ts_id,
00184           uint16_t i_network_id, uint8_t i_segment_last_section_number,
00185           uint8_t i_last_table_id);
00186 
00187 /*****************************************************************************
00188  * dvbpsi_EmptyEIT/dvbpsi_DeleteEIT
00189  *****************************************************************************/
00196 void dvbpsi_EmptyEIT(dvbpsi_eit_t* p_eit);
00197 
00204 void dvbpsi_DeleteEIT(dvbpsi_eit_t* p_eit);
00205 
00206 /*****************************************************************************
00207  * dvbpsi_EITAddEvent
00208  *****************************************************************************/
00225 dvbpsi_eit_event_t* dvbpsi_EITAddEvent(dvbpsi_eit_t* p_eit,
00226     uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration,
00227     uint8_t i_running_status, bool b_free_ca);
00228 
00229 /*****************************************************************************
00230  * dvbpsi_EITEventAddDescriptor
00231  *****************************************************************************/
00244 dvbpsi_descriptor_t* dvbpsi_EITEventAddDescriptor(
00245                                                dvbpsi_eit_event_t* p_event,
00246                                                uint8_t i_tag, uint8_t i_length,
00247                                                uint8_t* p_data);
00248 
00249 /*****************************************************************************
00250  * dvbpsi_GenEITSections
00251  *****************************************************************************
00252  * Generate EIT sections based on the dvbpsi_eit_t structure.
00253  *****************************************************************************/
00263 dvbpsi_psi_section_t *dvbpsi_GenEITSections(dvbpsi_t *p_dvbpsi, dvbpsi_eit_t *p_eit,
00264                                             uint8_t i_table_id);
00265 
00266 #ifdef __cplusplus
00267 };
00268 #endif
00269 
00270 #else
00271 #error "Multiple inclusions of eit.h"
00272 #endif
00273 

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