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 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 |
bool | dvbpsi_tot_attach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_tot_callback pf_callback, void *p_cb_data) |
| Creation and initialization of a TDT/TOT decoder.
|
void | dvbpsi_tot_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension) |
| Destroy a TDT/TOT decoder.
|
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.
|
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.
|
void | dvbpsi_tot_empty (dvbpsi_tot_t *p_tot) |
| Clean a dvbpsi_tot_t structure.
|
void | dvbpsi_tot_delete (dvbpsi_tot_t *p_tot) |
| Clean and free a dvbpsi_tot_t structure.
|
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.
|
dvbpsi_psi_section_t * | dvbpsi_tot_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_tot_t *p_tot) |
| TDT/TOT generator.
|
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
bool dvbpsi_tot_attach |
( |
dvbpsi_t * |
p_dvbpsi, |
|
|
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension, |
|
|
dvbpsi_tot_callback |
pf_callback, |
|
|
void * |
p_cb_data | |
|
) |
| | |
Creation and initialization of a TDT/TOT decoder.
- Parameters:
-
| p_dvbpsi | dvbpsi handle pointing to Subtable demultiplexor to which the decoder is attached. |
| i_table_id | Table ID, usually 0x70 |
| i_extension | Table ID extension, unused in the TDT/TOT |
| pf_callback | function to call back on new TDT/TOT. |
| p_cb_data | private data given in argument to the callback. |
- Returns:
- true on success, false on failure
Clean and free a dvbpsi_tot_t structure.
- Parameters:
-
| p_tot | pointer to the TDT/TOT structure |
- Returns:
- nothing.
Add a descriptor in the TOT.
- Parameters:
-
| p_tot | pointer to the TOT structure |
| i_tag | descriptor's tag |
| i_length | descriptor's length |
| p_data | descriptor's data |
- Returns:
- a pointer to the added descriptor.
int dvbpsi_tot_detach |
( |
dvbpsi_t * |
p_dvbpsi, |
|
|
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension | |
|
) |
| | |
Destroy a TDT/TOT decoder.
- Parameters:
-
| p_dvbpsi | Subtable demultiplexor to which the decoder is attached. |
| i_table_id | Table ID, usually 0x70 |
| i_extension | Table ID extension, unused in the TDT/TOT |
- Returns:
- nothing.
Clean a dvbpsi_tot_t structure.
- Parameters:
-
| p_tot | pointer to the TDT/TOT structure |
- Returns:
- nothing.
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_tot | pointer to the TDT/TOT structure |
| i_table_id | Table ID, usually 0x70 |
| i_extension | Table ID extension, unused in the TDT/TOT |
| i_version | SDT version |
| b_current_next | current next indicator |
| i_utc_time | the time in UTC |
- Returns:
- nothing.
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_id | Table ID, usually 0x70 |
| i_extension | Table ID extension, unused in the TDT/TOT |
| i_version | SDT version |
| b_current_next | current next indicator |
| i_utc_time | the time in UTC |
- Returns:
- p_tot pointer to the TDT/TOT structure
TDT/TOT generator.
- Parameters:
-
| p_dvbpsi | handle to dvbpsi with attached decoder |
| p_tot | TDT/TOT structure |
- Returns:
- a pointer to the list of generated PSI sections.
Generate TDT/TOT sections based on the dvbpsi_tot_t structure.