Application interface for the BAT decoder.
More...
Go to the source code of this file.
|
bool | dvbpsi_bat_attach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_bat_callback pf_callback, void *p_cb_data) |
| Creation and initialization of a BAT decoder. It will be attached to p_dvbpsi. More...
|
|
void | dvbpsi_bat_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension) |
| Destroy a BAT decoder. More...
|
|
void | dvbpsi_bat_init (dvbpsi_bat_t *p_bat, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next) |
| Initialize a user-allocated dvbpsi_bat_t structure. More...
|
|
dvbpsi_bat_t * | dvbpsi_bat_new (uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next) |
| Allocate and initialize a new dvbpsi_bat_t structure. More...
|
|
void | dvbpsi_bat_empty (dvbpsi_bat_t *p_bat) |
| Clean a dvbpsi_bat_t structure. More...
|
|
void | dvbpsi_bat_delete (dvbpsi_bat_t *p_bat) |
| Clean and free a dvbpsi_bat_t structure. More...
|
|
dvbpsi_descriptor_t * | dvbpsi_bat_bouquet_descriptor_add (dvbpsi_bat_t *p_bat, uint8_t i_tag, uint8_t i_length, uint8_t *p_data) |
| Add a descriptor in the BAT. More...
|
|
dvbpsi_bat_ts_t * | dvbpsi_bat_ts_add (dvbpsi_bat_t *p_bat, uint16_t i_ts_id, uint16_t i_orig_network_id) |
| Add a TS description at the end of the BAT. More...
|
|
dvbpsi_descriptor_t * | dvbpsi_bat_ts_descriptor_add (dvbpsi_bat_ts_t *p_bat, uint8_t i_tag, uint8_t i_length, uint8_t *p_data) |
| Add a descriptor in the BAT TS descriptors. More...
|
|
dvbpsi_psi_section_t * | dvbpsi_bat_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_bat_t *p_bat) |
| BAT generator. More...
|
|
Application interface for the BAT decoder.
- Author
- Zhu zhenglu zhuzl.nosp@m.u@gm.nosp@m.ail.c.nosp@m.om Application interface for the BAT decoder. New decoded BAT are sent by callback to the application. If a table wasn't active (b_current_next == false) and the next is the same but active (b_current_next == true) then the service description list is empty and should be caught from the previous structure. This is a simulation to sdt.h
bool dvbpsi_bat_attach |
( |
dvbpsi_t * |
p_dvbpsi, |
|
|
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension, |
|
|
dvbpsi_bat_callback |
pf_callback, |
|
|
void * |
p_cb_data |
|
) |
| |
Creation and initialization of a BAT decoder. It will be attached to p_dvbpsi.
- Parameters
-
p_dvbpsi | dvbpsi handle to Subtable demultiplexor to which the decoder is attached. |
i_table_id | Table ID, 0x4a. |
i_extension | Table ID extension, here bouquet ID. |
pf_callback | function to call back on new BAT. |
p_cb_data | private data given in argument to the callback. |
- Returns
- true on success, false on failure
Add a descriptor in the BAT.
- Parameters
-
p_bat | pointer to the BAT structure |
i_tag | descriptor's tag |
i_length | descriptor's length |
p_data | descriptor's data |
- Returns
- a pointer to the added descriptor.
Clean and free a dvbpsi_bat_t structure.
- Parameters
-
p_bat | pointer to the BAT structure |
- Returns
- nothing.
void dvbpsi_bat_detach |
( |
dvbpsi_t * |
p_dvbpsi, |
|
|
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension |
|
) |
| |
Destroy a BAT decoder.
- Parameters
-
p_dvbpsi | dvbpsi handle to Subtable demultiplexor to which the decoder is attached. |
i_table_id | Table ID, 0x4a. |
i_extension | Table ID extension, here bouquet ID. |
- Returns
- nothing.
Clean a dvbpsi_bat_t structure.
- Parameters
-
p_bat | pointer to the BAT structure |
- Returns
- nothing.
void dvbpsi_bat_init |
( |
dvbpsi_bat_t * |
p_bat, |
|
|
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension, |
|
|
uint8_t |
i_version, |
|
|
bool |
b_current_next |
|
) |
| |
Initialize a user-allocated dvbpsi_bat_t structure.
- Parameters
-
p_bat | pointer to the BAT structure |
i_table_id | Table ID, 0x4a. |
i_extension | Table ID extension, here bouquet ID. |
i_version | BAT version |
b_current_next | current next indicator |
- Returns
- nothing.
dvbpsi_bat_t * dvbpsi_bat_new |
( |
uint8_t |
i_table_id, |
|
|
uint16_t |
i_extension, |
|
|
uint8_t |
i_version, |
|
|
bool |
b_current_next |
|
) |
| |
Allocate and initialize a new dvbpsi_bat_t structure.
- Parameters
-
i_table_id | Table ID, 0x4a. |
i_extension | Table ID extension, here bouquet ID. |
i_version | BAT version |
b_current_next | current next indicator |
- Returns
- p_bat pointer to the BAT structure
BAT generator.
- Parameters
-
p_dvbpsi | handle to dvbpsi with attached decoder |
p_bat | BAT structure |
- Returns
- a pointer to the list of generated PSI sections.
Generate BAT sections based on the dvbpsi_bat_t structure.
Add a TS description at the end of the BAT.
- Parameters
-
p_bat | pointer to the BAT structure |
i_ts_id | descriptor's transport stream id |
i_orig_network_id | descriptor's original network id |
- Returns
- a pointer to the added descriptor.
Add a descriptor in the BAT TS descriptors.
- Parameters
-
p_bat | pointer to the BAT structure |
i_tag | descriptor number |
i_length | length of descriptor in bytes |
p_data | pointer to descriptor data |
- Returns
- a pointer to the added descriptor.