libdvbpsi  0.2.2
Data Structures | Macros | Typedefs | Functions
tot.h File Reference

Application interface for the TDT/TOT decoder and the TDT/TOT generator. More...

Go to the source code of this file.

Data Structures

struct  dvbpsi_tot_s
 TDT/TOT structure. More...
 

Macros

#define dvbpsi_NewTOT(p_tot, i_utc_time)
 Allocate and initialize a new dvbpsi_tot_t structure. More...
 
#define dvbpsi_DeleteTOT(p_tot)
 Clean and free a dvbpsi_tot_t structure. More...
 

Typedefs

typedef struct dvbpsi_tot_s dvbpsi_tot_t
 dvbpsi_tot_t type definition.
 
typedef void(* dvbpsi_tot_callback )(void *p_cb_data, dvbpsi_tot_t *p_new_tot)
 Callback type definition.
 

Functions

int dvbpsi_AttachTOT (dvbpsi_decoder_t *p_psi_decoder, uint8_t i_table_id, uint16_t i_extension, dvbpsi_tot_callback pf_callback, void *p_cb_data)
 
void dvbpsi_DetachTOT (dvbpsi_demux_t *p_demux, uint8_t i_table_id, uint16_t i_extension)
 
void dvbpsi_InitTOT (dvbpsi_tot_t *p_tot, uint64_t i_utc_time)
 
void dvbpsi_EmptyTOT (dvbpsi_tot_t *p_tot)
 Clean a dvbpsi_tot_t structure. More...
 
dvbpsi_descriptor_tdvbpsi_TOTAddDescriptor (dvbpsi_tot_t *p_tot, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
 Add a descriptor in the TOT. More...
 
dvbpsi_psi_section_tdvbpsi_GenTOTSections (dvbpsi_tot_t *p_tot)
 

Detailed Description

Application interface for the TDT/TOT decoder and the TDT/TOT generator.

Author
Johann Hanne Application interface for the TDT/TOT decoder and the TDT/TOT generator. New decoded TDT/TOT tables are sent by callback to the application.

Macro Definition Documentation

#define dvbpsi_DeleteTOT (   p_tot)
Value:
do { \
free(p_tot); \
} while(0);
void dvbpsi_EmptyTOT(dvbpsi_tot_t *p_tot)
Clean a dvbpsi_tot_t structure.

Clean and free a dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
Returns
nothing.
#define dvbpsi_NewTOT (   p_tot,
  i_utc_time 
)
Value:
do { \
p_tot = (dvbpsi_tot_t*)malloc(sizeof(dvbpsi_tot_t)); \
if(p_tot != NULL) \
dvbpsi_InitTOT(p_tot, i_utc_time); \
} while(0);
TDT/TOT structure.
Definition: tot.h:57

Allocate and initialize a new dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
i_utc_timethe time in UTC
Returns
nothing.

Function Documentation

void dvbpsi_EmptyTOT ( dvbpsi_tot_t p_tot)

Clean a dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
Returns
nothing.
dvbpsi_descriptor_t * dvbpsi_TOTAddDescriptor ( dvbpsi_tot_t p_tot,
uint8_t  i_tag,
uint8_t  i_length,
uint8_t *  p_data 
)

Add a descriptor in the TOT.

Parameters
p_totpointer to the TOT structure
i_tagdescriptor's tag
i_lengthdescriptor's length
p_datadescriptor's data
Returns
a pointer to the added descriptor.