libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
Data Structures | Typedefs | Functions
pmt.h File Reference

Application interface for the PMT decoder and the PMT generator. More...

Go to the source code of this file.

Data Structures

struct  dvbpsi_pmt_es_s
 PMT ES structure. More...
 
struct  dvbpsi_pmt_s
 PMT structure. More...
 

Typedefs

typedef struct dvbpsi_pmt_es_s dvbpsi_pmt_es_t
 dvbpsi_pmt_es_t type definition.
 
typedef struct dvbpsi_pmt_s dvbpsi_pmt_t
 dvbpsi_pmt_t type definition.
 
typedef void(* dvbpsi_pmt_callback) (void *p_priv, dvbpsi_pmt_t *p_new_pmt)
 Callback type definition.
 

Functions

bool dvbpsi_pmt_attach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_pmt_callback pf_callback, void *p_priv)
 
void dvbpsi_pmt_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
 Destroy a PMT decoder. More...
 
void dvbpsi_pmt_init (dvbpsi_pmt_t *p_pmt, uint16_t i_program_number, uint8_t i_version, bool b_current_next, uint16_t i_pcr_pid)
 Initialize a user-allocated dvbpsi_pmt_t structure. More...
 
dvbpsi_pmt_tdvbpsi_pmt_new (uint16_t i_program_number, uint8_t i_version, bool b_current_next, uint16_t i_pcr_pid)
 Allocate and initialize a new dvbpsi_pmt_t structure. More...
 
void dvbpsi_pmt_empty (dvbpsi_pmt_t *p_pmt)
 Clean a dvbpsi_pmt_t structure. More...
 
void dvbpsi_pmt_delete (dvbpsi_pmt_t *p_pmt)
 Clean and free a dvbpsi_pmt_t structure. More...
 
dvbpsi_descriptor_tdvbpsi_pmt_descriptor_add (dvbpsi_pmt_t *p_pmt, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
 Add a descriptor in the PMT. More...
 
dvbpsi_pmt_es_tdvbpsi_pmt_es_add (dvbpsi_pmt_t *p_pmt, uint8_t i_type, uint16_t i_pid)
 Add an ES in the PMT. More...
 
dvbpsi_descriptor_tdvbpsi_pmt_es_descriptor_add (dvbpsi_pmt_es_t *p_es, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
 Add a descriptor in the PMT ES. More...
 
dvbpsi_psi_section_tdvbpsi_pmt_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_pmt_t *p_pmt)
 

Detailed Description

Application interface for the PMT decoder and the PMT generator.

>

Author
Arnaud de Bossoreille de Ribou bozo@.nosp@m.via..nosp@m.ecp.f.nosp@m.r

Application interface for the PMT decoder and the PMT generator. New decoded PMT tables are sent by callback to the application.

Function Documentation

◆ dvbpsi_pmt_delete()

void dvbpsi_pmt_delete ( dvbpsi_pmt_t p_pmt)

Clean and free a dvbpsi_pmt_t structure.

Parameters
p_pmtpointer to the PMT structure
Returns
nothing.

◆ dvbpsi_pmt_descriptor_add()

dvbpsi_descriptor_t * dvbpsi_pmt_descriptor_add ( dvbpsi_pmt_t p_pmt,
uint8_t  i_tag,
uint8_t  i_length,
uint8_t *  p_data 
)

Add a descriptor in the PMT.

Parameters
p_pmtpointer to the PMT structure
i_tagdescriptor's tag
i_lengthdescriptor's length
p_datadescriptor's data
Returns
a pointer to the added descriptor.

◆ dvbpsi_pmt_detach()

void dvbpsi_pmt_detach ( dvbpsi_t p_dvbpsi,
uint8_t  i_table_id,
uint16_t  i_extension 
)

Destroy a PMT decoder.

Parameters
p_dvbpsihandle
i_table_idTable ID
i_extensionNormally Table ID extension number, but for PMT's it is the program_number;
Returns
nothing.

The handle isn't valid any more.

◆ dvbpsi_pmt_empty()

void dvbpsi_pmt_empty ( dvbpsi_pmt_t p_pmt)

Clean a dvbpsi_pmt_t structure.

Parameters
p_pmtpointer to the PMT structure
Returns
nothing.

◆ dvbpsi_pmt_es_add()

dvbpsi_pmt_es_t * dvbpsi_pmt_es_add ( dvbpsi_pmt_t p_pmt,
uint8_t  i_type,
uint16_t  i_pid 
)

Add an ES in the PMT.

Parameters
p_pmtpointer to the PMT structure
i_typetype of ES
i_pidPID of the ES
Returns
a pointer to the added ES.

◆ dvbpsi_pmt_es_descriptor_add()

dvbpsi_descriptor_t * dvbpsi_pmt_es_descriptor_add ( dvbpsi_pmt_es_t p_es,
uint8_t  i_tag,
uint8_t  i_length,
uint8_t *  p_data 
)

Add a descriptor in the PMT ES.

Parameters
p_espointer to the ES structure
i_tagdescriptor's tag
i_lengthdescriptor's length
p_datadescriptor's data
Returns
a pointer to the added descriptor.

◆ dvbpsi_pmt_init()

void dvbpsi_pmt_init ( dvbpsi_pmt_t p_pmt,
uint16_t  i_program_number,
uint8_t  i_version,
bool  b_current_next,
uint16_t  i_pcr_pid 
)

Initialize a user-allocated dvbpsi_pmt_t structure.

Parameters
p_pmtpointer to the PMT structure
i_program_numberprogram number
i_versionPMT version
b_current_nextcurrent next indicator
i_pcr_pidPCR_PID
Returns
nothing.

◆ dvbpsi_pmt_new()

dvbpsi_pmt_t * dvbpsi_pmt_new ( uint16_t  i_program_number,
uint8_t  i_version,
bool  b_current_next,
uint16_t  i_pcr_pid 
)

Allocate and initialize a new dvbpsi_pmt_t structure.

Parameters
i_program_numberprogram number
i_versionPMT version
b_current_nextcurrent next indicator
i_pcr_pidPCR_PID
Returns
p_pmt pointer to the PMT structure