libdvbpsi
1.3.0
|
00001 /* 00002 Copyright (C) 2006 Adam Charrett 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with this library; if not, write to the Free Software 00016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00017 00018 eit.h 00019 00020 */ 00021 00028 #ifndef _ATSC_EIT_H 00029 #define _ATSC_EIT_H 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 /***************************************************************************** 00036 * dvbpsi_atsc_eit_event_t 00037 *****************************************************************************/ 00048 typedef struct dvbpsi_atsc_eit_event_s 00049 { 00050 uint16_t i_event_id; 00051 uint32_t i_start_time; 00052 uint8_t i_etm_location; 00053 uint32_t i_length_seconds; 00054 uint8_t i_title_length; 00055 uint8_t i_title[256]; 00057 dvbpsi_descriptor_t *p_first_descriptor; 00059 struct dvbpsi_atsc_eit_event_s *p_next; 00061 } dvbpsi_atsc_eit_event_t; 00062 00063 /***************************************************************************** 00064 * dvbpsi_atsc_eit_t 00065 *****************************************************************************/ 00076 typedef struct dvbpsi_atsc_eit_s 00077 { 00078 uint8_t i_table_id; 00079 uint16_t i_extension; 00081 uint8_t i_version; 00082 bool b_current_next; 00083 uint16_t i_source_id; 00084 uint8_t i_protocol; 00086 dvbpsi_atsc_eit_event_t *p_first_event; 00088 dvbpsi_descriptor_t *p_first_descriptor; 00089 } dvbpsi_atsc_eit_t; 00090 00091 /***************************************************************************** 00092 * dvbpsi_eit_callback 00093 *****************************************************************************/ 00099 typedef void (* dvbpsi_atsc_eit_callback)(void* p_cb_data, dvbpsi_atsc_eit_t* p_new_eit); 00100 00101 /***************************************************************************** 00102 * dvbpsi_atsc_AttachEIT 00103 *****************************************************************************/ 00116 bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, 00117 dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data); 00118 00119 /***************************************************************************** 00120 * dvbpsi_eit_detach 00121 *****************************************************************************/ 00131 void dvbpsi_atsc_DetachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension); 00132 00133 /***************************************************************************** 00134 * dvbpsi_atsc_InitEIT/dvbpsi_atsc_NewEIT 00135 *****************************************************************************/ 00150 void dvbpsi_atsc_InitEIT(dvbpsi_atsc_eit_t* p_eit, uint8_t i_table_id, uint16_t i_extension, 00151 uint8_t i_version, uint8_t i_protocol, uint16_t i_source_id, bool b_current_next); 00152 00166 dvbpsi_atsc_eit_t *dvbpsi_atsc_NewEIT(uint8_t i_table_id, uint16_t i_extension, 00167 uint8_t i_version, uint8_t i_protocol, 00168 uint16_t i_source_id, bool b_current_next); 00169 00170 /***************************************************************************** 00171 * dvbpsi_atsc_EmptyEIT 00172 *****************************************************************************/ 00179 void dvbpsi_atsc_EmptyEIT(dvbpsi_atsc_eit_t *p_eit); 00180 00187 void dvbpsi_atsc_DeleteEIT(dvbpsi_atsc_eit_t *p_eit); 00188 00189 #ifdef __cplusplus 00190 }; 00191 #endif 00192 00193 #endif