libdvbpsi  1.2.0
Data Structures | Typedefs | Functions
pat.h File Reference

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

Go to the source code of this file.

Data Structures

struct  dvbpsi_pat_program_s
 PAT program structure. More...
struct  dvbpsi_pat_s
 PAT structure. More...

Typedefs

typedef struct dvbpsi_pat_program_s dvbpsi_pat_program_t
 dvbpsi_pat_program_t type definition.
typedef struct dvbpsi_pat_s dvbpsi_pat_t
 dvbpsi_pat_t type definition.
typedef void(* dvbpsi_pat_callback )(void *p_cb_data, dvbpsi_pat_t *p_new_pat)
 Callback type definition.

Functions

bool dvbpsi_pat_attach (dvbpsi_t *p_dvbpsi, dvbpsi_pat_callback pf_callback, void *p_cb_data)
 Creation and initialization of a PAT decoder. The decoder will be attached to 'p_dvbpsi' argument.
void dvbpsi_pat_detach (dvbpsi_t *p_dvbpsi)
 Destroy a PAT decoder.
void dvbpsi_pat_init (dvbpsi_pat_t *p_pat, uint16_t i_ts_id, uint8_t i_version, bool b_current_next)
 Initialize a user-allocated dvbpsi_pat_t structure.
dvbpsi_pat_tdvbpsi_pat_new (uint16_t i_ts_id, uint8_t i_version, bool b_current_next)
 Allocate and initialize a new dvbpsi_pat_t structure.
void dvbpsi_pat_empty (dvbpsi_pat_t *p_pat)
 Clean a dvbpsi_pat_t structure.
void dvbpsi_pat_delete (dvbpsi_pat_t *p_pat)
 Clean and free a dvbpsi_pat_t structure.
dvbpsi_pat_program_tdvbpsi_pat_program_add (dvbpsi_pat_t *p_pat, uint16_t i_number, uint16_t i_pid)
 Add a program at the end of the PAT.
dvbpsi_psi_section_tdvbpsi_pat_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_pat_t *p_pat, int i_max_pps)
 PAT generator.

Detailed Description

Application interface for the PAT decoder and the PAT generator.

>

Author
Arnaud de Bossoreille de Ribou bozo@.nosp@m.via..nosp@m.ecp.f.nosp@m.r Application interface for the PAT decoder and the PAT generator. New decoded PAT tables are sent by callback to the application.

Function Documentation

bool dvbpsi_pat_attach ( dvbpsi_t p_dvbpsi,
dvbpsi_pat_callback  pf_callback,
void *  p_cb_data 
)

Creation and initialization of a PAT decoder. The decoder will be attached to 'p_dvbpsi' argument.

Parameters
p_dvbpsihandle to dvbpsi with attached decoder
pf_callbackfunction to call back on new PAT
p_cb_dataprivate data given in argument to the callback
Returns
true on success, false on failure
void dvbpsi_pat_delete ( dvbpsi_pat_t p_pat)

Clean and free a dvbpsi_pat_t structure.

Parameters
p_patpointer to the PAT structure
Returns
nothing.
void dvbpsi_pat_detach ( dvbpsi_t p_dvbpsi)

Destroy a PAT decoder.

Parameters
p_dvbpsipointer to dvbpsi_t handle
Returns
nothing.

The handle isn't valid any more.

void dvbpsi_pat_empty ( dvbpsi_pat_t p_pat)

Clean a dvbpsi_pat_t structure.

Parameters
p_patpointer to the PAT structure
Returns
nothing.
void dvbpsi_pat_init ( dvbpsi_pat_t p_pat,
uint16_t  i_ts_id,
uint8_t  i_version,
bool  b_current_next 
)

Initialize a user-allocated dvbpsi_pat_t structure.

Parameters
p_patpointer to the PAT structure
i_ts_idtransport stream ID
i_versionPAT version
b_current_nextcurrent next indicator
Returns
nothing.
dvbpsi_pat_t * dvbpsi_pat_new ( uint16_t  i_ts_id,
uint8_t  i_version,
bool  b_current_next 
)

Allocate and initialize a new dvbpsi_pat_t structure.

Parameters
i_ts_idtransport stream ID
i_versionPAT version
b_current_nextcurrent next indicator
Returns
p_pat pointer to the PAT structure
dvbpsi_pat_program_t * dvbpsi_pat_program_add ( dvbpsi_pat_t p_pat,
uint16_t  i_number,
uint16_t  i_pid 
)

Add a program at the end of the PAT.

Parameters
p_patpointer to the PAT structure
i_numberprogram number
i_pidPID of the NIT/PMT
Returns
a pointer to the added program.
dvbpsi_psi_section_t * dvbpsi_pat_sections_generate ( dvbpsi_t p_dvbpsi,
dvbpsi_pat_t p_pat,
int  i_max_pps 
)

PAT generator.

Parameters
p_dvbpsihandle to dvbpsi with attached decoder
p_patpointer to the PAT structure
i_max_ppslimitation of the number of program in each section (max: 253).
Returns
a pointer to the list of generated PSI sections.

Generate PAT sections based on the dvbpsi_pat_t structure.