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

Subtable demutiplexor. More...

Go to the source code of this file.

Data Structures

struct  dvbpsi_demux_subdec_s
 Subtable decoder structure. More...
struct  dvbpsi_demux_s
 subtable demultiplexor structure More...

Typedefs

typedef void(* dvbpsi_demux_new_cb_t )(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, void *p_cb_data)
 Callback used in case of a new subtable detected.
typedef void(* dvbpsi_demux_gather_cb_t )(dvbpsi_t *p_dvbpsi, dvbpsi_decoder_t *p_decoder, dvbpsi_psi_section_t *p_section)
 Callback used for gathering psi sections on behalf of subtable decoders.
typedef void(* dvbpsi_demux_detach_cb_t )(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
 Callback used for detaching subtable decoder from demuxer.
typedef struct
dvbpsi_demux_subdec_s 
dvbpsi_demux_subdec_t
 dvbpsi_demux_subdec_t type definition.
typedef struct dvbpsi_demux_s dvbpsi_demux_t
 dvbpsi_demux_t type definition.

Functions

bool dvbpsi_AttachDemux (dvbpsi_t *p_dvbpsi, dvbpsi_demux_new_cb_t pf_new_cb, void *p_new_cb_data)
 Attaches a new demux structure on dvbpsi_t* handle.
void dvbpsi_DetachDemux (dvbpsi_t *p_dvbpsi)
 Destroys a demux structure.
dvbpsi_demux_subdec_tdvbpsi_demuxGetSubDec (dvbpsi_demux_t *p_demux, uint8_t i_table_id, uint16_t i_extension)
 Looks for a subtable decoder, given the subtable ID.
void dvbpsi_Demux (dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
 Sends the PSI sections to the right subtable decoder according to their table ID and extension.
dvbpsi_demux_subdec_tdvbpsi_NewDemuxSubDecoder (const uint8_t i_table_id, const uint16_t i_extension, dvbpsi_demux_detach_cb_t pf_detach, dvbpsi_demux_gather_cb_t pf_gather, dvbpsi_decoder_t *p_decoder)
 Allocates a new demux sub table decoder and initializes it.
void dvbpsi_DeleteDemuxSubDecoder (dvbpsi_demux_subdec_t *p_subdec)
 Releases memory allocated with.
void dvbpsi_AttachDemuxSubDecoder (dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
 Attach a subtable decoder to the given demux handle.
void dvbpsi_DetachDemuxSubDecoder (dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
 Detach a subtable decoder from the given demux pointer.

Detailed Description

Subtable demutiplexor.

>

Author
Johan Bilien jobi@.nosp@m.via..nosp@m.ecp.f.nosp@m.r Subtable demultiplexor structure

Typedef Documentation

void(* dvbpsi_demux_detach_cb_t)(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)

Callback used for detaching subtable decoder from demuxer.

table extention to detach

void(* dvbpsi_demux_gather_cb_t)(dvbpsi_t *p_dvbpsi, void *p_cb_data, dvbpsi_psi_section_t *p_section)

Callback used for gathering psi sections on behalf of subtable decoders.

pointer to psi section

void(* dvbpsi_demux_new_cb_t)(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, void *p_cb_data)

Callback used in case of a new subtable detected.

pointer to callback data

Function Documentation

bool dvbpsi_AttachDemux ( dvbpsi_t p_dvbpsi,
dvbpsi_demux_new_cb_t  pf_new_cb,
void *  p_new_cb_data 
)

Attaches a new demux structure on dvbpsi_t* handle.

Parameters
p_dvbpsipointer to dvbpsi_t handle
pf_new_cbA callcack called when a new type of subtable is found.
p_new_cb_dataData given to the previous callback.
Returns
true on success, false on failure
void dvbpsi_AttachDemuxSubDecoder ( dvbpsi_demux_t p_demux,
dvbpsi_demux_subdec_t p_subdec 
)

Attach a subtable decoder to the given demux handle.

Parameters
p_demuxpointer to dvbpsi_demux_t
p_subdecpointer to dvbpsi_demux_subdec_t
Returns
nothing
void dvbpsi_DeleteDemuxSubDecoder ( dvbpsi_demux_subdec_t p_subdec)

Releases memory allocated with.

See Also
dvbpsi_NewDemuxSubDecoder. It will also release p_cb_data pointer.
Parameters
p_subdecpointer to demux subtable decoder.
Returns
nothing.
void dvbpsi_Demux ( dvbpsi_t p_dvbpsi,
dvbpsi_psi_section_t p_section 
)

Sends the PSI sections to the right subtable decoder according to their table ID and extension.

Parameters
p_dvbpsiPSI decoder handle.
p_sectionPSI section.
dvbpsi_demux_subdec_t * dvbpsi_demuxGetSubDec ( dvbpsi_demux_t p_demux,
uint8_t  i_table_id,
uint16_t  i_extension 
)

Looks for a subtable decoder, given the subtable ID.

Parameters
p_demuxPointer to the demux structure.
i_table_idTable ID of the wanted subtable.
i_extensionTable ID extension of the wanted subtable.
Returns
a pointer to the found subdecoder, or NULL.
void dvbpsi_DetachDemux ( dvbpsi_t p_dvbpsi)

Destroys a demux structure.

Parameters
p_dvbpsiThe handle of the demux to be destroyed.
Returns
nothing
void dvbpsi_DetachDemuxSubDecoder ( dvbpsi_demux_t p_demux,
dvbpsi_demux_subdec_t p_subdec 
)

Detach a subtable decoder from the given demux pointer.

Parameters
p_demuxpointer to dvbpsi_demux_t
p_subdecpointer to dvbpsi_demux_subdec_t
Returns
nothing
dvbpsi_demux_subdec_t * dvbpsi_NewDemuxSubDecoder ( const uint8_t  i_table_id,
const uint16_t  i_extension,
dvbpsi_demux_detach_cb_t  pf_detach,
dvbpsi_demux_gather_cb_t  pf_gather,
dvbpsi_decoder_t p_decoder 
)

Allocates a new demux sub table decoder and initializes it.

Parameters
i_table_idtable id to create subtable decoder for
i_extensiontable extension to create subtable decoder for
pf_detachpointer to detach function for subtable decoder.
pf_gatherpointer to gather function for subtable decoder.
p_decoderpointer to private decoder.
Returns
pointer to demux subtable decoder.