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

Application interface for all DVB/PSI decoders. More...

Go to the source code of this file.

Data Structures

struct  dvbpsi_s
 DVBPSI handle structure. More...
 
struct  dvbpsi_decoder_s
 PSI decoder structure. More...
 

Macros

#define DVBPSI_VERSION   2.0.0
 
#define DVBPSI_VERSION_INT   ((2<<16)+(0<<8)+0)
 
#define DVBPSI_GCC_VERSION(maj, min)   (0)
 Helper macro for GCC version check.
 
#define DVBPSI_DECODER(x)   ((dvbpsi_decoder_t *)(x))
 Helper macro for casting a private decoder into a dvbpsi_decoder_t.
 
#define DVBPSI_DECODER_COMMON
 Common members for all dvbpsi table decoders. These should be the first members of a table decoder struct, such that they can be casted to a dvbpsi_decoder_t type. More...
 

Typedefs

typedef struct dvbpsi_s dvbpsi_t
 DVBPSI handle structure abstration. More...
 
typedef enum dvbpsi_msg_level dvbpsi_msg_level_t
 DVBPSI message level enumeration type definition.
 
typedef void(* dvbpsi_message_cb) (dvbpsi_t *handle, const dvbpsi_msg_level_t level, const char *msg)
 Callback type definition.
 
typedef struct dvbpsi_decoder_s dvbpsi_decoder_t
 dvbpsi_decoder_t type definition.
 
typedef struct dvbpsi_psi_section_s dvbpsi_psi_section_t
 dvbpsi_psi_section_t type definition.
 
