libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
Data Structures | Typedefs | Functions | Variables
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...
 

Typedefs

typedef void(* dvbpsi_tot_callback) (void *p_priv, dvbpsi_tot_t *p_new_tot)
 Callback type definition.
 

Functions

struct dvbpsi_tot_s __attribute__ ((packed)) dvbpsi_tot_t
 
bool dvbpsi_tot_attach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_tot_callback pf_callback, void *p_priv)
 Creation and initialization of a TDT/TOT decoder. More...
 
void dvbpsi_tot_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
 Destroy a TDT/TOT decoder. More...
 
void dvbpsi_tot_init (dvbpsi_tot_t *p_tot, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint64_t i_utc_time)
 Initialize a user-allocated dvbpsi_tot_t structure. More...
 
dvbpsi_tot_t * dvbpsi_tot_new (uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint64_t i_utc_time)
 Allocate and initialize a new dvbpsi_tot_t structure. More...
 
void dvbpsi_tot_empty (dvbpsi_tot_t *p_tot)
 Clean a dvbpsi_tot_t structure. More...
 
void dvbpsi_tot_delete (dvbpsi_tot_t *p_tot)
 Clean and free a dvbpsi_tot_t structure. More...
 
dvbpsi_descriptor_tdvbpsi_tot_descriptor_add (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_tot_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_tot_t *p_tot)
 

Variables

uint8_t i_table_id
 
uint16_t i_extension
 
uint8_t i_version
 
bool b_current_next
 
uint64_t i_utc_time
 
dvbpsi_descriptor_tp_first_descriptor
 

Detailed Description

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

>

Author
Johann Hanne

Application interface for the TDT (Time and Date Table)/TOT (Time Offset Table) decoder and the TDT/TOT generator. New decoded TDT/TOT tables are sent by callback to the application.

Function Documentation

◆ dvbpsi_tot_attach()

bool dvbpsi_tot_attach ( dvbpsi_t p_dvbpsi,
uint8_t  i_table_id,
uint16_t  i_extension,
dvbpsi_tot_callback  pf_callback,
void *  p_priv 
)

Creation and initialization of a TDT/TOT decoder.

Parameters
p_dvbpsidvbpsi handle pointing to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, usually 0x70
i_extensionTable ID extension, unused in the TDT/TOT
pf_callbackfunction to call back on new TDT/TOT.
p_privprivate data given in argument to the callback.
Returns
true on success, false on failure

◆ dvbpsi_tot_delete()

dvbpsi_tot_delete ( dvbpsi_tot_t *  p_tot)

Clean and free a dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
Returns
nothing.

◆ dvbpsi_tot_descriptor_add()

dvbpsi_descriptor_t * dvbpsi_tot_descriptor_add ( 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.

◆ dvbpsi_tot_detach()

int dvbpsi_tot_detach ( dvbpsi_t p_dvbpsi,
uint8_t  i_table_id,
uint16_t  i_extension 
)

Destroy a TDT/TOT decoder.

Parameters
p_dvbpsiSubtable demultiplexor to which the decoder is attached.
i_table_idTable ID, usually 0x70
i_extensionTable ID extension, unused in the TDT/TOT
Returns
nothing.

◆ dvbpsi_tot_empty()

void dvbpsi_tot_empty ( dvbpsi_tot_t *  p_tot)

Clean a dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
Returns
nothing.

◆ dvbpsi_tot_init()

void dvbpsi_tot_init ( dvbpsi_tot_t *  p_tot,
uint8_t  i_table_id,
uint16_t  i_extension,
uint8_t  i_version,
bool  b_current_next,
uint64_t  i_utc_time 
)

Initialize a user-allocated dvbpsi_tot_t structure.

Parameters
p_totpointer to the TDT/TOT structure
i_table_idTable ID, usually 0x70
i_extensionTable ID extension, unused in the TDT/TOT
i_versionSDT version
b_current_nextcurrent next indicator
i_utc_timethe time in UTC
Returns
nothing.

◆ dvbpsi_tot_new()

dvbpsi_tot_t * dvbpsi_tot_new ( uint8_t  i_table_id,
uint16_t  i_extension,
uint8_t  i_version,
bool  b_current_next,
uint64_t  i_utc_time 
)

Allocate and initialize a new dvbpsi_tot_t structure.

Parameters
i_table_idTable ID, usually 0x70
i_extensionTable ID extension, unused in the TDT/TOT
i_versionSDT version
b_current_nextcurrent next indicator
i_utc_timethe time in UTC
Returns
p_tot pointer to the TDT/TOT structure

Variable Documentation

◆ b_current_next

bool b_current_next

current_next_indicator

◆ i_extension

uint16_t i_extension

subtable id

◆ i_table_id

uint8_t i_table_id

table id

◆ i_utc_time

uint64_t i_utc_time

UTC_time

◆ i_version

uint8_t i_version

version_number

◆ p_first_descriptor

dvbpsi_descriptor_t* p_first_descriptor

descriptor list