libdvbpsi  1.3.0
atsc_ett.h
Go to the documentation of this file.
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 ett.h
00019 
00020 */
00021 
00028 #ifndef _ATSC_ETT_H
00029 #define _ATSC_ETT_H
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 /*****************************************************************************
00036  * dvbpsi_atsc_ett_t
00037  *****************************************************************************/
00055 typedef struct dvbpsi_atsc_ett_s
00056 {
00057     /* general PSI table */
00058     uint8_t                 i_table_id;     
00059     uint16_t                i_extension;    
00063     uint8_t                 i_version;      
00064     bool                    b_current_next; 
00065     uint8_t                 i_protocol;     
00067     /* ETT specific */
00068     uint32_t                i_etm_id;       
00071     uint32_t                i_etm_length;   
00072     uint8_t                 *p_etm_data;    
00075     dvbpsi_descriptor_t    *p_first_descriptor; 
00076 } dvbpsi_atsc_ett_t;
00077 
00078 /*****************************************************************************
00079  * dvbpsi_atsc_ett_callback
00080  *****************************************************************************/
00086 typedef void (* dvbpsi_atsc_ett_callback)(void* p_cb_data, dvbpsi_atsc_ett_t* p_new_ett);
00087 
00088 /*****************************************************************************
00089  * dvbpsi_atsc_AttachETT
00090  *****************************************************************************/
00103 bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
00104                            dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data);
00105 
00106 /*****************************************************************************
00107  * dvbpsi_atsc_DetachETT
00108  *****************************************************************************/
00118 void dvbpsi_atsc_DetachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
00119           uint16_t i_extension);
00120 
00121 /*****************************************************************************
00122  * dvbpsi_atsc_InitETT/dvbpsi_atsc_NewETT
00123  *****************************************************************************/
00137 void dvbpsi_atsc_InitETT(dvbpsi_atsc_ett_t *p_ett, uint8_t i_table_id, uint16_t i_extension,
00138                          uint8_t i_version, uint8_t i_protocol,
00139                          uint32_t i_etm_id, bool b_current_next);
00140 
00154 dvbpsi_atsc_ett_t *dvbpsi_atsc_NewETT(uint8_t i_table_id, uint16_t i_extension,
00155                                       uint8_t i_version, uint8_t i_protocol,
00156                                       uint32_t i_etm_id, bool b_current_next);
00157 
00158 /*****************************************************************************
00159  * dvbpsi_atsc_EmptyETT/dvbpsi_atsc_DeleteETT
00160  *****************************************************************************/
00167 void dvbpsi_atsc_EmptyETT(dvbpsi_atsc_ett_t *p_ett);
00168 
00175 void dvbpsi_atsc_DeleteETT(dvbpsi_atsc_ett_t *p_ett);
00176 
00177 #ifdef __cplusplus
00178 };
00179 #endif
00180 
00181 #endif