libdvbpsi  1.3.0
atsc_stt.h
Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2006-2012  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 stt.h
00019 
00020 */
00021 
00028 #ifndef _ATSC_STT_H
00029 #define _ATSC_STT_H
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 /*****************************************************************************
00036  * dvbpsi_atsc_stt_t
00037  *****************************************************************************/
00048 typedef struct dvbpsi_atsc_stt_s
00049 {
00050     uint8_t                 i_table_id;         
00051     uint16_t                i_extension;        
00053     uint8_t                 i_version;          
00054     bool                    b_current_next;     
00056     uint32_t                i_system_time;      
00057     uint8_t                 i_gps_utc_offset;   
00058     uint16_t                i_daylight_savings; 
00060     dvbpsi_descriptor_t    *p_first_descriptor; 
00061 } dvbpsi_atsc_stt_t;
00062 
00063 /*****************************************************************************
00064  * dvbpsi_atsc_stt_callback
00065  *****************************************************************************/
00071 typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data, dvbpsi_atsc_stt_t* p_new_stt);
00072 
00073 /*****************************************************************************
00074  * dvbpsi_atsc_AttachSTT
00075  *****************************************************************************/
00087 bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
00088           dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data);
00089 
00090 /*****************************************************************************
00091  * dvbpsi_atsc_DetachSTT
00092  *****************************************************************************/
00103 void dvbpsi_atsc_DetachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_externsion);
00104 
00105 /*****************************************************************************
00106  * dvbpsi_atsc_InitSTT/dvbpsi_atsc_NewSTT
00107  *****************************************************************************/
00120 void dvbpsi_atsc_InitSTT(dvbpsi_atsc_stt_t *p_stt, uint8_t i_table_id, uint16_t i_extension,
00121                          uint8_t i_protocol, bool b_current_next);
00122 
00133 dvbpsi_atsc_stt_t *dvbpsi_atsc_NewSTT(uint8_t i_table_id, uint16_t i_extension,
00134                                       uint8_t i_version, bool b_current_next);
00135 
00136 /*****************************************************************************
00137  * dvbpsi_atsc_EmptySTT
00138  *****************************************************************************/
00145 void dvbpsi_atsc_EmptySTT(dvbpsi_atsc_stt_t *p_stt);
00146 
00153 void dvbpsi_atsc_DeleteSTT(dvbpsi_atsc_stt_t *p_stt);
00154 
00155 #ifdef __cplusplus
00156 };
00157 #endif
00158 
00159 #endif