bat.h File Reference
Application interface for the BAT decoder.
More...
Go to the source code of this file.
Data Structures |
struct | dvbpsi_bat_ts_s |
| BAT transport stream description structure. More...
|
struct | dvbpsi_bat_s |
| BAT structure. More...
|
Typedefs |
typedef struct dvbpsi_bat_ts_s | dvbpsi_bat_ts_t |
| dvbpsi_bat_ts_t type definition.
|
typedef struct dvbpsi_bat_s | dvbpsi_bat_t |
| dvbpsi_bat_t type definition.
|
typedef void(* | dvbpsi_bat_callback )(void *p_cb_data, dvbpsi_bat_t *p_new_bat) |
| Callback type definition.
|
Functions |
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.
|
void | dvbpsi_bat_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension) |
| Destroy a BAT decoder.
|
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.
|
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.
|
void | dvbpsi_bat_empty (dvbpsi_bat_t *p_bat) |
| Clean a dvbpsi_bat_t structure.
|
void | dvbpsi_bat_delete (dvbpsi_bat_t *p_bat) |
| Clean and free a dvbpsi_bat_t structure.
|
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.
|
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.
|
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.
|
dvbpsi_psi_section_t * | dvbpsi_bat_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_bat_t *p_bat) |
| BAT generator.
|
Detailed Description
Application interface for the BAT decoder.
- Author:
- Zhu zhenglu <zhuzlu@gmail.com> 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
Function Documentation
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.