typedef void(* dvbpsi_callback_gather_t) (dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
 Callback used for gathering psi sections on behalf of PSI decoders. More...
 
typedef void(* dvbpsi_callback_new_t) (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, void *p_data)
 Callback used in case of a new PSI table is detected. More...
 
typedef void(* dvbpsi_callback_del_t) (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
 Callback used to delete PSI table. More...
 

Enumerations

enum  dvbpsi_msg_level { DVBPSI_MSG_NONE = -1 , DVBPSI_MSG_ERROR = 0 , DVBPSI_MSG_WARN = 1 , DVBPSI_MSG_DEBUG = 2 }
 DVBPSI message level enumeration type. More...
 

Functions

dvbpsi_tdvbpsi_new (dvbpsi_message_cb callback, enum dvbpsi_msg_level level)
 Create a new dvbpsi_t handle to be used by PSI decoders or encoders. More...
 
void dvbpsi_delete (dvbpsi_t *p_dvbpsi)
 Deletes a dvbpsi_t handle created with dvbpsi_new. More...
 
bool dvbpsi_packet_push (dvbpsi_t *p_dvbpsi, const uint8_t *p_data)
 
void * dvbpsi_decoder_new (dvbpsi_callback_gather_t pf_gather, const int i_section_max_size, const bool b_discontinuity, const size_t psi_size)
 Create a new (private) dvbpsi decoder. More...
 
void dvbpsi_decoder_delete (dvbpsi_decoder_t *p_decoder)
 Deletes decoder struct and frees any associated PSI section memory. Any memory attached to the dvbpsi_decoder_t::p_priv pointer member is the responsibility of the calling application. More...
 
void dvbpsi_decoder_reset (dvbpsi_decoder_t *p_decoder, const bool b_force)
 Resets a decoder internal state. More...
 
bool dvbpsi_decoder_psi_sections_completed (dvbpsi_decoder_t *p_decoder)
 Have all sections for this decoder been received? More...
 
bool dvbpsi_decoder_psi_section_add (dvbpsi_decoder_t *p_decoder, dvbpsi_psi_section_t *p_section)
 Add a section to the dvbpsi_decoder_t::p_sections list. More...
 
 __attribute__ ((deprecated, unused)) bool dvbpsi_decoder_present(dvbpsi_t *p_dvbpsi)
 dvbpsi_atsc_DetachEIT is deprecated use More...
 

Detailed Description

Application interface for all DVB/PSI decoders.

>

Author
Arnaud de Bossoreille de Ribou bozo@.nosp@m.via..nosp@m.ecp.f.nosp@m.r Jean-Paul Saman jpsam.nosp@m.an@v.nosp@m.ideol.nosp@m.an.o.nosp@m.rg

Application interface for all DVB/PSI decoders. The generic decoder structure is public so that external decoders are allowed.

Macro Definition Documentation

◆ DVBPSI_DECODER_COMMON

#define DVBPSI_DECODER_COMMON
Value:
\ \
uint8_t i_magic[3]; \
bool b_complete_header; \
bool b_discontinuity; \
bool b_current_valid; \
uint8_t i_continuity_counter; \
uint8_t prevpacket[188]; \
uint8_t i_last_section_number; \
dvbpsi_psi_section_t *p_current_section; \
dvbpsi_psi_section_t *p_sections; \
dvbpsi_callback_gather_t pf_gather; \
int i_section_max_size; \
int i_need; \
/* since version 2.0.0 */ \
uint16_t i_table_id; \
uint16_t i_extension; \
/* Subtables creation and deletion Callbacks */ \
dvbpsi_callback_new_t pf_new; \
dvbpsi_callback_del_t pf_del; \
void *p_priv; \
/* pointer to next decoder in list */ \
dvbpsi_decoder_t *p_next;

Common members for all dvbpsi table decoders. These should be the first members of a table decoder struct, such that they can be casted to a dvbpsi_decoder_t type.

Pointer to next decoder the list

◆ DVBPSI_VERSION

#define DVBPSI_VERSION   2.0.0

Human readible DVBPSI version

◆ DVBPSI_VERSION_INT

#define DVBPSI_VERSION_INT   ((2<<16)+(0<<8)+0)

Machine readible DVBPSI version

Typedef Documentation

◆ dvbpsi_callback_del_t

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

Callback used to delete PSI table.

table extention to attach

Parameters
p_dvbpsipointer to dvbpsi handle
i_table_idtable id to attach

◆ dvbpsi_callback_gather_t

void(* dvbpsi_callback_gather_t)(dvbpsi_t< em >p_dvbpsi, dvbpsi_psi_section_t</em > p_section)

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

pointer to psi section

Parameters
p_dvbpsipointer to dvbpsi handle

◆ dvbpsi_callback_new_t

void(* dvbpsi_callback_new_t)(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, void *p_data)

Callback used in case of a new PSI table is detected.

pointer to callback data

Parameters
p_dvbpsipointer to dvbpsi handle
i_table_idtable id to attach
i_extensiontable extention to attach

◆ dvbpsi_t

DVBPSI handle structure abstration.

dvbpsi_t type definition.

Enumeration Type Documentation

◆ dvbpsi_msg_level

DVBPSI message level enumeration type.

Enumerator
DVBPSI_MSG_NONE 

No messages

DVBPSI_MSG_ERROR 

Error messages only

DVBPSI_MSG_WARN 

Error and Warning messages

DVBPSI_MSG_DEBUG 

Error, warning and debug messages

Function Documentation

◆ __attribute__()

__attribute__ ( (deprecated, unused)  )

dvbpsi_atsc_DetachEIT is deprecated use

dvbpsi_atsc_DeleteVCT is deprecated use

dvbpsi_atsc_EmptyVCT is deprecated use

dvbpsi_atsc_NewVCT is deprecated use

dvbpsi_atsc_InitVCT is deprecated use

dvbpsi_atsc_DetachVCT is deprecated use

dvbpsi_atsc_DeleteSTT is deprecated use

dvbpsi_atsc_EmptySTT is deprecated use

dvbpsi_atsc_NewSTT is deprecated use

dvbpsi_atsc_InitSTT is deprecated use

dvbpsi_atsc_DetachSTT is deprecated use

dvbpsi_atsc_DeleteMGT is deprecated use

dvbpsi_atsc_EmptyMGT is deprecated use

dvbpsi_atsc_NewMGT is deprecated use

dvbpsi_atsc_InitMGT is deprecated use

dvbpsi_atsc_DetachMGT is deprecated use

dvbpsi_atsc_DeleteETT is deprecated use

dvbpsi_atsc_EmptyETT is deprecated use

dvbpsi_atsc_NewETT is deprecated use

dvbpsi_atsc_InitETT is deprecated use

dvbpsi_atsc_DetachETT is deprecated use

dvbpsi_atsc_DeleteEIT is deprecated use

dvbpsi_atsc_EmptyEIT is deprecated use

dvbpsi_atsc_NewEIT is deprecated use

dvbpsi_atsc_InitEIT is deprecated use

See also
dvbpsi_atsc_eit_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
Returns
nothing.
See also
dvbpsi_atsc_eit_init() instead.
Parameters
p_eitpointer to the EIT structure
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
i_versionEIT version
i_protocolPSIP Protocol version.
i_source_idSource id.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_eit_new() instead.
Parameters
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
i_versionEIT version
i_protocolPSIP Protocol version.
i_source_idSource id.
b_current_nextcurrent next indicator
Returns
p_eit pointer to the EIT structure or NULL on error
See also
dvbpsi_atsc_eit_empty() instead.
Parameters
p_eitpointer to the EIT structure
See also
dvbpsi_atsc_eit_delete() instead.
Parameters
p_eitpointer to the EIT structure
See also
dvbpsi_atsc_ett_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xCD.
i_extensionTable ID extension, normally 0x0000.
Returns
nothing.
See also
dvbpsi_atsc_ett_init() instead.
Parameters
p_ettpointer to the ETT structure
i_table_idTable ID, 0xCC.
i_extensionTable ID extension, normally 0x0000.
i_versionversion
i_protocolPSIP Protocol version.
i_etm_idETM Identifier.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_ett_new() instead.
Parameters
i_table_idTable ID, 0xCC.
i_extensionTable ID extension, normally 0x0000.
i_versionversion
i_protocolPSIP Protocol version.
i_etm_idETM Identifier.
b_current_nextcurrent next indicator
Returns
p_ett pointer to the ETT structure, NULL otherwise
See also
dvbpsi_atsc_ett_empty() instead.
Parameters
p_ettpointer to the ETT structure
Returns
nothing.
See also
dvbpsi_atsc_ett_delete() instead.
Parameters
p_ettpointer to the ETT structure
Returns
nothing.
See also
dvbpsi_atsc_mgt_detach() instead.

Destroy a MGT decoder.

Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
Returns
nothing.
See also
dvbpsi_atsc_mgt_init() instead.
Parameters
p_mgtpointer to the MGT structure
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
i_versionMGT version
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_mgt_new() instead.
Parameters
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
i_versionMGT version
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
p_mgt pointer to the MGT structure, or NULL on failure
See also
dvbpsi_atsc_mgt_empty() instead.
Parameters
p_mgtpointer to the MGT structure
Returns
nothing.
See also
dvbpsi_atsc_mgt_delete() instead.

Clean and free a dvbpsi_mgt_t structure.

Parameters
p_mgtpointer to the MGT structure
Returns
nothing.
See also
dvbpsi_atsc_stt_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0. (Required to match prototype for demux)
Returns
nothing.
See also
dvbpsi_atsc_stt_init() instead.
Parameters
p_sttpointer to the STT structure
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0.
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_stt_new() instead.
Parameters
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0.
i_versionPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
p_stt pointer to the STT structure
See also
dvbpsi_atsc_stt_empty() instead.

Clean a dvbpsi_atsc_stt_t structure.

Parameters
p_sttpointer to the STT structure
Returns
nothing.
See also
dvbpsi_atsc_stt_delete() instead.

Clean a dvbpsi_atsc_stt_t structure.

Parameters
p_sttpointer to the STT structure
Returns
nothing.
See also
dvbpsi_atsc_vct_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
Returns
nothing.
See also
dvbpsi_atsc_vct_init() instead.
Parameters
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
i_protocolPSIP Protocol version.
b_cable_vctWhether this is CVCT or a TVCT.
i_versionVCT version
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_vct_new() instead.
Parameters
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
i_protocolPSIP Protocol version.
b_cable_vctWhether this is CVCT or a TVCT.
i_versionVCT version
b_current_nextcurrent next indicator
Returns
p_vct pointer to the VCT structure
See also
dvbpsi_atsc_vct_empty() instead.

Clean a dvbpsi_vct_t structure.

Parameters
p_vctpointer to the VCT structure
Returns
nothing.
See also
dvbpsi_atsc_vct_delete() instead.

Clean a dvbpsi_vct_t structure.

Parameters
p_vctpointer to the VCT structure
Returns
nothing.

dvbpsi_atsc_DeleteEIT is deprecated use

dvbpsi_atsc_EmptyEIT is deprecated use

dvbpsi_atsc_NewEIT is deprecated use

dvbpsi_atsc_InitEIT is deprecated use

dvbpsi_atsc_DetachEIT is deprecated use

See also
dvbpsi_atsc_eit_attach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
pf_callbackfunction to call back on new EIT.
p_privprivate data given in argument to the callback.
Returns
true if everything went ok, false otherwise
See also
dvbpsi_atsc_eit_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
Returns
nothing.
See also
dvbpsi_atsc_eit_init() instead.
Parameters
p_eitpointer to the EIT structure
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
i_versionEIT version
i_protocolPSIP Protocol version.
i_source_idSource id.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_eit_new() instead.
Parameters
i_table_idTable ID, 0xCB.
i_extensionTable ID extension, here TS ID.
i_versionEIT version
i_protocolPSIP Protocol version.
i_source_idSource id.
b_current_nextcurrent next indicator
Returns
p_eit pointer to the EIT structure or NULL on error
See also
dvbpsi_atsc_eit_empty() instead.
Parameters
p_eitpointer to the EIT structure
See also
dvbpsi_atsc_eit_delete() instead.
Parameters
p_eitpointer to the EIT structure

dvbpsi_atsc_DetachEIT is deprecated use

dvbpsi_atsc_DeleteETT is deprecated use

dvbpsi_atsc_EmptyETT is deprecated use

dvbpsi_atsc_NewETT is deprecated use

dvbpsi_atsc_InitETT is deprecated use

dvbpsi_atsc_DetachETT is deprecated use

See also
dvbpsi_atsc_ett_attach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xCC.
i_extensionTable ID extension, normally 0x0000.
pf_callbackfunction to call back on new ETT.
p_privprivate data given in argument to the callback.
Returns
true if everything went ok, else it returns false.
See also
dvbpsi_atsc_ett_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xCD.
i_extensionTable ID extension, normally 0x0000.
Returns
nothing.
See also
dvbpsi_atsc_ett_init() instead.
Parameters
p_ettpointer to the ETT structure
i_table_idTable ID, 0xCC.
i_extensionTable ID extension, normally 0x0000.
i_versionversion
i_protocolPSIP Protocol version.
i_etm_idETM Identifier.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_ett_new() instead.
Parameters
i_table_idTable ID, 0xCC.
i_extensionTable ID extension, normally 0x0000.
i_versionversion
i_protocolPSIP Protocol version.
i_etm_idETM Identifier.
b_current_nextcurrent next indicator
Returns
p_ett pointer to the ETT structure, NULL otherwise
See also
dvbpsi_atsc_ett_empty() instead.
Parameters
p_ettpointer to the ETT structure
Returns
nothing.
See also
dvbpsi_atsc_ett_delete() instead.
Parameters
p_ettpointer to the ETT structure
Returns
nothing.

dvbpsi_atsc_DetachEIT is deprecated use

dvbpsi_atsc_DeleteMGT is deprecated use

dvbpsi_atsc_EmptyMGT is deprecated use

dvbpsi_atsc_NewMGT is deprecated use

dvbpsi_atsc_InitMGT is deprecated use

dvbpsi_atsc_DetachMGT is deprecated use

See also
dvbpsi_atsc_mgt_attach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
pf_callbackfunction to call back on new MGT.
p_privprivate data given in argument to the callback.
Returns
true if everything went ok, false otherwise
See also
dvbpsi_atsc_mgt_detach() instead.

Destroy a MGT decoder.

Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
Returns
nothing.
See also
dvbpsi_atsc_mgt_init() instead.
Parameters
p_mgtpointer to the MGT structure
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
i_versionMGT version
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_mgt_new() instead.
Parameters
i_table_idTable ID, 0xC7.
i_extensionTable ID extension, here 0x0000.
i_versionMGT version
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
p_mgt pointer to the MGT structure, or NULL on failure
See also
dvbpsi_atsc_mgt_empty() instead.
Parameters
p_mgtpointer to the MGT structure
Returns
nothing.
See also
dvbpsi_atsc_mgt_delete() instead.

Clean and free a dvbpsi_mgt_t structure.

Parameters
p_mgtpointer to the MGT structure
Returns
nothing.

dvbpsi_atsc_DetachEIT is deprecated use

dvbpsi_atsc_DeleteSTT is deprecated use

dvbpsi_atsc_EmptySTT is deprecated use

dvbpsi_atsc_NewSTT is deprecated use

dvbpsi_atsc_InitSTT is deprecated use

dvbpsi_atsc_DetachSTT is deprecated use

See also
dvbpsi_atsc_stt_attach() instead.
Parameters
p_eitpointer to the EIT structure
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached
i_table_idTable ID, 0xCD.
i_extensionTable ID extension, here it should be 0.
pf_stt_callbackfunction to call back on new STT.
p_privprivate data given in argument to the callback.
Returns
true if everything went ok else false
See also
dvbpsi_atsc_stt_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0. (Required to match prototype for demux)
Returns
nothing.
See also
dvbpsi_atsc_stt_init() instead.
Parameters
p_sttpointer to the STT structure
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0.
i_protocolPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_stt_new() instead.
Parameters
i_table_idTable ID, 0xCD.
i_extensionTable extension, ignored as this should always be 0.
i_versionPSIP Protocol version.
b_current_nextcurrent next indicator
Returns
p_stt pointer to the STT structure
See also
dvbpsi_atsc_stt_empty() instead.

Clean a dvbpsi_atsc_stt_t structure.

Parameters
p_sttpointer to the STT structure
Returns
nothing.
See also
dvbpsi_atsc_stt_delete() instead.

Clean a dvbpsi_atsc_stt_t structure.

Parameters
p_sttpointer to the STT structure
Returns
nothing.

dvbpsi_atsc_DetachEIT is deprecated use

dvbpsi_atsc_DeleteVCT is deprecated use

dvbpsi_atsc_EmptyVCT is deprecated use

dvbpsi_atsc_NewVCT is deprecated use

dvbpsi_atsc_InitVCT is deprecated use

dvbpsi_atsc_DetachVCT is deprecated use

See also
dvbpsi_atsc_vct_attach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
pf_vct_callbackfunction to call back on new VCT.
p_privprivate data given in argument to the callback.
Returns
true if everything went ok, else false.
See also
dvbpsi_atsc_vct_detach() instead.
Parameters
p_dvbpsidvbpsi handle to Subtable demultiplexor to which the decoder is attached.
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
Returns
nothing.
See also
dvbpsi_atsc_vct_init() instead.
Parameters
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
i_protocolPSIP Protocol version.
b_cable_vctWhether this is CVCT or a TVCT.
i_versionVCT version
b_current_nextcurrent next indicator
Returns
nothing.
See also
dvbpsi_atsc_vct_new() instead.
Parameters
i_table_idTable ID, 0xC8 or 0xC9.
i_extensionTable ID extension, here TS ID.
i_protocolPSIP Protocol version.
b_cable_vctWhether this is CVCT or a TVCT.
i_versionVCT version
b_current_nextcurrent next indicator
Returns
p_vct pointer to the VCT structure
See also
dvbpsi_atsc_vct_empty() instead.

Clean a dvbpsi_vct_t structure.

Parameters
p_vctpointer to the VCT structure
Returns
nothing.
See also
dvbpsi_atsc_vct_delete() instead.

Clean a dvbpsi_vct_t structure.

Parameters
p_vctpointer to the VCT structure
Returns
nothing.

References dvbpsi_atsc_eit_empty(), dvbpsi_atsc_ett_empty(), dvbpsi_atsc_mgt_empty(), dvbpsi_atsc_stt_empty(), and dvbpsi_atsc_vct_empty().

◆ dvbpsi_decoder_delete()

void dvbpsi_decoder_delete ( dvbpsi_decoder_t p_decoder)

Deletes decoder struct and frees any associated PSI section memory. Any memory attached to the dvbpsi_decoder_t::p_priv pointer member is the responsibility of the calling application.

Parameters
p_decoderpointer to dvbpsi_decoder_t with decoder
Returns
nothing

Delets a dvbpsi_t handle by calling free(handle). Make sure to detach any decoder or encoder before deleting the dvbpsi handle.

◆ dvbpsi_decoder_new()

void * dvbpsi_decoder_new ( dvbpsi_callback_gather_t  pf_gather,
const int  i_section_max_size,
const bool  b_discontinuity,
const size_t  psi_size 
)

Create a new (private) dvbpsi decoder.

Parameters
pf_gatherpointer to gather function for PSI decoder.
i_section_max_sizeMax size of a section for this decoder
b_discontinuityDiscontinuity flag
psi_sizesize of new PSI struct, eg: sizeof(dvbpsi_pat_t)
Returns
pointer to memory of size 'psi_size' that can be casted into a dvbpsi_decoder_t.

Creates a void pointer that points to a private dvbpsi decoder struct (eg: dvbpsi_pat_t). The first elements in this newly created decoder should contain DVBPSI_DECODER_COMMON, which corresponds to a dvbpsi_decoder_t. Upon return the pointer should be casted to the correct type. Delete the pointer with

See also
dvbpsi_decoder_delete() function.

◆ dvbpsi_decoder_psi_section_add()

bool dvbpsi_decoder_psi_section_add ( dvbpsi_decoder_t p_decoder,
dvbpsi_psi_section_t p_section 
)

Add a section to the dvbpsi_decoder_t::p_sections list.

Parameters
p_decoderpointer to dvbpsi_decoder_t with decoder
p_sectionPSI section to add to dvbpsi_decoder_t::p_sections list
Returns
true if it overwrites a earlier section, false otherwise

◆ dvbpsi_decoder_psi_sections_completed()

bool dvbpsi_decoder_psi_sections_completed ( dvbpsi_decoder_t p_decoder)

Have all sections for this decoder been received?

Parameters
p_decoderpointer to dvbpsi_decoder_t with decoder
Returns
true when all PSI sections have been received, false otherwise

◆ dvbpsi_decoder_reset()

void dvbpsi_decoder_reset ( dvbpsi_decoder_t p_decoder,
const bool  b_force 
)

Resets a decoder internal state.

Parameters
p_decoderpointer to dvbpsi_decoder_t with decoder
b_forceIf 'b_force' is true then dvbpsi_decoder_t::b_current_valid is set to false, invalidating the current section.
Returns
nothing

◆ dvbpsi_delete()

void dvbpsi_delete ( dvbpsi_t p_dvbpsi)

Deletes a dvbpsi_t handle created with dvbpsi_new.

Parameters
p_dvbpsipointer to dvbpsi_t malloced data
Returns
nothing

Delets a dvbpsi_t handle by calling free(handle). Make sure to detach any decoder of encoder before deleting the dvbpsi handle.

◆ dvbpsi_new()

dvbpsi_t * dvbpsi_new ( dvbpsi_message_cb  callback,
enum dvbpsi_msg_level  level 
)

Create a new dvbpsi_t handle to be used by PSI decoders or encoders.

Parameters
callbackmessage callback handler, if NULL then no errors, warnings or debug messages will be sent to the caller application
levelenum dvbpsi_msg_level for filtering logging messages
Returns
pointer to dvbpsi_t malloced data

Creates a handle to use with PSI decoder and encoder API functions. The handle must be freed with dvbpsi_delete().