35 #ifndef _DVBPSI_DVBPSI_H_ 36 #define _DVBPSI_DVBPSI_H_ 38 #define DVBPSI_VERSION 1.3.0 39 #define DVBPSI_VERSION_INT ((1<<16)+(3<<8)+0) 53 # define DVBPSI_GCC_VERSION(maj,min) \ 54 ((__GNUC__ > (maj)) || (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min))) 56 # define DVBPSI_GCC_VERSION(maj,min) (0) 95 const dvbpsi_msg_level_t level,
112 #if DVBPSI_GCC_VERSION(4,0) 114 # define DVBPSI_DECODER( x ) \ 115 __builtin_choose_expr( \ 116 __builtin_offsetof(__typeof__(*(x)), i_magic), \ 118 (dvbpsi_decoder_t *)(x)) 120 # define DVBPSI_DECODER( x ) \ 121 ((dvbpsi_decoder_t *)(x) \ 122 + 0 * __builtin_offsetof(__typeof__(*(x)), i_magic)) 125 # define DVBPSI_DECODER(x) ((dvbpsi_decoder_t *)(x)) 231 #define DVBPSI_DECODER_COMMON \ 237 uint8_t i_magic[3]; \ 238 bool b_complete_header; \ 239 bool b_discontinuity; \ 240 bool b_current_valid; \ 241 uint8_t i_continuity_counter; \ 242 uint8_t i_last_section_number; \ 243 dvbpsi_psi_section_t *p_current_section; \ 244 dvbpsi_psi_section_t *p_sections; \ 245 dvbpsi_callback_gather_t pf_gather; \ 246 int i_section_max_size; \ 285 const int i_section_max_size,
286 const bool b_discontinuity,
287 const size_t psi_size);
358 #error "Multiple inclusions of dvbpsi.h"
#define DVBPSI_DECODER_COMMON
Common members for all dvbpsi table decoders. These should be the first members of a table decoder st...
Definition: dvbpsi.h:231
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.
Definition: dvbpsi.h:219
bool dvbpsi_decoder_present(dvbpsi_t *p_dvbpsi)
Determines if a decoder has been attached to dvbpsi_t handle.
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.
dvbpsi_message_cb pf_message
Definition: dvbpsi.h:147
void dvbpsi_decoder_delete(dvbpsi_decoder_t *p_decoder)
Deletes decoder struct and frees its memory.
enum dvbpsi_msg_level dvbpsi_msg_level_t
DVBPSI message level enumeration type definition.
Definition: dvbpsi.h:83
void(* dvbpsi_message_cb)(dvbpsi_t *handle, const dvbpsi_msg_level_t level, const char *msg)
Callback type definition.
Definition: dvbpsi.h:94
PSI decoder structure.
Definition: dvbpsi.h:260
bool dvbpsi_packet_push(dvbpsi_t *p_dvbpsi, uint8_t *p_data)
Injection of a TS packet into a PSI decoder.
PSI section structure.
Definition: psi.h:68
void dvbpsi_delete(dvbpsi_t *p_dvbpsi)
Deletes a dvbpsi_t handle created with dvbpsi_new.
dvbpsi_decoder_t * p_decoder
Definition: dvbpsi.h:144
enum dvbpsi_msg_level i_msg_level
Definition: dvbpsi.h:148
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.
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.
bool dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t *p_decoder)
Have all sections for this decoder been received?
dvbpsi_msg_level
DVBPSI message level enumeration type.
Definition: dvbpsi.h:72
DVBPSI handle structure.
Definition: dvbpsi.h:142
void * p_sys
Definition: dvbpsi.h:151
void dvbpsi_decoder_reset(dvbpsi_decoder_t *p_decoder, const bool b_force)
Resets a decoder internal state.