libdvbpsi
2.0.0-git
MPEG Transport Stream PSI table parser
|
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_priv, 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_priv) |
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) |
Application interface for the BAT decoder.
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
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.
p_bat | pointer to the BAT structure |
i_tag | descriptor's tag |
i_length | descriptor's length |
p_data | descriptor's data |
dvbpsi_bat_delete | ( | dvbpsi_bat_t * | p_bat | ) |
Clean and free a dvbpsi_bat_t structure.
p_bat | pointer to the BAT structure |
void dvbpsi_bat_detach | ( | dvbpsi_t * | p_dvbpsi, |
uint8_t | i_table_id, | ||
uint16_t | i_extension | ||
) |
Destroy a BAT decoder.
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. |
void dvbpsi_bat_empty | ( | dvbpsi_bat_t * | p_bat | ) |
Clean a dvbpsi_bat_t structure.
p_bat | pointer to the BAT structure |
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.
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 |
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.
i_table_id | Table ID, 0x4a. |
i_extension | Table ID extension, here bouquet ID. |
i_version | BAT version |
b_current_next | current next indicator |
dvbpsi_descriptor_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.
p_bat | pointer to the BAT structure |
i_ts_id | descriptor's transport stream id |
i_orig_network_id | descriptor's original network id |
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.
p_bat | pointer to the BAT structure |
i_tag | descriptor number |
i_length | length of descriptor in bytes |
p_data | pointer to descriptor data |