libdvbpsi  1.2.0
Data Structures | Functions
psi.h File Reference

Common PSI tools. More...

Go to the source code of this file.

Data Structures

struct  dvbpsi_psi_section_s
 PSI section structure. More...

Functions

dvbpsi_psi_section_tdvbpsi_NewPSISection (int i_max_size)
 Creation of a new dvbpsi_psi_section_t structure.
void dvbpsi_DeletePSISections (dvbpsi_psi_section_t *p_section)
 Destruction of a dvbpsi_psi_section_t structure.
bool dvbpsi_CheckPSISection (dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section, const uint8_t table_id, const char *psz_table_name)
 Check if PSI section has the expected table_id. Call this function only for PSI sections that have a CRC32 (.
bool dvbpsi_ValidPSISection (dvbpsi_psi_section_t *p_section)
 Validity check of a PSI section, make sure to call this function on tables that have a CRC32 (.
void dvbpsi_BuildPSISection (dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
 Build a valid section based on the information in the structure.
void dvbpsi_CalculateCRC32 (dvbpsi_psi_section_t *p_section)
 Calculate the CRC32 field accourding to ISO/IEC 13818-1, ITU-T Rec H.222.0 or ETSI EN 300 468 v1.13.1.

Detailed Description

Common PSI tools.

>

Author
Arnaud de Bossoreille de Ribou bozo@.nosp@m.via..nosp@m.ecp.f.nosp@m.r PSI section structure and its Manipulation tools.

Function Documentation

void dvbpsi_BuildPSISection ( dvbpsi_t p_dvbpsi,
dvbpsi_psi_section_t p_section 
)

Build a valid section based on the information in the structure.

Parameters
p_dvbpsidvbpsi handle
p_sectionpointer to the PSI section structure
Returns
nothing.
void dvbpsi_CalculateCRC32 ( dvbpsi_psi_section_t p_section)

Calculate the CRC32 field accourding to ISO/IEC 13818-1, ITU-T Rec H.222.0 or ETSI EN 300 468 v1.13.1.

Parameters
p_sectionpointer to PSI section, make sure p_payload_end does not include the CRC32 field.
Returns
nothing.
bool dvbpsi_CheckPSISection ( dvbpsi_t p_dvbpsi,
dvbpsi_psi_section_t p_section,
const uint8_t  table_id,
const char *  psz_table_name 
)

Check if PSI section has the expected table_id. Call this function only for PSI sections that have a CRC32 (.

See Also
dvbpsi_has_CRC32() function)
Parameters
p_dvbpsipointer to dvbpsi library handle
p_sectionpointer to the PSI section structure
table_idexpected table id
psz_table_nametable name to use when reporting errors.
Returns
boolean value (false if the section did not pass the tests).
void dvbpsi_DeletePSISections ( dvbpsi_psi_section_t p_section)

Destruction of a dvbpsi_psi_section_t structure.

Parameters
p_sectionpointer to the first PSI section structure
Returns
nothing.
dvbpsi_psi_section_t * dvbpsi_NewPSISection ( int  i_max_size)

Creation of a new dvbpsi_psi_section_t structure.

Parameters
i_max_sizemax size in bytes of the section
Returns
a pointer to the new PSI section structure.
bool dvbpsi_ValidPSISection ( dvbpsi_psi_section_t p_section)

Validity check of a PSI section, make sure to call this function on tables that have a CRC32 (.

See Also
dvbpsi_has_CRC32() function)
Parameters
p_sectionpointer to the PSI section structure
Returns
boolean value (false if the section is not valid).

Check the CRC_32 if the section has b_syntax_indicator set.