libdvbpsi 2.0.0-git
MPEG Transport Stream PSI table parser
eit.h File Reference

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

Go to the source code of this file.

Data Structures

struct  dvbpsi_eit_event_s
 EIT service description structure. More...
 
struct  dvbpsi_eit_s
 EIT structure. More...
 

Typedefs

typedef struct dvbpsi_eit_event_s dvbpsi_eit_event_t
 dvbpsi_eit_event_t type definition.
 
typedef struct dvbpsi_eit_s dvbpsi_eit_t
 dvbpsi_eit_t type definition.
 
typedef void(* dvbpsi_eit_callback) (void *p_priv, dvbpsi_eit_t *p_new_eit)
 Callback type definition.
 

Functions

bool dvbpsi_eit_attach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, dvbpsi_eit_callback pf_callback, void *p_priv)
 Creation and initialization of a EIT decoder.
 
void dvbpsi_eit_detach (dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
 Destroy a EIT decoder.
 
void dvbpsi_eit_init (dvbpsi_eit_t *p_eit, uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint16_t i_ts_id, uint16_t i_network_id, uint8_t i_segment_last_section_number, uint8_t i_last_table_id)
 Initialize a user-allocated dvbpsi_eit_t structure.
 
dvbpsi_eit_tdvbpsi_eit_new (uint8_t i_table_id, uint16_t i_extension, uint8_t i_version, bool b_current_next, uint16_t i_ts_id, uint16_t i_network_id, uint8_t i_segment_last_section_number, uint8_t i_last_table_id)
 Allocate and initialize a new dvbpsi_eit_t structure.
 
void dvbpsi_eit_empty (dvbpsi_eit_t *p_eit)
 Clean a dvbpsi_eit_t structure.
 
void dvbpsi_eit_delete (dvbpsi_eit_t *p_eit)
 Clean and free a dvbpsi_eit_t structure.
 
dvbpsi_eit_event_tdvbpsi_eit_event_add (dvbpsi_eit_t *p_eit, uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration, uint8_t i_running_status, bool b_free_ca, uint16_t i_event_descriptor_length)
 Add a service description at the end of the EIT.
 
dvbpsi_eit_event_tdvbpsi_eit_nvod_event_add (dvbpsi_eit_t *p_eit, uint16_t i_event_id, uint32_t i_duration, bool b_free_ca, uint16_t i_event_descriptor_length)
 Add a NVOD service description at the end of the EIT.
 
dvbpsi_descriptor_tdvbpsi_eit_event_descriptor_add (dvbpsi_eit_event_t *p_event, uint8_t i_tag, uint8_t i_length, uint8_t *p_data)
 Add a descriptor to the EIT event.
 
dvbpsi_psi_section_tdvbpsi_eit_sections_generate (dvbpsi_t *p_dvbpsi, dvbpsi_eit_t *p_eit, uint8_t i_table_id)
 Generate a EIT section based on the information provided in p_eit.
 

Detailed Description

Application interface for the EIT decoder and the EIT generator.

>

Author
Christophe Massiot massi.nosp@m.ot@v.nosp@m.ia.ec.nosp@m.p.fr

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

Function Documentation

◆ dvbpsi_eit_attach()

bool dvbpsi_eit_attach ( dvbpsi_t * p_dvbpsi,
uint8_t i_table_id,
uint16_t i_extension,
dvbpsi_eit_callback pf_callback,
void * p_priv )

Creation and initialization of a EIT decoder.

Parameters
p_dvbpsipointer to Subtable demultiplexor to which the EIT decoder is attached.
i_table_idTable ID, 0x4E, 0x4F, or 0x50-0x6F.
i_extensionTable ID extension, here service ID.
pf_callbackfunction to call back on new EIT.
p_privprivate data given in argument to the callback.
Returns
true on success, false on failure

◆ dvbpsi_eit_delete()

void dvbpsi_eit_delete ( dvbpsi_eit_t * p_eit)

Clean and free a dvbpsi_eit_t structure.

Parameters
p_eitpointer to the EIT structure
Returns
nothing.

◆ dvbpsi_eit_detach()

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

Destroy a EIT decoder.

Parameters
p_dvbpsidvbpsi handle pointing to Subtable demultiplexor to which the eit decoder is attached.
i_table_idTable ID, 0x4E, 0x4F, or 0x50-0x6F.
i_extensionTable ID extension, here service ID.
Returns
nothing.

◆ dvbpsi_eit_empty()

void dvbpsi_eit_empty ( dvbpsi_eit_t * p_eit)

Clean a dvbpsi_eit_t structure.

Parameters
p_eitpointer to the EIT structure
Returns
nothing.

◆ dvbpsi_eit_event_add()

dvbpsi_eit_event_t * dvbpsi_eit_event_add ( dvbpsi_eit_t * p_eit,
uint16_t i_event_id,
uint64_t i_start_time,
uint32_t i_duration,
uint8_t i_running_status,
bool b_free_ca,
uint16_t i_event_descriptor_length )

Add a service description at the end of the EIT.

Parameters
p_eitpointer to the EIT structure
i_event_idEvent ID
i_start_timeStart Time
i_durationDuration
i_running_statusRunning status
b_free_caFree CA flag
i_event_descriptor_lengthThe descriptors loop length in bytes of all descriptors for this event.
Returns
a pointer to the added service description.

◆ dvbpsi_eit_event_descriptor_add()

dvbpsi_descriptor_t * dvbpsi_eit_event_descriptor_add ( dvbpsi_eit_event_t * p_event,
uint8_t i_tag,
uint8_t i_length,
uint8_t * p_data )

Add a descriptor to the EIT event.

Parameters
p_eventpointer to the EIT event structure
i_tagdescriptor's tag
i_lengthdescriptor's length
p_datadescriptor's data
Returns
a pointer to the added descriptor.

◆ dvbpsi_eit_init()

void dvbpsi_eit_init ( dvbpsi_eit_t * p_eit,
uint8_t i_table_id,
uint16_t i_extension,
uint8_t i_version,
bool b_current_next,
uint16_t i_ts_id,
uint16_t i_network_id,
uint8_t i_segment_last_section_number,
uint8_t i_last_table_id )

Initialize a user-allocated dvbpsi_eit_t structure.

Parameters
p_eitpointer to the EIT structure
i_table_idTable ID, 0x4E, 0x4F, or 0x50-0x6F.
i_extensionTable ID extension, here service ID.
i_versionEIT version
b_current_nextcurrent next indicator
i_ts_idtransport stream ID
i_network_idoriginal network id
i_segment_last_section_numbersegment_last_section_number
i_last_table_idi_last_table_id
Returns
nothing.

◆ dvbpsi_eit_new()

dvbpsi_eit_t * dvbpsi_eit_new ( uint8_t i_table_id,
uint16_t i_extension,
uint8_t i_version,
bool b_current_next,
uint16_t i_ts_id,
uint16_t i_network_id,
uint8_t i_segment_last_section_number,
uint8_t i_last_table_id )

Allocate and initialize a new dvbpsi_eit_t structure.

Parameters
i_table_idTable ID, 0x4E, 0x4F, or 0x50-0x6F.
i_extensionTable ID extension, here service ID.
i_versionEIT version
b_current_nextcurrent next indicator
i_ts_idtransport stream ID
i_network_idoriginal network id
i_segment_last_section_numbersegment_last_section_number
i_last_table_idi_last_table_id
Returns
p_eit pointer to the EIT structure

◆ dvbpsi_eit_nvod_event_add()

dvbpsi_eit_event_t * dvbpsi_eit_nvod_event_add ( dvbpsi_eit_t * p_eit,
uint16_t i_event_id,
uint32_t i_duration,
bool b_free_ca,
uint16_t i_event_descriptor_length )

Add a NVOD service description at the end of the EIT.

Parameters
p_eitpointer to the EIT structure
i_event_idEvent ID
i_durationDuration
b_free_caFree CA flag
i_event_descriptor_lengthThe descriptors loop length in bytes of all descriptors for this event.
Returns
a pointer to the added service description.

◆ dvbpsi_eit_sections_generate()

dvbpsi_psi_section_t * dvbpsi_eit_sections_generate ( dvbpsi_t * p_dvbpsi,
dvbpsi_eit_t * p_eit,
uint8_t i_table_id )

Generate a EIT section based on the information provided in p_eit.

Parameters
p_dvbpsipointer to Subtable demultiplexor to which the EIT decoder is attached.
p_eitpointer to EIT information to include in the PSI secion
i_table_idthe EIT table id to use
Returns
a pointer to a new PSI section