libdvbpsi 0.1.0
|
Application interface for the NIT decoder and the NIT generator. More...
Go to the source code of this file.
Data Structures | |
struct | dvbpsi_nit_ts_s |
NIT TS structure. More... | |
struct | dvbpsi_nit_s |
NIT structure. More... | |
Defines | |
#define | dvbpsi_NewNIT(p_nit, i_network_id,i_version, b_current_next) |
Allocate and initialize a new dvbpsi_nit_t structure. | |
#define | dvbpsi_DeleteNIT(p_nit) |
Clean and free a dvbpsi_nit_t structure. | |
Typedefs | |
typedef struct dvbpsi_nit_ts_s | dvbpsi_nit_ts_t |
dvbpsi_nit_ts_t type definition. | |
typedef struct dvbpsi_nit_s | dvbpsi_nit_t |
dvbpsi_nit_t type definition. | |
typedef void(* | dvbpsi_nit_callback )(void *p_cb_data, dvbpsi_nit_t *p_new_nit) |
Callback type definition. | |
Functions | |
int | dvbpsi_AttachNIT (dvbpsi_decoder_t *p_psi_decoder, uint8_t i_table_id, uint16_t i_extension, dvbpsi_nit_callback pf_callback, void *p_cb_data) |
void | dvbpsi_DetachNIT (dvbpsi_demux_t *p_demux, uint8_t i_table_id, uint16_t i_extension) |
Destroy a NIT decoder. | |
void | dvbpsi_InitNIT (dvbpsi_nit_t *p_nit, uint16_t i_network_id, uint8_t i_version, int b_current_next) |
Initialize a user-allocated dvbpsi_nit_t structure. | |
void | dvbpsi_EmptyNIT (dvbpsi_nit_t *p_nit) |
Clean a dvbpsi_nit_t structure. | |
dvbpsi_descriptor_t * | dvbpsi_NITAddDescriptor (dvbpsi_nit_t *p_nit, uint8_t i_tag, uint8_t i_length, uint8_t *p_data) |
Add a descriptor in the NIT. | |
dvbpsi_nit_ts_t * | dvbpsi_NITAddTS (dvbpsi_nit_t *p_nit, uint16_t i_ts_id, uint16_t i_orig_network_id) |
dvbpsi_descriptor_t * | dvbpsi_NITTSAddDescriptor (dvbpsi_nit_ts_t *p_ts, uint8_t i_tag, uint8_t i_length, uint8_t *p_data) |
Add a descriptor in the NIT TS. | |
dvbpsi_psi_section_t * | dvbpsi_GenNITSections (dvbpsi_nit_t *p_nit, uint8_t i_table_id) |
NIT generator. |
Application interface for the NIT decoder and the NIT generator.
>
#define dvbpsi_DeleteNIT | ( | p_nit | ) |
do { \ dvbpsi_EmptyNIT(p_nit); \ free(p_nit); \ } while(0);
Clean and free a dvbpsi_nit_t structure.
p_nit | pointer to the NIT structure |
#define dvbpsi_NewNIT | ( | p_nit, | |
i_network_id, | |||
i_version, | |||
b_current_next | |||
) |
do { \ p_nit = (dvbpsi_nit_t*)malloc(sizeof(dvbpsi_nit_t)); \ if(p_nit != NULL) \ dvbpsi_InitNIT(p_nit, i_network_id, i_version, b_current_next); \ } while(0);
Allocate and initialize a new dvbpsi_nit_t structure.
p_nit | pointer to the NIT structure |
i_network_id | network id |
i_version | NIT version |
b_current_next | current next indicator |
i_pcr_pid | PCR_PID |
void dvbpsi_DetachNIT | ( | dvbpsi_demux_t * | p_demux, |
uint8_t | i_table_id, | ||
uint16_t | i_extension | ||
) |
Destroy a NIT decoder.
p_demux | Subtable demultiplexor to which the decoder is attached. |
i_table_id | Table ID, 0x4E, 0x4F, or 0x50-0x6F. |
i_extension | Table ID extension, here service ID. |
void dvbpsi_EmptyNIT | ( | dvbpsi_nit_t * | p_nit | ) |
Clean a dvbpsi_nit_t structure.
p_nit | pointer to the NIT structure |
dvbpsi_psi_section_t * dvbpsi_GenNITSections | ( | dvbpsi_nit_t * | p_nit, |
uint8_t | i_table_id | ||
) |
NIT generator.
p_nit | NIT structure |
i_table_id | table id, 0x40 = actual network / 0x41 = other network |
Generate NIT sections based on the dvbpsi_nit_t structure.
void dvbpsi_InitNIT | ( | dvbpsi_nit_t * | p_nit, |
uint16_t | i_network_id, | ||
uint8_t | i_version, | ||
int | b_current_next | ||
) |
Initialize a user-allocated dvbpsi_nit_t structure.
p_nit | pointer to the NIT structure |
i_network_id | network id |
i_version | NIT version |
b_current_next | current next indicator |
dvbpsi_descriptor_t * dvbpsi_NITAddDescriptor | ( | dvbpsi_nit_t * | p_nit, |
uint8_t | i_tag, | ||
uint8_t | i_length, | ||
uint8_t * | p_data | ||
) |
Add a descriptor in the NIT.
p_nit | pointer to the NIT structure |
i_tag | descriptor's tag |
i_length | descriptor's length |
p_data | descriptor's data |
dvbpsi_descriptor_t * dvbpsi_NITTSAddDescriptor | ( | dvbpsi_nit_ts_t * | p_ts, |
uint8_t | i_tag, | ||
uint8_t | i_length, | ||
uint8_t * | p_data | ||
) |
Add a descriptor in the NIT TS.
p_ts | pointer to the TS structure |
i_tag | descriptor's tag |
i_length | descriptor's length |
p_data | descriptor's data |