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

nit.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * nit.h
00003  * Copyright (C) 2001-2011 VideoLAN
00004  * $Id$
00005  *
00006  * Authors: Johann Hanne
00007  *          heavily based on pmt.c which was written by
00008  *          Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
00009  *          Jean-Paul Saman <jpsaman@videolan.org>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00024  *
00025  *****************************************************************************/
00026 
00036 #ifndef _DVBPSI_NIT_H_
00037 #define _DVBPSI_NIT_H_
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 /*****************************************************************************
00044  * dvbpsi_nit_ts_t
00045  *****************************************************************************/
00057 typedef struct dvbpsi_nit_ts_s
00058 {
00059   uint16_t                      i_ts_id;                
00060   uint16_t                      i_orig_network_id;      
00062   dvbpsi_descriptor_t *         p_first_descriptor;     
00064   struct dvbpsi_nit_ts_s *      p_next;                 
00067 } dvbpsi_nit_ts_t;
00068 
00069 /*****************************************************************************
00070  * dvbpsi_nit_t
00071  *****************************************************************************/
00083 typedef struct dvbpsi_nit_s
00084 {
00085   uint16_t                  i_network_id;       
00086   uint8_t                   i_version;          
00087   bool                      b_current_next;     
00089   dvbpsi_descriptor_t *     p_first_descriptor; 
00091   dvbpsi_nit_ts_t *         p_first_ts;         
00093 } dvbpsi_nit_t;
00094 
00095 /*****************************************************************************
00096  * dvbpsi_nit_callback
00097  *****************************************************************************/
00103 typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_nit);
00104 
00105 /*****************************************************************************
00106  * dvbpsi_AttachNIT
00107  *****************************************************************************/
00120 bool dvbpsi_AttachNIT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
00121                      uint16_t i_extension, dvbpsi_nit_callback pf_callback,
00122                      void* p_cb_data);
00123 
00124 /*****************************************************************************
00125  * dvbpsi_DetachNIT
00126  *****************************************************************************/
00136 void dvbpsi_DetachNIT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
00137                       uint16_t i_extension);
00138 
00139 /*****************************************************************************
00140  * dvbpsi_InitNIT/dvbpsi_NewNIT
00141  *****************************************************************************/
00152 void dvbpsi_InitNIT(dvbpsi_nit_t* p_nit, uint16_t i_network_id,
00153                     uint8_t i_version, bool b_current_next);
00154 
00164 dvbpsi_nit_t *dvbpsi_NewNIT(uint16_t i_network_id, uint8_t i_version,
00165                             bool b_current_next);
00166 
00167 /*****************************************************************************
00168  * dvbpsi_EmptyNIT/dvbpsi_DeleteNIT
00169  *****************************************************************************/
00176 void dvbpsi_EmptyNIT(dvbpsi_nit_t* p_nit);
00177 
00184 void dvbpsi_DeleteNIT(dvbpsi_nit_t *p_nit);
00185 
00186 /*****************************************************************************
00187  * dvbpsi_NITAddDescriptor
00188  *****************************************************************************/
00201 dvbpsi_descriptor_t* dvbpsi_NITAddDescriptor(dvbpsi_nit_t *p_nit,
00202                                              uint8_t i_tag, uint8_t i_length,
00203                                              uint8_t *p_data);
00204 
00205 /*****************************************************************************
00206  * dvbpsi_NITAddTS
00207  *****************************************************************************/
00217 dvbpsi_nit_ts_t* dvbpsi_NITAddTS(dvbpsi_nit_t* p_nit,
00218                                  uint16_t i_ts_id, uint16_t i_orig_network_id);
00219 
00220 /*****************************************************************************
00221  * dvbpsi_NITTSAddDescriptor
00222  *****************************************************************************/
00235 dvbpsi_descriptor_t* dvbpsi_NITTSAddDescriptor(dvbpsi_nit_ts_t* p_ts,
00236                                                uint8_t i_tag, uint8_t i_length,
00237                                                uint8_t* p_data);
00238 
00239 /*****************************************************************************
00240  * dvbpsi_GenNITSections
00241  *****************************************************************************/
00253 dvbpsi_psi_section_t* dvbpsi_GenNITSections(dvbpsi_t* p_dvbpsi, dvbpsi_nit_t* p_nit,
00254                                             uint8_t i_table_id);
00255 
00256 #ifdef __cplusplus
00257 };
00258 #endif
00259 
00260 #else
00261 #error "Multiple inclusions of nit.h"
00262 #endif
00263 

Generated on Sat May 19 2012 07:56:18 for libdvbpsi by  doxygen 1.7.1