Commit 32849a9d authored by Jean-Paul Saman's avatar Jean-Paul Saman

PSI tables: Move p_cb_data into dvbpsi_decoder_t

All decoders implemented a new property named p_cb_data. This patch
moves the usage to dvbpsi_decoder_t::p_priv. The callback data is now
a dvbpsi decoder generic property.
parent 7f31344a
...@@ -48,7 +48,6 @@ typedef struct dvbpsi_atsc_eit_decoder_s ...@@ -48,7 +48,6 @@ typedef struct dvbpsi_atsc_eit_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_atsc_eit_callback pf_eit_callback; dvbpsi_atsc_eit_callback pf_eit_callback;
void * p_cb_data;
dvbpsi_atsc_eit_t current_eit; dvbpsi_atsc_eit_t current_eit;
dvbpsi_atsc_eit_t * p_building_eit; dvbpsi_atsc_eit_t * p_building_eit;
...@@ -81,7 +80,7 @@ static void dvbpsi_atsc_DecodeEITSections(dvbpsi_atsc_eit_t* p_eit, ...@@ -81,7 +80,7 @@ static void dvbpsi_atsc_DecodeEITSections(dvbpsi_atsc_eit_t* p_eit,
* Initialize a EIT subtable decoder. * Initialize a EIT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data) dvbpsi_atsc_eit_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -102,7 +101,7 @@ bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -102,7 +101,7 @@ bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
/* EIT decoder information */ /* EIT decoder information */
p_eit_decoder->pf_eit_callback = pf_callback; p_eit_decoder->pf_eit_callback = pf_callback;
p_eit_decoder->p_cb_data = p_cb_data; p_eit_decoder->p_priv = p_priv;
p_eit_decoder->p_building_eit = NULL; p_eit_decoder->p_building_eit = NULL;
p_eit_decoder->i_table_id = i_table_id; p_eit_decoder->i_table_id = i_table_id;
...@@ -437,7 +436,7 @@ static void dvbpsi_atsc_GatherEITSections(dvbpsi_t *p_dvbpsi, ...@@ -437,7 +436,7 @@ static void dvbpsi_atsc_GatherEITSections(dvbpsi_t *p_dvbpsi,
{ {
p_eit_decoder->current_eit.b_current_next = true; p_eit_decoder->current_eit.b_current_next = true;
*p_eit = p_eit_decoder->current_eit; *p_eit = p_eit_decoder->current_eit;
p_eit_decoder->pf_eit_callback(p_eit_decoder->p_cb_data, p_eit); p_eit_decoder->pf_eit_callback(p_eit_decoder->p_priv, p_eit);
} }
else else
dvbpsi_error(p_dvbpsi, "ATSC EIT decoder", "Could not signal new ATSC EIT."); dvbpsi_error(p_dvbpsi, "ATSC EIT decoder", "Could not signal new ATSC EIT.");
...@@ -470,7 +469,7 @@ static void dvbpsi_atsc_GatherEITSections(dvbpsi_t *p_dvbpsi, ...@@ -470,7 +469,7 @@ static void dvbpsi_atsc_GatherEITSections(dvbpsi_t *p_dvbpsi,
dvbpsi_atsc_DecodeEITSections(p_eit_decoder->p_building_eit, dvbpsi_atsc_DecodeEITSections(p_eit_decoder->p_building_eit,
p_eit_decoder->p_sections); p_eit_decoder->p_sections);
/* signal the new EIT */ /* signal the new EIT */
p_eit_decoder->pf_eit_callback(p_eit_decoder->p_cb_data, p_eit_decoder->pf_eit_callback(p_eit_decoder->p_priv,
p_eit_decoder->p_building_eit); p_eit_decoder->p_building_eit);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitEIT(p_eit_decoder, false); dvbpsi_ReInitEIT(p_eit_decoder, false);
......
...@@ -92,29 +92,29 @@ typedef struct dvbpsi_atsc_eit_s ...@@ -92,29 +92,29 @@ typedef struct dvbpsi_atsc_eit_s
* dvbpsi_eit_callback * dvbpsi_eit_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_atsc_eit_callback)(void* p_cb_data, * \typedef void (* dvbpsi_atsc_eit_callback)(void* p_priv,
dvbpsi_atsc_eit_t* p_new_eit) dvbpsi_atsc_eit_t* p_new_eit)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_atsc_eit_callback)(void* p_cb_data, dvbpsi_atsc_eit_t* p_new_eit); typedef void (* dvbpsi_atsc_eit_callback)(void* p_priv, dvbpsi_atsc_eit_t* p_new_eit);
/***************************************************************************** /*****************************************************************************
* dvbpsi_atsc_eit_attach * dvbpsi_atsc_eit_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data) uint16_t i_extension, dvbpsi_atsc_eit_callback pf_callback, void* p_priv)
* *
* \brief Creation and initialization of a EIT decoder. * \brief Creation and initialization of a EIT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCB. * \param i_table_id Table ID, 0xCB.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new EIT. * \param pf_callback function to call back on new EIT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, false otherwise * \return true if everything went ok, false otherwise
*/ */
bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data); dvbpsi_atsc_eit_callback pf_callback, void* p_priv);
/*! /*!
* \brief dvbpsi_atsc_AttachEIT is deprecated use @see dvbpsi_atsc_eit_attach() instead. * \brief dvbpsi_atsc_AttachEIT is deprecated use @see dvbpsi_atsc_eit_attach() instead.
...@@ -122,15 +122,15 @@ bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -122,15 +122,15 @@ bool dvbpsi_atsc_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
* \param i_table_id Table ID, 0xCB. * \param i_table_id Table ID, 0xCB.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new EIT. * \param pf_callback function to call back on new EIT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, false otherwise * \return true if everything went ok, false otherwise
*/ */
__attribute__((deprecated,unused)) __attribute__((deprecated,unused))
inline bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, inline bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_eit_callback pf_callback, void* p_cb_data) dvbpsi_atsc_eit_callback pf_callback, void* p_priv)
{ {
return dvbpsi_atsc_eit_attach(p_dvbpsi, i_table_id, i_extension, return dvbpsi_atsc_eit_attach(p_dvbpsi, i_table_id, i_extension,
pf_callback, p_cb_data); pf_callback, p_priv);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -54,7 +54,6 @@ typedef struct dvbpsi_atsc_ett_decoder_s ...@@ -54,7 +54,6 @@ typedef struct dvbpsi_atsc_ett_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_atsc_ett_callback pf_ett_callback; dvbpsi_atsc_ett_callback pf_ett_callback;
void * p_cb_data;
dvbpsi_atsc_ett_t current_ett; dvbpsi_atsc_ett_t current_ett;
dvbpsi_atsc_ett_t * p_building_ett; dvbpsi_atsc_ett_t * p_building_ett;
...@@ -83,7 +82,7 @@ static void dvbpsi_atsc_DecodeETTSections(dvbpsi_atsc_ett_t* p_ett, ...@@ -83,7 +82,7 @@ static void dvbpsi_atsc_DecodeETTSections(dvbpsi_atsc_ett_t* p_ett,
* Initialize a ETT decoder and return a handle on it. * Initialize a ETT decoder and return a handle on it.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_atsc_ett_attach(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_ett_attach(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data) dvbpsi_atsc_ett_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -104,7 +103,7 @@ bool dvbpsi_atsc_ett_attach(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_ ...@@ -104,7 +103,7 @@ bool dvbpsi_atsc_ett_attach(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_
/* ETT decoder information */ /* ETT decoder information */
p_ett_decoder->pf_ett_callback = pf_callback; p_ett_decoder->pf_ett_callback = pf_callback;
p_ett_decoder->p_cb_data = p_cb_data; p_ett_decoder->p_priv = p_priv;
p_ett_decoder->p_building_ett = NULL; p_ett_decoder->p_building_ett = NULL;
p_ett_decoder->i_table_id = i_table_id; p_ett_decoder->i_table_id = i_table_id;
...@@ -384,7 +383,7 @@ static void dvbpsi_atsc_GatherETTSections(dvbpsi_t* p_dvbpsi, ...@@ -384,7 +383,7 @@ static void dvbpsi_atsc_GatherETTSections(dvbpsi_t* p_dvbpsi,
dvbpsi_atsc_DecodeETTSections(p_ett_decoder->p_building_ett, dvbpsi_atsc_DecodeETTSections(p_ett_decoder->p_building_ett,
p_ett_decoder->p_sections); p_ett_decoder->p_sections);
/* signal the new ETT */ /* signal the new ETT */
p_ett_decoder->pf_ett_callback(p_ett_decoder->p_cb_data, p_ett_decoder->pf_ett_callback(p_ett_decoder->p_priv,
p_ett_decoder->p_building_ett); p_ett_decoder->p_building_ett);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitETT(p_ett_decoder, false); dvbpsi_ReInitETT(p_ett_decoder, false);
......
...@@ -79,29 +79,29 @@ typedef struct dvbpsi_atsc_ett_s ...@@ -79,29 +79,29 @@ typedef struct dvbpsi_atsc_ett_s
* dvbpsi_atsc_ett_callback * dvbpsi_atsc_ett_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_atsc_ett_callback)(void* p_cb_data, * \typedef void (* dvbpsi_atsc_ett_callback)(void* p_priv,
dvbpsi_atsc_ett_t* p_new_ett) dvbpsi_atsc_ett_t* p_new_ett)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_atsc_ett_callback)(void* p_cb_data, dvbpsi_atsc_ett_t* p_new_ett); typedef void (* dvbpsi_atsc_ett_callback)(void* p_priv, dvbpsi_atsc_ett_t* p_new_ett);
/***************************************************************************** /*****************************************************************************
* dvbpsi_atsc_ett_attach * dvbpsi_atsc_ett_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data) uint16_t i_extension, dvbpsi_atsc_ett_callback pf_callback, void* p_priv)
* *
* \brief Creation and initialization of a ETT decoder. * \brief Creation and initialization of a ETT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCC. * \param i_table_id Table ID, 0xCC.
* \param i_extension Table ID extension, normally 0x0000. * \param i_extension Table ID extension, normally 0x0000.
* \param pf_callback function to call back on new ETT. * \param pf_callback function to call back on new ETT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, else it returns false. * \return true if everything went ok, else it returns false.
*/ */
bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data); dvbpsi_atsc_ett_callback pf_callback, void* p_priv);
/*! /*!
* \brief dvbpsi_atsc_AttachETT is deprecated use @see dvbpsi_atsc_ett_attach() instead. * \brief dvbpsi_atsc_AttachETT is deprecated use @see dvbpsi_atsc_ett_attach() instead.
...@@ -109,15 +109,15 @@ bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -109,15 +109,15 @@ bool dvbpsi_atsc_ett_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
* \param i_table_id Table ID, 0xCC. * \param i_table_id Table ID, 0xCC.
* \param i_extension Table ID extension, normally 0x0000. * \param i_extension Table ID extension, normally 0x0000.
* \param pf_callback function to call back on new ETT. * \param pf_callback function to call back on new ETT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, else it returns false. * \return true if everything went ok, else it returns false.
*/ */
__attribute__((deprecated,unused)) __attribute__((deprecated,unused))
inline bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, inline bool dvbpsi_atsc_AttachETT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_ett_callback pf_callback, void* p_cb_data) dvbpsi_atsc_ett_callback pf_callback, void* p_priv)
{ {
return dvbpsi_atsc_ett_attach(p_dvbpsi, i_table_id, i_extension, return dvbpsi_atsc_ett_attach(p_dvbpsi, i_table_id, i_extension,
pf_callback, p_cb_data); pf_callback, p_priv);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -49,7 +49,6 @@ typedef struct dvbpsi_atsc_mgt_decoder_s ...@@ -49,7 +49,6 @@ typedef struct dvbpsi_atsc_mgt_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_atsc_mgt_callback pf_mgt_callback; dvbpsi_atsc_mgt_callback pf_mgt_callback;
void * p_cb_data;
dvbpsi_atsc_mgt_t current_mgt; dvbpsi_atsc_mgt_t current_mgt;
dvbpsi_atsc_mgt_t * p_building_mgt; dvbpsi_atsc_mgt_t * p_building_mgt;
...@@ -84,7 +83,7 @@ static void dvbpsi_atsc_DecodeMGTSections(dvbpsi_atsc_mgt_t* p_mgt, ...@@ -84,7 +83,7 @@ static void dvbpsi_atsc_DecodeMGTSections(dvbpsi_atsc_mgt_t* p_mgt,
* Initialize a MGT subtable decoder. * Initialize a MGT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data) dvbpsi_atsc_mgt_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -105,7 +104,7 @@ bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -105,7 +104,7 @@ bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
/* MGT decoder information */ /* MGT decoder information */
p_mgt_decoder->pf_mgt_callback = pf_callback; p_mgt_decoder->pf_mgt_callback = pf_callback;
p_mgt_decoder->p_cb_data = p_cb_data; p_mgt_decoder->p_priv = p_priv;
p_mgt_decoder->p_building_mgt = NULL; p_mgt_decoder->p_building_mgt = NULL;
p_mgt_decoder->i_table_id = i_table_id; p_mgt_decoder->i_table_id = i_table_id;
p_mgt_decoder->i_extension = i_extension; p_mgt_decoder->i_extension = i_extension;
...@@ -458,7 +457,7 @@ static void dvbpsi_atsc_GatherMGTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -458,7 +457,7 @@ static void dvbpsi_atsc_GatherMGTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
{ {
p_mgt_decoder->current_mgt.b_current_next = true; p_mgt_decoder->current_mgt.b_current_next = true;
*p_mgt = p_mgt_decoder->current_mgt; *p_mgt = p_mgt_decoder->current_mgt;
p_mgt_decoder->pf_mgt_callback(p_mgt_decoder->p_cb_data, p_mgt); p_mgt_decoder->pf_mgt_callback(p_mgt_decoder->p_priv, p_mgt);
} }
else else
dvbpsi_error(p_dvbpsi, "ATSC MGT decoder", "Could not signal new ATSC MGT."); dvbpsi_error(p_dvbpsi, "ATSC MGT decoder", "Could not signal new ATSC MGT.");
...@@ -491,7 +490,7 @@ static void dvbpsi_atsc_GatherMGTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -491,7 +490,7 @@ static void dvbpsi_atsc_GatherMGTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
dvbpsi_atsc_DecodeMGTSections(p_mgt_decoder->p_building_mgt, dvbpsi_atsc_DecodeMGTSections(p_mgt_decoder->p_building_mgt,
p_mgt_decoder->p_sections); p_mgt_decoder->p_sections);
/* signal the new MGT */ /* signal the new MGT */
p_mgt_decoder->pf_mgt_callback(p_mgt_decoder->p_cb_data, p_mgt_decoder->pf_mgt_callback(p_mgt_decoder->p_priv,
p_mgt_decoder->p_building_mgt); p_mgt_decoder->p_building_mgt);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitMGT(p_mgt_decoder, false); dvbpsi_ReInitMGT(p_mgt_decoder, false);
......
...@@ -92,29 +92,29 @@ typedef struct dvbpsi_atsc_mgt_s ...@@ -92,29 +92,29 @@ typedef struct dvbpsi_atsc_mgt_s
* dvbpsi_mgt_callback * dvbpsi_mgt_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_atsc_mgt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_atsc_mgt_callback)(void* p_priv,
dvbpsi_atsc_mgt_t* p_new_mgt) dvbpsi_atsc_mgt_t* p_new_mgt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_atsc_mgt_callback)(void* p_cb_data, dvbpsi_atsc_mgt_t* p_new_mgt); typedef void (* dvbpsi_atsc_mgt_callback)(void* p_priv, dvbpsi_atsc_mgt_t* p_new_mgt);
/***************************************************************************** /*****************************************************************************
* dvbpsi_atsc_mgt_attach * dvbpsi_atsc_mgt_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data) dvbpsi_atsc_mgt_callback pf_callback, void* p_priv)
* *
* \brief Creation and initialization of a MGT decoder. * \brief Creation and initialization of a MGT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xC7. * \param i_table_id Table ID, 0xC7.
* \param i_extension Table ID extension, here 0x0000. * \param i_extension Table ID extension, here 0x0000.
* \param pf_callback function to call back on new MGT. * \param pf_callback function to call back on new MGT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, false otherwise * \return true if everything went ok, false otherwise
*/ */
bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data); dvbpsi_atsc_mgt_callback pf_callback, void* p_priv);
/*! /*!
* \brief dvbpsi_atsc_AttachMGT is deprecated use @see dvbpsi_atsc_mgt_attach() instead. * \brief dvbpsi_atsc_AttachMGT is deprecated use @see dvbpsi_atsc_mgt_attach() instead.
...@@ -122,15 +122,15 @@ bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -122,15 +122,15 @@ bool dvbpsi_atsc_mgt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
* \param i_table_id Table ID, 0xC7. * \param i_table_id Table ID, 0xC7.
* \param i_extension Table ID extension, here 0x0000. * \param i_extension Table ID extension, here 0x0000.
* \param pf_callback function to call back on new MGT. * \param pf_callback function to call back on new MGT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, false otherwise * \return true if everything went ok, false otherwise
*/ */
__attribute__((deprecated,unused)) __attribute__((deprecated,unused))
inline bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, inline bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_mgt_callback pf_callback, void* p_cb_data) uint16_t i_extension, dvbpsi_atsc_mgt_callback pf_callback, void* p_priv)
{ {
dvbpsi_atsc_mgt_attach(p_dvbpsi, i_table_id, i_extension, dvbpsi_atsc_mgt_attach(p_dvbpsi, i_table_id, i_extension,
pf_callback, p_cb_data); pf_callback, p_priv);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -48,7 +48,6 @@ typedef struct dvbpsi_atsc_stt_decoder_s ...@@ -48,7 +48,6 @@ typedef struct dvbpsi_atsc_stt_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_atsc_stt_callback pf_stt_callback; dvbpsi_atsc_stt_callback pf_stt_callback;
void * p_cb_data;
dvbpsi_atsc_stt_t current_stt; dvbpsi_atsc_stt_t current_stt;
dvbpsi_atsc_stt_t * p_building_stt; dvbpsi_atsc_stt_t * p_building_stt;
...@@ -71,7 +70,7 @@ static void dvbpsi_atsc_DecodeSTTSections(dvbpsi_atsc_stt_t* p_stt, ...@@ -71,7 +70,7 @@ static void dvbpsi_atsc_DecodeSTTSections(dvbpsi_atsc_stt_t* p_stt,
* Initialize a STT subtable decoder. * Initialize a STT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_atsc_stt_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_stt_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data) dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -92,7 +91,7 @@ bool dvbpsi_atsc_stt_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -92,7 +91,7 @@ bool dvbpsi_atsc_stt_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_e
/* STT decoder information */ /* STT decoder information */
p_stt_decoder->pf_stt_callback = pf_stt_callback; p_stt_decoder->pf_stt_callback = pf_stt_callback;
p_stt_decoder->p_cb_data = p_cb_data; p_stt_decoder->p_priv = p_priv;
p_stt_decoder->p_building_stt = NULL; p_stt_decoder->p_building_stt = NULL;
p_stt_decoder->i_table_id = i_table_id; p_stt_decoder->i_table_id = i_table_id;
...@@ -365,7 +364,7 @@ static void dvbpsi_atsc_GatherSTTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -365,7 +364,7 @@ static void dvbpsi_atsc_GatherSTTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
{ {
p_stt_decoder->current_stt.b_current_next = 1; p_stt_decoder->current_stt.b_current_next = 1;
*p_stt = p_stt_decoder->current_stt; *p_stt = p_stt_decoder->current_stt;
p_stt_decoder->pf_stt_callback(p_stt_decoder->p_cb_data, p_stt); p_stt_decoder->pf_stt_callback(p_stt_decoder->p_priv, p_stt);
} }
} }
else else
...@@ -398,7 +397,7 @@ static void dvbpsi_atsc_GatherSTTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -398,7 +397,7 @@ static void dvbpsi_atsc_GatherSTTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
dvbpsi_atsc_DecodeSTTSections(p_stt_decoder->p_building_stt, dvbpsi_atsc_DecodeSTTSections(p_stt_decoder->p_building_stt,
p_stt_decoder->p_sections); p_stt_decoder->p_sections);
/* signal the new STT */ /* signal the new STT */
p_stt_decoder->pf_stt_callback(p_stt_decoder->p_cb_data, p_stt_decoder->pf_stt_callback(p_stt_decoder->p_priv,
p_stt_decoder->p_building_stt); p_stt_decoder->p_building_stt);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitSTT(p_stt_decoder, false); dvbpsi_ReInitSTT(p_stt_decoder, false);
......
...@@ -64,28 +64,28 @@ typedef struct dvbpsi_atsc_stt_s ...@@ -64,28 +64,28 @@ typedef struct dvbpsi_atsc_stt_s
* dvbpsi_atsc_stt_callback * dvbpsi_atsc_stt_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_atsc_stt_callback)(void* p_priv,
dvbpsi_atsc_stt_t* p_new_stt) dvbpsi_atsc_stt_t* p_new_stt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_atsc_stt_callback)(void* p_cb_data, dvbpsi_atsc_stt_t* p_new_stt); typedef void (* dvbpsi_atsc_stt_callback)(void* p_priv, dvbpsi_atsc_stt_t* p_new_stt);
/***************************************************************************** /*****************************************************************************
* dvbpsi_atsc_stt_attach * dvbpsi_atsc_stt_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data) dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv)
* \brief Creation and initialization of a STT decoder. * \brief Creation and initialization of a STT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached
* \param i_table_id Table ID, 0xCD. * \param i_table_id Table ID, 0xCD.
* \param i_extension Table ID extension, here it should be 0. * \param i_extension Table ID extension, here it should be 0.
* \param pf_stt_callback function to call back on new STT. * \param pf_stt_callback function to call back on new STT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok else false * \return true if everything went ok else false
*/ */
bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data); dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv);
/*! /*!
* \brief dvbpsi_atsc_AttachSTT is deprecated use @see dvbpsi_atsc_stt_attach() instead. * \brief dvbpsi_atsc_AttachSTT is deprecated use @see dvbpsi_atsc_stt_attach() instead.
...@@ -94,15 +94,15 @@ bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -94,15 +94,15 @@ bool dvbpsi_atsc_stt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
* \param i_table_id Table ID, 0xCD. * \param i_table_id Table ID, 0xCD.
* \param i_extension Table ID extension, here it should be 0. * \param i_extension Table ID extension, here it should be 0.
* \param pf_stt_callback function to call back on new STT. * \param pf_stt_callback function to call back on new STT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok else false * \return true if everything went ok else false
*/ */
__attribute__((deprecated,unused)) __attribute__((deprecated,unused))
inline bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, inline bool dvbpsi_atsc_AttachSTT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_stt_callback pf_stt_callback, void* p_cb_data) dvbpsi_atsc_stt_callback pf_stt_callback, void* p_priv)
{ {
return dvbpsi_atsc_stt_attach(p_dvbpsi, i_table_id, i_extension, return dvbpsi_atsc_stt_attach(p_dvbpsi, i_table_id, i_extension,
pf_stt_callback, p_cb_data); pf_stt_callback, p_priv);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -47,7 +47,6 @@ typedef struct dvbpsi_atsc_vct_decoder_s ...@@ -47,7 +47,6 @@ typedef struct dvbpsi_atsc_vct_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_atsc_vct_callback pf_vct_callback; dvbpsi_atsc_vct_callback pf_vct_callback;
void * p_cb_data;
dvbpsi_atsc_vct_t current_vct; dvbpsi_atsc_vct_t current_vct;
dvbpsi_atsc_vct_t * p_building_vct; dvbpsi_atsc_vct_t * p_building_vct;
...@@ -93,7 +92,7 @@ static void dvbpsi_atsc_DecodeVCTSections(dvbpsi_atsc_vct_t* p_vct, ...@@ -93,7 +92,7 @@ static void dvbpsi_atsc_DecodeVCTSections(dvbpsi_atsc_vct_t* p_vct,
* Initialize a VCT subtable decoder. * Initialize a VCT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_atsc_vct_callback pf_vct_callback, void* p_cb_data) dvbpsi_atsc_vct_callback pf_vct_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -115,7 +114,7 @@ bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -115,7 +114,7 @@ bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_e
/* VCT decoder information */ /* VCT decoder information */
p_vct_decoder->pf_vct_callback = pf_vct_callback; p_vct_decoder->pf_vct_callback = pf_vct_callback;
p_vct_decoder->p_cb_data = p_cb_data; p_vct_decoder->p_priv = p_priv;
p_vct_decoder->p_building_vct = NULL; p_vct_decoder->p_building_vct = NULL;
p_vct_decoder->i_table_id = i_table_id; p_vct_decoder->i_table_id = i_table_id;
...@@ -503,7 +502,7 @@ static void dvbpsi_atsc_GatherVCTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -503,7 +502,7 @@ static void dvbpsi_atsc_GatherVCTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
{ {
p_vct_decoder->current_vct.b_current_next = 1; p_vct_decoder->current_vct.b_current_next = 1;
*p_vct = p_vct_decoder->current_vct; *p_vct = p_vct_decoder->current_vct;
p_vct_decoder->pf_vct_callback(p_vct_decoder->p_cb_data, p_vct); p_vct_decoder->pf_vct_callback(p_vct_decoder->p_priv, p_vct);
} }
} }
else else
...@@ -536,7 +535,7 @@ static void dvbpsi_atsc_GatherVCTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section ...@@ -536,7 +535,7 @@ static void dvbpsi_atsc_GatherVCTSections(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section
dvbpsi_atsc_DecodeVCTSections(p_vct_decoder->p_building_vct, dvbpsi_atsc_DecodeVCTSections(p_vct_decoder->p_building_vct,
p_vct_decoder->p_sections); p_vct_decoder->p_sections);
/* signal the new VCT */ /* signal the new VCT */
p_vct_decoder->pf_vct_callback(p_vct_decoder->p_cb_data, p_vct_decoder->pf_vct_callback(p_vct_decoder->p_priv,
p_vct_decoder->p_building_vct); p_vct_decoder->p_building_vct);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitVCT(p_vct_decoder, false); dvbpsi_ReInitVCT(p_vct_decoder, false);
......
...@@ -105,11 +105,11 @@ typedef struct dvbpsi_atsc_vct_s ...@@ -105,11 +105,11 @@ typedef struct dvbpsi_atsc_vct_s
* dvbpsi_vct_callback * dvbpsi_vct_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, * \typedef void (* dvbpsi_atsc_vct_callback)(void* p_priv,
* dvbpsi_atsc_vct_t* p_new_vct) * dvbpsi_atsc_vct_t* p_new_vct)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, dvbpsi_atsc_vct_t* p_new_vct); typedef void (* dvbpsi_atsc_vct_callback)(void* p_priv, dvbpsi_atsc_vct_t* p_new_vct);
/***************************************************************************** /*****************************************************************************
* dvbpsi_atsc_vct_attach * dvbpsi_atsc_vct_attach
...@@ -117,18 +117,18 @@ typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, dvbpsi_atsc_vct_t* p_ ...@@ -117,18 +117,18 @@ typedef void (* dvbpsi_atsc_vct_callback)(void* p_cb_data, dvbpsi_atsc_vct_t* p_
/*! /*!
* \fn bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback, uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback,
void* p_cb_data) void* p_priv)
* \brief Creation and initialization of a VCT decoder. * \brief Creation and initialization of a VCT decoder.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0xC8 or 0xC9. * \param i_table_id Table ID, 0xC8 or 0xC9.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_vct_callback function to call back on new VCT. * \param pf_vct_callback function to call back on new VCT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, else false. * \return true if everything went ok, else false.
*/ */
bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback, uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback,
void* p_cb_data); void* p_priv);
/*! /*!
* \brief dvbpsi_atsc_AttachVCT is deprecated use @see dvbpsi_atsc_vct_attach() instead. * \brief dvbpsi_atsc_AttachVCT is deprecated use @see dvbpsi_atsc_vct_attach() instead.
...@@ -136,16 +136,16 @@ bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, ...@@ -136,16 +136,16 @@ bool dvbpsi_atsc_vct_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
* \param i_table_id Table ID, 0xC8 or 0xC9. * \param i_table_id Table ID, 0xC8 or 0xC9.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_vct_callback function to call back on new VCT. * \param pf_vct_callback function to call back on new VCT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true if everything went ok, else false. * \return true if everything went ok, else false.
*/ */
__attribute__((deprecated,unused)) __attribute__((deprecated,unused))
inline bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, inline bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback, uint16_t i_extension, dvbpsi_atsc_vct_callback pf_vct_callback,
void* p_cb_data) void* p_priv)
{ {
return dvbpsi_atsc_vct_attach(p_dvbpsi, i_table_id, i_extension, return dvbpsi_atsc_vct_attach(p_dvbpsi, i_table_id, i_extension,
pf_vct_callback, p_cb_data); pf_vct_callback, p_priv);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Initialize a BAT subtable decoder. * Initialize a BAT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_bat_callback pf_callback, void* p_cb_data) uint16_t i_extension, dvbpsi_bat_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -78,7 +78,7 @@ bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, ...@@ -78,7 +78,7 @@ bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
/* BAT decoder information */ /* BAT decoder information */
p_bat_decoder->pf_bat_callback = pf_callback; p_bat_decoder->pf_bat_callback = pf_callback;
p_bat_decoder->p_cb_data = p_cb_data; p_bat_decoder->p_priv = p_priv;
p_bat_decoder->p_building_bat = NULL; p_bat_decoder->p_building_bat = NULL;
p_bat_decoder->i_table_id = i_table_id; p_bat_decoder->i_table_id = i_table_id;
...@@ -417,7 +417,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t *p_dvbpsi, ...@@ -417,7 +417,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t *p_dvbpsi,
{ {
p_bat_decoder->current_bat.b_current_next = true; p_bat_decoder->current_bat.b_current_next = true;
memcpy(p_bat, &p_bat_decoder->current_bat, sizeof(dvbpsi_bat_t)); memcpy(p_bat, &p_bat_decoder->current_bat, sizeof(dvbpsi_bat_t));
p_bat_decoder->pf_bat_callback(p_bat_decoder->p_cb_data, p_bat); p_bat_decoder->pf_bat_callback(p_bat_decoder->p_priv, p_bat);
} }
else else
dvbpsi_error(p_dvbpsi, "BAT decoder", "Could not signal new BAT."); dvbpsi_error(p_dvbpsi, "BAT decoder", "Could not signal new BAT.");
...@@ -449,7 +449,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t *p_dvbpsi, ...@@ -449,7 +449,7 @@ void dvbpsi_bat_sections_gather(dvbpsi_t *p_dvbpsi,
dvbpsi_bat_sections_decode(p_bat_decoder->p_building_bat, dvbpsi_bat_sections_decode(p_bat_decoder->p_building_bat,
p_bat_decoder->p_sections); p_bat_decoder->p_sections);
/* signal the new BAT */ /* signal the new BAT */
p_bat_decoder->pf_bat_callback(p_bat_decoder->p_cb_data, p_bat_decoder->pf_bat_callback(p_bat_decoder->p_priv,
p_bat_decoder->p_building_bat); p_bat_decoder->p_building_bat);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitBAT(p_bat_decoder, false); dvbpsi_ReInitBAT(p_bat_decoder, false);
......
...@@ -105,28 +105,28 @@ typedef struct dvbpsi_bat_s ...@@ -105,28 +105,28 @@ typedef struct dvbpsi_bat_s
* dvbpsi_bat_callback * dvbpsi_bat_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_bat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_bat_callback)(void* p_priv,
dvbpsi_bat_t* p_new_bat) dvbpsi_bat_t* p_new_bat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_bat_callback)(void* p_cb_data, dvbpsi_bat_t* p_new_bat); typedef void (* dvbpsi_bat_callback)(void* p_priv, dvbpsi_bat_t* p_new_bat);
/***************************************************************************** /*****************************************************************************
* dvbpsi_bat_attach * dvbpsi_bat_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_bat_callback pf_callback, void* p_cb_data) uint16_t i_extension, dvbpsi_bat_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a BAT decoder. It will be attached to p_dvbpsi. * \brief Creation and initialization of a BAT decoder. It will be attached to p_dvbpsi.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0x4a. * \param i_table_id Table ID, 0x4a.
* \param i_extension Table ID extension, here bouquet ID. * \param i_extension Table ID extension, here bouquet ID.
* \param pf_callback function to call back on new BAT. * \param pf_callback function to call back on new BAT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_bat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_bat_callback pf_callback, void* p_cb_data); dvbpsi_bat_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_bat_detach * dvbpsi_bat_detach
......
...@@ -39,7 +39,6 @@ typedef struct dvbpsi_bat_decoder_s ...@@ -39,7 +39,6 @@ typedef struct dvbpsi_bat_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_bat_callback pf_bat_callback; dvbpsi_bat_callback pf_bat_callback;
void * p_cb_data;
dvbpsi_bat_t current_bat; dvbpsi_bat_t current_bat;
dvbpsi_bat_t * p_building_bat; dvbpsi_bat_t * p_building_bat;
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Initialize a CAT decoder and return a handle on it. * Initialize a CAT decoder and return a handle on it.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_cat_callback pf_callback, void* p_cb_data) dvbpsi_cat_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -78,7 +78,7 @@ bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -78,7 +78,7 @@ bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* CAT decoder configuration */ /* CAT decoder configuration */
p_cat_decoder->pf_cat_callback = pf_callback; p_cat_decoder->pf_cat_callback = pf_callback;
p_cat_decoder->p_cb_data = p_cb_data; p_cat_decoder->p_priv = p_priv;
p_cat_decoder->p_building_cat = NULL; p_cat_decoder->p_building_cat = NULL;
p_cat_decoder->i_table_id = i_table_id; p_cat_decoder->i_table_id = i_table_id;
...@@ -360,7 +360,7 @@ void dvbpsi_cat_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sect ...@@ -360,7 +360,7 @@ void dvbpsi_cat_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sect
dvbpsi_cat_sections_decode(p_cat_decoder->p_building_cat, dvbpsi_cat_sections_decode(p_cat_decoder->p_building_cat,
p_cat_decoder->p_sections); p_cat_decoder->p_sections);
/* signal the new CAT */ /* signal the new CAT */
p_cat_decoder->pf_cat_callback(p_cat_decoder->p_cb_data, p_cat_decoder->pf_cat_callback(p_cat_decoder->p_priv,
p_cat_decoder->p_building_cat); p_cat_decoder->p_building_cat);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitCAT(p_cat_decoder, false); dvbpsi_ReInitCAT(p_cat_decoder, false);
......
...@@ -67,28 +67,28 @@ typedef struct dvbpsi_cat_s ...@@ -67,28 +67,28 @@ typedef struct dvbpsi_cat_s
* dvbpsi_cat_callback * dvbpsi_cat_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_cat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_cat_callback)(void* p_priv,
dvbpsi_cat_t* p_new_cat) dvbpsi_cat_t* p_new_cat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_cat_callback)(void* p_cb_data, dvbpsi_cat_t* p_new_cat); typedef void (* dvbpsi_cat_callback)(void* p_priv, dvbpsi_cat_t* p_new_cat);
/***************************************************************************** /*****************************************************************************
* dvbpsi_cat_attach * dvbpsi_cat_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_cat_callback pf_callback, void* p_cb_data) dvbpsi_cat_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a CAT decoder. It will be attached to p_dvbpsi * \brief Creation and initialization of a CAT decoder. It will be attached to p_dvbpsi
* \param p_dvbpsi is a pointer to dvbpsi_t which holds a pointer to the decoder * \param p_dvbpsi is a pointer to dvbpsi_t which holds a pointer to the decoder
* \param i_table_id Table ID, here 0x01 * \param i_table_id Table ID, here 0x01
* \param i_extension Table ID extension. * \param i_extension Table ID extension.
* \param pf_callback function to call back on new CAT * \param pf_callback function to call back on new CAT
* \param p_cb_data private data given in argument to the callback * \param p_priv private data given in argument to the callback
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_cat_callback pf_callback, void* p_cb_data); dvbpsi_cat_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_cat_detach * dvbpsi_cat_detach
......
...@@ -40,7 +40,6 @@ typedef struct dvbpsi_cat_decoder_s ...@@ -40,7 +40,6 @@ typedef struct dvbpsi_cat_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_cat_callback pf_cat_callback; dvbpsi_cat_callback pf_cat_callback;
void * p_cb_data;
dvbpsi_cat_t current_cat; dvbpsi_cat_t current_cat;
dvbpsi_cat_t * p_building_cat; dvbpsi_cat_t * p_building_cat;
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
* Initialize a EIT subtable decoder. * Initialize a EIT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_eit_callback pf_callback, void* p_cb_data) dvbpsi_eit_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -77,7 +77,7 @@ bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -77,7 +77,7 @@ bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* EIT decoder information */ /* EIT decoder information */
p_eit_decoder->pf_eit_callback = pf_callback; p_eit_decoder->pf_eit_callback = pf_callback;
p_eit_decoder->p_cb_data = p_cb_data; p_eit_decoder->p_priv = p_priv;
p_eit_decoder->p_building_eit = NULL; p_eit_decoder->p_building_eit = NULL;
p_eit_decoder->i_table_id = i_table_id; p_eit_decoder->i_table_id = i_table_id;
...@@ -500,7 +500,7 @@ void dvbpsi_eit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect ...@@ -500,7 +500,7 @@ void dvbpsi_eit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect
p_eit_decoder->p_sections); p_eit_decoder->p_sections);
/* signal the new EIT */ /* signal the new EIT */
p_eit_decoder->pf_eit_callback(p_eit_decoder->p_cb_data, p_eit_decoder->p_building_eit); p_eit_decoder->pf_eit_callback(p_eit_decoder->p_priv, p_eit_decoder->p_building_eit);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitEIT(p_eit_decoder, false); dvbpsi_ReInitEIT(p_eit_decoder, false);
......
...@@ -104,10 +104,10 @@ typedef struct dvbpsi_eit_s ...@@ -104,10 +104,10 @@ typedef struct dvbpsi_eit_s
* dvbpsi_eit_callback * dvbpsi_eit_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit) * \typedef void (* dvbpsi_eit_callback)(void* p_priv, dvbpsi_eit_t* p_new_eit)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit); typedef void (* dvbpsi_eit_callback)(void* p_priv, dvbpsi_eit_t* p_new_eit);
/***************************************************************************** /*****************************************************************************
* dvbpsi_AttachEIT * dvbpsi_AttachEIT
...@@ -115,17 +115,17 @@ typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit); ...@@ -115,17 +115,17 @@ typedef void (* dvbpsi_eit_callback)(void* p_cb_data, dvbpsi_eit_t* p_new_eit);
/*! /*!
* \fn bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_eit_callback pf_callback, uint16_t i_extension, dvbpsi_eit_callback pf_callback,
void* p_cb_data) void* p_priv)
* \brief Creation and initialization of a EIT decoder. * \brief Creation and initialization of a EIT decoder.
* \param p_dvbpsi pointer to Subtable demultiplexor to which the EIT decoder is attached. * \param p_dvbpsi pointer to Subtable demultiplexor to which the EIT decoder is attached.
* \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F. * \param i_table_id Table ID, 0x4E, 0x4F, or 0x50-0x6F.
* \param i_extension Table ID extension, here service ID. * \param i_extension Table ID extension, here service ID.
* \param pf_callback function to call back on new EIT. * \param pf_callback function to call back on new EIT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_eit_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_eit_callback pf_callback, void* p_cb_data); dvbpsi_eit_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_eit_detach * dvbpsi_eit_detach
......
...@@ -38,7 +38,6 @@ typedef struct dvbpsi_eit_decoder_s ...@@ -38,7 +38,6 @@ typedef struct dvbpsi_eit_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_eit_callback pf_eit_callback; dvbpsi_eit_callback pf_eit_callback;
void * p_cb_data;
dvbpsi_eit_t current_eit; dvbpsi_eit_t current_eit;
dvbpsi_eit_t * p_building_eit; dvbpsi_eit_t * p_building_eit;
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_nit_callback pf_callback, uint16_t i_extension, dvbpsi_nit_callback pf_callback,
void* p_cb_data) void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -80,7 +80,7 @@ bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, ...@@ -80,7 +80,7 @@ bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
/* NIT decoder information */ /* NIT decoder information */
p_nit_decoder->i_network_id = i_extension; p_nit_decoder->i_network_id = i_extension;
p_nit_decoder->pf_nit_callback = pf_callback; p_nit_decoder->pf_nit_callback = pf_callback;
p_nit_decoder->p_cb_data = p_cb_data; p_nit_decoder->p_priv = p_priv;
p_nit_decoder->p_building_nit = NULL; p_nit_decoder->p_building_nit = NULL;
p_nit_decoder->i_table_id = i_table_id; p_nit_decoder->i_table_id = i_table_id;
...@@ -442,7 +442,7 @@ void dvbpsi_nit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect ...@@ -442,7 +442,7 @@ void dvbpsi_nit_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect
dvbpsi_nit_sections_decode(p_nit_decoder->p_building_nit, dvbpsi_nit_sections_decode(p_nit_decoder->p_building_nit,
p_nit_decoder->p_sections); p_nit_decoder->p_sections);
/* signal the new NIT */ /* signal the new NIT */
p_nit_decoder->pf_nit_callback(p_nit_decoder->p_cb_data, p_nit_decoder->pf_nit_callback(p_nit_decoder->p_priv,
p_nit_decoder->p_building_nit); p_nit_decoder->p_building_nit);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitNIT(p_nit_decoder, false); dvbpsi_ReInitNIT(p_nit_decoder, false);
......
...@@ -99,28 +99,28 @@ typedef struct dvbpsi_nit_s ...@@ -99,28 +99,28 @@ typedef struct dvbpsi_nit_s
* dvbpsi_nit_callback * dvbpsi_nit_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_nit_callback)(void* p_cb_data, * \typedef void (* dvbpsi_nit_callback)(void* p_priv,
dvbpsi_nit_t* p_new_nit) dvbpsi_nit_t* p_new_nit)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_nit_callback)(void* p_cb_data, dvbpsi_nit_t* p_new_nit); typedef void (* dvbpsi_nit_callback)(void* p_priv, dvbpsi_nit_t* p_new_nit);
/***************************************************************************** /*****************************************************************************
* dvbpsi_nit_attach * dvbpsi_nit_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_nit_callback pf_callback, void* p_cb_data) dvbpsi_nit_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a NIT decoder. It is attached to p_dvbpsi. * \brief Creation and initialization of a NIT decoder. It is attached to p_dvbpsi.
* \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, 0x40 (actual) or 0x41 (other). * \param i_table_id Table ID, 0x40 (actual) or 0x41 (other).
* \param i_extension Table ID extension, here network ID. * \param i_extension Table ID extension, here network ID.
* \param pf_callback function to call back on new NIT. * \param pf_callback function to call back on new NIT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_nit_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_nit_callback pf_callback, void* p_cb_data); dvbpsi_nit_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_nit_detach * dvbpsi_nit_detach
......
...@@ -40,7 +40,6 @@ typedef struct dvbpsi_nit_decoder_s ...@@ -40,7 +40,6 @@ typedef struct dvbpsi_nit_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_nit_callback pf_nit_callback; dvbpsi_nit_callback pf_nit_callback;
void * p_cb_data;
dvbpsi_nit_t current_nit; dvbpsi_nit_t current_nit;
dvbpsi_nit_t * p_building_nit; dvbpsi_nit_t * p_building_nit;
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
* Initialize a PAT decoder and return a handle on it. * Initialize a PAT decoder and return a handle on it.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_pat_callback pf_callback, void* p_cb_data) dvbpsi_pat_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -74,7 +74,7 @@ bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -74,7 +74,7 @@ bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* PAT decoder information */ /* PAT decoder information */
p_pat_decoder->pf_pat_callback = pf_callback; p_pat_decoder->pf_pat_callback = pf_callback;
p_pat_decoder->p_cb_data = p_cb_data; p_pat_decoder->p_priv = p_priv;
p_pat_decoder->p_building_pat = NULL; p_pat_decoder->p_building_pat = NULL;
p_pat_decoder->i_table_id = i_table_id; p_pat_decoder->i_table_id = i_table_id;
...@@ -378,7 +378,7 @@ void dvbpsi_pat_sections_gather(dvbpsi_t* p_dvbpsi, dvbpsi_psi_section_t* p_sect ...@@ -378,7 +378,7 @@ void dvbpsi_pat_sections_gather(dvbpsi_t* p_dvbpsi, dvbpsi_psi_section_t* p_sect
/* signal the new PAT */ /* signal the new PAT */
if (p_pat_decoder->b_current_valid) if (p_pat_decoder->b_current_valid)
p_pat_decoder->pf_pat_callback(p_pat_decoder->p_cb_data, p_pat_decoder->pf_pat_callback(p_pat_decoder->p_priv,
p_pat_decoder->p_building_pat); p_pat_decoder->p_building_pat);
/* Delete sectioins and Reinitialize the structures */ /* Delete sectioins and Reinitialize the structures */
......
...@@ -91,28 +91,28 @@ typedef struct dvbpsi_pat_s ...@@ -91,28 +91,28 @@ typedef struct dvbpsi_pat_s
* dvbpsi_pat_callback * dvbpsi_pat_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_pat_callback)(void* p_cb_data, * \typedef void (* dvbpsi_pat_callback)(void* p_priv,
dvbpsi_pat_t* p_new_pat) dvbpsi_pat_t* p_new_pat)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_pat_callback)(void* p_cb_data, dvbpsi_pat_t* p_new_pat); typedef void (* dvbpsi_pat_callback)(void* p_priv, dvbpsi_pat_t* p_new_pat);
/***************************************************************************** /*****************************************************************************
* dvbpsi_pat_attach * dvbpsi_pat_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
* dvbpsi_pat_callback pf_callback, void* p_cb_data) * dvbpsi_pat_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a PAT decoder. The decoder will be attached to 'p_dvbpsi' argument. * \brief Creation and initialization of a PAT decoder. The decoder will be attached to 'p_dvbpsi' argument.
* \param p_dvbpsi handle to dvbpsi with attached decoder * \param p_dvbpsi handle to dvbpsi with attached decoder
* \param i_table_id Table ID * \param i_table_id Table ID
* \param i_extension Table ID extension * \param i_extension Table ID extension
* \param pf_callback function to call back on new PAT * \param pf_callback function to call back on new PAT
* \param p_cb_data private data given in argument to the callback * \param p_priv private data given in argument to the callback
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_pat_callback pf_callback, void* p_cb_data); dvbpsi_pat_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_pat_detach * dvbpsi_pat_detach
......
...@@ -38,7 +38,6 @@ typedef struct dvbpsi_pat_decoder_s ...@@ -38,7 +38,6 @@ typedef struct dvbpsi_pat_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_pat_callback pf_pat_callback; dvbpsi_pat_callback pf_pat_callback;
void * p_cb_data;
dvbpsi_pat_t current_pat; dvbpsi_pat_t current_pat;
dvbpsi_pat_t * p_building_pat; dvbpsi_pat_t * p_building_pat;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* Initialize a PMT decoder and return a handle on it. * Initialize a PMT decoder and return a handle on it.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_pmt_callback pf_callback, void* p_cb_data) dvbpsi_pmt_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -77,7 +77,7 @@ bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -77,7 +77,7 @@ bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* PMT decoder configuration */ /* PMT decoder configuration */
p_pmt_decoder->i_program_number = i_extension; p_pmt_decoder->i_program_number = i_extension;
p_pmt_decoder->pf_pmt_callback = pf_callback; p_pmt_decoder->pf_pmt_callback = pf_callback;
p_pmt_decoder->p_cb_data = p_cb_data; p_pmt_decoder->p_priv = p_priv;
p_pmt_decoder->p_building_pmt = NULL; p_pmt_decoder->p_building_pmt = NULL;
p_pmt_decoder->i_table_id = i_table_id; p_pmt_decoder->i_table_id = i_table_id;
...@@ -431,7 +431,7 @@ void dvbpsi_pmt_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sect ...@@ -431,7 +431,7 @@ void dvbpsi_pmt_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t* p_sect
dvbpsi_pmt_sections_decode(p_pmt_decoder->p_building_pmt, dvbpsi_pmt_sections_decode(p_pmt_decoder->p_building_pmt,
p_pmt_decoder->p_sections); p_pmt_decoder->p_sections);
/* signal the new PMT */ /* signal the new PMT */
p_pmt_decoder->pf_pmt_callback(p_pmt_decoder->p_cb_data, p_pmt_decoder->pf_pmt_callback(p_pmt_decoder->p_priv,
p_pmt_decoder->p_building_pmt); p_pmt_decoder->p_building_pmt);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitPMT(p_pmt_decoder, false); dvbpsi_ReInitPMT(p_pmt_decoder, false);
......
...@@ -96,11 +96,11 @@ typedef struct dvbpsi_pmt_s ...@@ -96,11 +96,11 @@ typedef struct dvbpsi_pmt_s
* dvbpsi_pmt_callback * dvbpsi_pmt_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_pmt_callback)(void* p_priv,
dvbpsi_pmt_t* p_new_pmt) dvbpsi_pmt_t* p_new_pmt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt); typedef void (* dvbpsi_pmt_callback)(void* p_priv, dvbpsi_pmt_t* p_new_pmt);
/***************************************************************************** /*****************************************************************************
* dvbpsi_pmt_attach * dvbpsi_pmt_attach
...@@ -110,7 +110,7 @@ typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt); ...@@ -110,7 +110,7 @@ typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt);
* uint8_t i_table_id, * uint8_t i_table_id,
* uint16_t i_extension, * uint16_t i_extension,
dvbpsi_pmt_callback pf_callback, dvbpsi_pmt_callback pf_callback,
void* p_cb_data) void* p_priv)
* \brief Creates and initialization of a PMT decoder and attaches it to dvbpsi_t * \brief Creates and initialization of a PMT decoder and attaches it to dvbpsi_t
* handle * handle
* \param p_dvbpsi handle * \param p_dvbpsi handle
...@@ -118,11 +118,11 @@ typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt); ...@@ -118,11 +118,11 @@ typedef void (* dvbpsi_pmt_callback)(void* p_cb_data, dvbpsi_pmt_t* p_new_pmt);
* \param i_extension Normally Table ID extension number, * \param i_extension Normally Table ID extension number,
* but for PMT's it is the program_number; * but for PMT's it is the program_number;
* \param pf_callback function to call back on new PMT * \param pf_callback function to call back on new PMT
* \param p_cb_data private data given in argument to the callback * \param p_priv private data given in argument to the callback
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_pmt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_pmt_callback pf_callback, void* p_cb_data); dvbpsi_pmt_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_pmt_detach * dvbpsi_pmt_detach
......
...@@ -38,7 +38,6 @@ typedef struct dvbpsi_pmt_decoder_s ...@@ -38,7 +38,6 @@ typedef struct dvbpsi_pmt_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_pmt_callback pf_pmt_callback; dvbpsi_pmt_callback pf_pmt_callback;
void * p_cb_data;
dvbpsi_pmt_t current_pmt; dvbpsi_pmt_t current_pmt;
dvbpsi_pmt_t * p_building_pmt; dvbpsi_pmt_t * p_building_pmt;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* Initialize a RST decoder and return a handle on it. * Initialize a RST decoder and return a handle on it.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_rst_callback pf_callback, void* p_cb_data) dvbpsi_rst_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -76,7 +76,7 @@ bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -76,7 +76,7 @@ bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* RST decoder configuration */ /* RST decoder configuration */
p_rst_decoder->pf_rst_callback = pf_callback; p_rst_decoder->pf_rst_callback = pf_callback;
p_rst_decoder->p_cb_data = p_cb_data; p_rst_decoder->p_priv = p_priv;
p_rst_decoder->p_building_rst = NULL; p_rst_decoder->p_building_rst = NULL;
p_rst_decoder->i_table_id = i_table_id; p_rst_decoder->i_table_id = i_table_id;
...@@ -426,7 +426,7 @@ void dvbpsi_rst_sections_gather(dvbpsi_t *p_dvbpsi, ...@@ -426,7 +426,7 @@ void dvbpsi_rst_sections_gather(dvbpsi_t *p_dvbpsi,
dvbpsi_rst_sections_decode(p_rst_decoder->p_building_rst, dvbpsi_rst_sections_decode(p_rst_decoder->p_building_rst,
p_rst_decoder->p_sections); p_rst_decoder->p_sections);
/* signal the new CAT */ /* signal the new CAT */
p_rst_decoder->pf_rst_callback(p_rst_decoder->p_cb_data, p_rst_decoder->pf_rst_callback(p_rst_decoder->p_priv,
p_rst_decoder->p_building_rst); p_rst_decoder->p_building_rst);
/* Delete sectioins and Reinitialize the structures */ /* Delete sectioins and Reinitialize the structures */
dvbpsi_rst_reset(p_rst_decoder, false); dvbpsi_rst_reset(p_rst_decoder, false);
......
...@@ -88,11 +88,11 @@ typedef struct dvbpsi_rst_s ...@@ -88,11 +88,11 @@ typedef struct dvbpsi_rst_s
* dvbpsi_rst_callback * dvbpsi_rst_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_rst_callback)(void* p_cb_data, * \typedef void (* dvbpsi_rst_callback)(void* p_priv,
dvbpsi_rst_t* p_new_rst) dvbpsi_rst_t* p_new_rst)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_rst_callback)(void* p_cb_data, dvbpsi_rst_t* p_new_rst); typedef void (* dvbpsi_rst_callback)(void* p_priv, dvbpsi_rst_t* p_new_rst);
/***************************************************************************** /*****************************************************************************
* dvbpsi_rst_attach * dvbpsi_rst_attach
...@@ -100,17 +100,17 @@ typedef void (* dvbpsi_rst_callback)(void* p_cb_data, dvbpsi_rst_t* p_new_rst); ...@@ -100,17 +100,17 @@ typedef void (* dvbpsi_rst_callback)(void* p_cb_data, dvbpsi_rst_t* p_new_rst);
/*! /*!
* \fn bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, * \fn bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi,
* uint8_t i_table_id, uint16_t i_extension, * uint8_t i_table_id, uint16_t i_extension,
dvbpsi_rst_callback pf_callback, void* p_cb_data) dvbpsi_rst_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a RST decoder. It will be attached to p_dvbpsi * \brief Creation and initialization of a RST decoder. It will be attached to p_dvbpsi
* \param p_dvbpsi is a pointer to dvbpsi_t which holds a pointer to the decoder * \param p_dvbpsi is a pointer to dvbpsi_t which holds a pointer to the decoder
* \param i_table_id Table ID * \param i_table_id Table ID
* \param i_extension Table ID extension * \param i_extension Table ID extension
* \param pf_callback function to call back on new RST * \param pf_callback function to call back on new RST
* \param p_cb_data private data given in argument to the callback * \param p_priv private data given in argument to the callback
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_rst_callback pf_callback, void* p_cb_data); dvbpsi_rst_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_rst_detach * dvbpsi_rst_detach
......
...@@ -37,7 +37,6 @@ typedef struct dvbpsi_rst_decoder_s ...@@ -37,7 +37,6 @@ typedef struct dvbpsi_rst_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_rst_callback pf_rst_callback; dvbpsi_rst_callback pf_rst_callback;
void * p_cb_data;
dvbpsi_rst_t current_rst; dvbpsi_rst_t current_rst;
dvbpsi_rst_t * p_building_rst; dvbpsi_rst_t * p_building_rst;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* Initialize a SDT subtable decoder. * Initialize a SDT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_sdt_callback pf_callback, void* p_cb_data) dvbpsi_sdt_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -76,7 +76,7 @@ bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -76,7 +76,7 @@ bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* SDT decoder information */ /* SDT decoder information */
p_sdt_decoder->pf_sdt_callback = pf_callback; p_sdt_decoder->pf_sdt_callback = pf_callback;
p_sdt_decoder->p_cb_data = p_cb_data; p_sdt_decoder->p_priv = p_priv;
p_sdt_decoder->p_building_sdt = NULL; p_sdt_decoder->p_building_sdt = NULL;
p_sdt_decoder->i_table_id = i_table_id; p_sdt_decoder->i_table_id = i_table_id;
...@@ -418,7 +418,7 @@ void dvbpsi_sdt_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect ...@@ -418,7 +418,7 @@ void dvbpsi_sdt_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_sect
dvbpsi_sdt_sections_decode(p_sdt_decoder->p_building_sdt, dvbpsi_sdt_sections_decode(p_sdt_decoder->p_building_sdt,
p_sdt_decoder->p_sections); p_sdt_decoder->p_sections);
/* signal the new SDT */ /* signal the new SDT */
p_sdt_decoder->pf_sdt_callback(p_sdt_decoder->p_cb_data, p_sdt_decoder->pf_sdt_callback(p_sdt_decoder->p_priv,
p_sdt_decoder->p_building_sdt); p_sdt_decoder->p_building_sdt);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitSDT(p_sdt_decoder, false); dvbpsi_ReInitSDT(p_sdt_decoder, false);
......
...@@ -104,11 +104,11 @@ typedef struct dvbpsi_sdt_s ...@@ -104,11 +104,11 @@ typedef struct dvbpsi_sdt_s
* dvbpsi_sdt_callback * dvbpsi_sdt_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, * \typedef void (* dvbpsi_sdt_callback)(void* p_priv,
dvbpsi_sdt_t* p_new_sdt) dvbpsi_sdt_t* p_new_sdt)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_sdt); typedef void (* dvbpsi_sdt_callback)(void* p_priv, dvbpsi_sdt_t* p_new_sdt);
/***************************************************************************** /*****************************************************************************
* dvbpsi_sdt_attach * dvbpsi_sdt_attach
...@@ -116,17 +116,17 @@ typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_sdt); ...@@ -116,17 +116,17 @@ typedef void (* dvbpsi_sdt_callback)(void* p_cb_data, dvbpsi_sdt_t* p_new_sdt);
/*! /*!
* \fn bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sdt_callback pf_callback, uint16_t i_extension, dvbpsi_sdt_callback pf_callback,
void* p_cb_data) void* p_priv)
* \brief Creation and initialization of a SDT decoder. It is attached to p_dvbpsi. * \brief Creation and initialization of a SDT decoder. It is attached to p_dvbpsi.
* \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure * \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure
* \param i_table_id Table ID, 0x42 or 0x46. * \param i_table_id Table ID, 0x42 or 0x46.
* \param i_extension Table ID extension, here TS ID. * \param i_extension Table ID extension, here TS ID.
* \param pf_callback function to call back on new SDT. * \param pf_callback function to call back on new SDT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_sdt_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_sdt_callback pf_callback, void* p_cb_data); dvbpsi_sdt_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_sdt_detach * dvbpsi_sdt_detach
......
...@@ -38,7 +38,6 @@ typedef struct dvbpsi_sdt_decoder_s ...@@ -38,7 +38,6 @@ typedef struct dvbpsi_sdt_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_sdt_callback pf_sdt_callback; dvbpsi_sdt_callback pf_sdt_callback;
void * p_cb_data;
dvbpsi_sdt_t current_sdt; dvbpsi_sdt_t current_sdt;
dvbpsi_sdt_t * p_building_sdt; dvbpsi_sdt_t * p_building_sdt;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* Initialize a SIS subtable decoder. * Initialize a SIS subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_sis_callback pf_callback, void* p_cb_data) dvbpsi_sis_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -77,7 +77,7 @@ bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -77,7 +77,7 @@ bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* SIS decoder information */ /* SIS decoder information */
p_sis_decoder->pf_sis_callback = pf_callback; p_sis_decoder->pf_sis_callback = pf_callback;
p_sis_decoder->p_cb_data = p_cb_data; p_sis_decoder->p_priv = p_priv;
p_sis_decoder->p_building_sis = NULL; p_sis_decoder->p_building_sis = NULL;
p_sis_decoder->i_table_id = i_table_id; p_sis_decoder->i_table_id = i_table_id;
...@@ -403,7 +403,7 @@ void dvbpsi_sis_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t * p_sec ...@@ -403,7 +403,7 @@ void dvbpsi_sis_sections_gather(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t * p_sec
dvbpsi_sis_sections_decode(p_dvbpsi, p_sis_decoder->p_building_sis, dvbpsi_sis_sections_decode(p_dvbpsi, p_sis_decoder->p_building_sis,
p_sis_decoder->p_sections); p_sis_decoder->p_sections);
/* signal the new SDT */ /* signal the new SDT */
p_sis_decoder->pf_sis_callback(p_sis_decoder->p_cb_data, p_sis_decoder->pf_sis_callback(p_sis_decoder->p_priv,
p_sis_decoder->p_building_sis); p_sis_decoder->p_building_sis);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitSIS(p_sis_decoder, false); dvbpsi_ReInitSIS(p_sis_decoder, false);
......
...@@ -340,11 +340,11 @@ typedef struct dvbpsi_sis_cmd_bandwidth_reservation_s ...@@ -340,11 +340,11 @@ typedef struct dvbpsi_sis_cmd_bandwidth_reservation_s
* dvbpsi_sis_callback * dvbpsi_sis_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_sis_callback)(void* p_cb_data, * \typedef void (* dvbpsi_sis_callback)(void* p_priv,
dvbpsi_sis_t* p_new_sis) dvbpsi_sis_t* p_new_sis)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_sis_callback)(void* p_cb_data, dvbpsi_sis_t* p_new_sis); typedef void (* dvbpsi_sis_callback)(void* p_priv, dvbpsi_sis_t* p_new_sis);
/***************************************************************************** /*****************************************************************************
* dvbpsi_sis_attach * dvbpsi_sis_attach
...@@ -352,17 +352,17 @@ typedef void (* dvbpsi_sis_callback)(void* p_cb_data, dvbpsi_sis_t* p_new_sis); ...@@ -352,17 +352,17 @@ typedef void (* dvbpsi_sis_callback)(void* p_cb_data, dvbpsi_sis_t* p_new_sis);
/*! /*!
* \fn bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, * \fn bool dvbpsi_sis_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
uint16_t i_extension, dvbpsi_sis_callback pf_callback, uint16_t i_extension, dvbpsi_sis_callback pf_callback,
void* p_cb_data) void* p_priv)
* \brief Creation and initialization of a SIS decoder. It is attached to p_dvbpsi. * \brief Creation and initialization of a SIS decoder. It is attached to p_dvbpsi.
* \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure * \param p_dvbpsi pointer to dvbpsi to hold decoder/demuxer structure
* \param i_table_id Table ID, 0xFC. * \param i_table_id Table ID, 0xFC.
* \param i_extension Table ID extension. * \param i_extension Table ID extension.
* \param pf_callback function to call back on new SIS. * \param pf_callback function to call back on new SIS.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_sis_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_sis_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_sis_callback pf_callback, void* p_cb_data); dvbpsi_sis_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_sis_detach * dvbpsi_sis_detach
......
...@@ -37,7 +37,6 @@ typedef struct dvbpsi_sis_decoder_s ...@@ -37,7 +37,6 @@ typedef struct dvbpsi_sis_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_sis_callback pf_sis_callback; dvbpsi_sis_callback pf_sis_callback;
void * p_cb_data;
/* */ /* */
dvbpsi_sis_t current_sis; dvbpsi_sis_t current_sis;
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Initialize a TDT/TOT subtable decoder. * Initialize a TDT/TOT subtable decoder.
*****************************************************************************/ *****************************************************************************/
bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_tot_callback pf_callback, void* p_cb_data) dvbpsi_tot_callback pf_callback, void* p_priv)
{ {
assert(p_dvbpsi); assert(p_dvbpsi);
...@@ -79,7 +79,7 @@ bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extens ...@@ -79,7 +79,7 @@ bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extens
/* TDT/TOT decoder information */ /* TDT/TOT decoder information */
p_tot_decoder->pf_tot_callback = pf_callback; p_tot_decoder->pf_tot_callback = pf_callback;
p_tot_decoder->p_cb_data = p_cb_data; p_tot_decoder->p_priv = p_priv;
p_tot_decoder->p_building_tot = NULL; p_tot_decoder->p_building_tot = NULL;
p_tot_decoder->i_table_id = i_table_id; p_tot_decoder->i_table_id = i_table_id;
...@@ -383,7 +383,7 @@ void dvbpsi_tot_sections_gather(dvbpsi_t* p_dvbpsi, ...@@ -383,7 +383,7 @@ void dvbpsi_tot_sections_gather(dvbpsi_t* p_dvbpsi,
dvbpsi_tot_sections_decode(p_dvbpsi, p_tot_decoder->p_building_tot, dvbpsi_tot_sections_decode(p_dvbpsi, p_tot_decoder->p_building_tot,
p_tot_decoder->p_sections); p_tot_decoder->p_sections);
/* signal the new TOT */ /* signal the new TOT */
p_tot_decoder->pf_tot_callback(p_tot_decoder->p_cb_data, p_tot_decoder->pf_tot_callback(p_tot_decoder->p_priv,
p_tot_decoder->p_building_tot); p_tot_decoder->p_building_tot);
/* Delete sections and Reinitialize the structures */ /* Delete sections and Reinitialize the structures */
dvbpsi_ReInitTOT(p_tot_decoder, false); dvbpsi_ReInitTOT(p_tot_decoder, false);
......
...@@ -74,28 +74,28 @@ typedef struct dvbpsi_tot_s ...@@ -74,28 +74,28 @@ typedef struct dvbpsi_tot_s
* dvbpsi_tot_callback * dvbpsi_tot_callback
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \typedef void (* dvbpsi_tot_callback)(void* p_cb_data, * \typedef void (* dvbpsi_tot_callback)(void* p_priv,
dvbpsi_tot_t* p_new_tot) dvbpsi_tot_t* p_new_tot)
* \brief Callback type definition. * \brief Callback type definition.
*/ */
typedef void (* dvbpsi_tot_callback)(void* p_cb_data, dvbpsi_tot_t* p_new_tot); typedef void (* dvbpsi_tot_callback)(void* p_priv, dvbpsi_tot_t* p_new_tot);
/***************************************************************************** /*****************************************************************************
* dvbpsi_tot_attach * dvbpsi_tot_attach
*****************************************************************************/ *****************************************************************************/
/*! /*!
* \fn bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, * \fn bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_tot_callback pf_callback, void* p_cb_data) dvbpsi_tot_callback pf_callback, void* p_priv)
* \brief Creation and initialization of a TDT/TOT decoder. * \brief Creation and initialization of a TDT/TOT decoder.
* \param p_dvbpsi dvbpsi handle pointing to Subtable demultiplexor to which the decoder is attached. * \param p_dvbpsi dvbpsi handle pointing to Subtable demultiplexor to which the decoder is attached.
* \param i_table_id Table ID, usually 0x70 * \param i_table_id Table ID, usually 0x70
* \param i_extension Table ID extension, unused in the TDT/TOT * \param i_extension Table ID extension, unused in the TDT/TOT
* \param pf_callback function to call back on new TDT/TOT. * \param pf_callback function to call back on new TDT/TOT.
* \param p_cb_data private data given in argument to the callback. * \param p_priv private data given in argument to the callback.
* \return true on success, false on failure * \return true on success, false on failure
*/ */
bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension, bool dvbpsi_tot_attach(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
dvbpsi_tot_callback pf_callback, void* p_cb_data); dvbpsi_tot_callback pf_callback, void* p_priv);
/***************************************************************************** /*****************************************************************************
* dvbpsi_tot_detach * dvbpsi_tot_detach
......
...@@ -40,7 +40,6 @@ typedef struct dvbpsi_tot_decoder_s ...@@ -40,7 +40,6 @@ typedef struct dvbpsi_tot_decoder_s
DVBPSI_DECODER_COMMON DVBPSI_DECODER_COMMON
dvbpsi_tot_callback pf_tot_callback; dvbpsi_tot_callback pf_tot_callback;
void * p_cb_data;
/* */ /* */
dvbpsi_tot_t current_tot; dvbpsi_tot_t current_tot;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment