Commit 9211675d authored by Jean-Paul Saman's avatar Jean-Paul Saman

Demux: rename pf_callback to pf_gather

Renaming pf_callback to pf_gather to reflect its usage. It also
removes a typedef which was only used inside src/demux.c
parent ff9c72ee
...@@ -107,7 +107,6 @@ void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section) ...@@ -107,7 +107,6 @@ void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
dvbpsi_demux_t * p_demux = (dvbpsi_demux_t *)p_dvbpsi->p_private; dvbpsi_demux_t * p_demux = (dvbpsi_demux_t *)p_dvbpsi->p_private;
dvbpsi_demux_subdec_t * p_subdec = dvbpsi_demuxGetSubDec(p_demux, p_section->i_table_id, dvbpsi_demux_subdec_t * p_subdec = dvbpsi_demuxGetSubDec(p_demux, p_section->i_table_id,
p_section->i_extension); p_section->i_extension);
if (p_subdec == NULL) if (p_subdec == NULL)
{ {
/* Tell the application we found a new subtable, so that it may attach a /* Tell the application we found a new subtable, so that it may attach a
...@@ -121,13 +120,9 @@ void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section) ...@@ -121,13 +120,9 @@ void dvbpsi_Demux(dvbpsi_t *p_dvbpsi, dvbpsi_psi_section_t *p_section)
} }
if (p_subdec) if (p_subdec)
{ p_subdec->pf_gather(p_dvbpsi, p_subdec->p_cb_data, p_section);
p_subdec->pf_callback(p_dvbpsi, p_subdec->p_cb_data, p_section);
}
else else
{
dvbpsi_DeletePSISections(p_section); dvbpsi_DeletePSISections(p_section);
}
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -53,21 +53,6 @@ typedef void (*dvbpsi_demux_new_cb_t) (void * p_cb_data, ...@@ -53,21 +53,6 @@ typedef void (*dvbpsi_demux_new_cb_t) (void * p_cb_data,
uint8_t i_table_id, uint8_t i_table_id,
uint16_t i_extension); uint16_t i_extension);
/*****************************************************************************
* dvbpsi_demux_subdec_cb_t
*****************************************************************************/
/*!
* \typedef void (*dvbpsi_demux_subdec_cb_t)
(dvbpsi_t *p_dvbpsi,
void *p_private_decoder,
dvbpsi_psi_section_t *p_section);
* \brief Subtable specific decoder.
*/
typedef void (*dvbpsi_demux_subdec_cb_t)
(dvbpsi_t *p_dvbpsi,
void *p_private_decoder,
dvbpsi_psi_section_t *p_section);
/***************************************************************************** /*****************************************************************************
* dvbpsi_demux_subdec_t * dvbpsi_demux_subdec_t
*****************************************************************************/ *****************************************************************************/
...@@ -86,12 +71,13 @@ struct dvbpsi_demux_s; ...@@ -86,12 +71,13 @@ struct dvbpsi_demux_s;
typedef struct dvbpsi_demux_subdec_s typedef struct dvbpsi_demux_subdec_s
{ {
uint32_t i_id; /*!< subtable id */ uint32_t i_id; /*!< subtable id */
dvbpsi_demux_subdec_cb_t pf_callback; /*!< subdec callback */
void (*pf_gather)(dvbpsi_t *, void *, dvbpsi_psi_section_t *); /*!< gather subdec callback */
void * p_cb_data; /*!< subdec callback data */ void * p_cb_data; /*!< subdec callback data */
struct dvbpsi_demux_subdec_s * p_next; /*!< next subdec */
void (*pf_detach)(dvbpsi_t *, uint8_t, uint16_t); /*!< detach subdec callback */ void (*pf_detach)(dvbpsi_t *, uint8_t, uint16_t); /*!< detach subdec callback */
struct dvbpsi_demux_subdec_s * p_next; /*!< next subdec */
} dvbpsi_demux_subdec_t; } dvbpsi_demux_subdec_t;
/***************************************************************************** /*****************************************************************************
......
...@@ -115,7 +115,7 @@ bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex ...@@ -115,7 +115,7 @@ bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_atsc_GatherEITSections; p_subdec->pf_gather = &dvbpsi_atsc_GatherEITSections;
p_subdec->p_cb_data = p_eit_decoder; p_subdec->p_cb_data = p_eit_decoder;
p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension; p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachEIT; p_subdec->pf_detach = dvbpsi_atsc_DetachEIT;
......
...@@ -122,7 +122,7 @@ bool dvbpsi_atsc_AttachETT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_e ...@@ -122,7 +122,7 @@ bool dvbpsi_atsc_AttachETT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_e
} }
/* PSI decoder configuration */ /* PSI decoder configuration */
p_subdec->pf_callback = &dvbpsi_atsc_GatherETTSections; p_subdec->pf_gather = &dvbpsi_atsc_GatherETTSections;
p_subdec->p_cb_data = p_ett_decoder; p_subdec->p_cb_data = p_ett_decoder;
p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension; p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachETT; p_subdec->pf_detach = dvbpsi_atsc_DetachETT;
......
...@@ -119,7 +119,7 @@ bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex ...@@ -119,7 +119,7 @@ bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_atsc_GatherMGTSections; p_subdec->pf_gather = &dvbpsi_atsc_GatherMGTSections;
p_subdec->p_cb_data = p_mgt_decoder; p_subdec->p_cb_data = p_mgt_decoder;
p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension; p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachMGT; p_subdec->pf_detach = dvbpsi_atsc_DetachMGT;
......
...@@ -98,7 +98,7 @@ bool dvbpsi_atsc_AttachSTT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, ...@@ -98,7 +98,7 @@ bool dvbpsi_atsc_AttachSTT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_atsc_GatherSTTSections; p_subdec->pf_gather = &dvbpsi_atsc_GatherSTTSections;
p_subdec->p_cb_data = p_stt_decoder; p_subdec->p_cb_data = p_stt_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16; p_subdec->i_id = (uint32_t)i_table_id << 16;
p_subdec->pf_detach = dvbpsi_atsc_DetachSTT; p_subdec->pf_detach = dvbpsi_atsc_DetachSTT;
......
...@@ -128,7 +128,7 @@ bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex ...@@ -128,7 +128,7 @@ bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_atsc_GatherVCTSections; p_subdec->pf_gather = &dvbpsi_atsc_GatherVCTSections;
p_subdec->p_cb_data = p_vct_decoder; p_subdec->p_cb_data = p_vct_decoder;
p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension; p_subdec->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachVCT; p_subdec->pf_detach = dvbpsi_atsc_DetachVCT;
......
...@@ -86,7 +86,7 @@ bool dvbpsi_AttachBAT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, ...@@ -86,7 +86,7 @@ bool dvbpsi_AttachBAT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherBATSections; p_subdec->pf_gather = &dvbpsi_GatherBATSections;
p_subdec->p_cb_data = p_bat_decoder; p_subdec->p_cb_data = p_bat_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachBAT; p_subdec->pf_detach = dvbpsi_DetachBAT;
......
...@@ -85,7 +85,7 @@ bool dvbpsi_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi ...@@ -85,7 +85,7 @@ bool dvbpsi_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherEITSections; p_subdec->pf_gather = &dvbpsi_GatherEITSections;
p_subdec->p_cb_data = p_eit_decoder; p_subdec->p_cb_data = p_eit_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachEIT; p_subdec->pf_detach = dvbpsi_DetachEIT;
......
...@@ -87,7 +87,7 @@ bool dvbpsi_AttachNIT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, ...@@ -87,7 +87,7 @@ bool dvbpsi_AttachNIT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherNITSections; p_subdec->pf_gather = &dvbpsi_GatherNITSections;
p_subdec->p_cb_data = p_nit_decoder; p_subdec->p_cb_data = p_nit_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachNIT; p_subdec->pf_detach = dvbpsi_DetachNIT;
......
...@@ -84,7 +84,7 @@ bool dvbpsi_AttachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi ...@@ -84,7 +84,7 @@ bool dvbpsi_AttachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherSDTSections; p_subdec->pf_gather = &dvbpsi_GatherSDTSections;
p_subdec->p_cb_data = p_sdt_decoder; p_subdec->p_cb_data = p_sdt_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = &dvbpsi_DetachSDT; p_subdec->pf_detach = &dvbpsi_DetachSDT;
......
...@@ -86,7 +86,7 @@ bool dvbpsi_AttachSIS(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi ...@@ -86,7 +86,7 @@ bool dvbpsi_AttachSIS(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherSISSections; p_subdec->pf_gather = &dvbpsi_GatherSISSections;
p_subdec->p_cb_data = p_sis_decoder; p_subdec->p_cb_data = p_sis_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachSIS; p_subdec->pf_detach = dvbpsi_DetachSIS;
......
...@@ -87,7 +87,7 @@ bool dvbpsi_AttachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi ...@@ -87,7 +87,7 @@ bool dvbpsi_AttachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
} }
/* subtable decoder configuration */ /* subtable decoder configuration */
p_subdec->pf_callback = &dvbpsi_GatherTOTSections; p_subdec->pf_gather = &dvbpsi_GatherTOTSections;
p_subdec->p_cb_data = p_tot_decoder; p_subdec->p_cb_data = p_tot_decoder;
p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)0; p_subdec->i_id = (uint32_t)i_table_id << 16 | (uint32_t)0;
p_subdec->pf_detach = dvbpsi_DetachTOT; p_subdec->pf_detach = dvbpsi_DetachTOT;
......
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