[libdvbpsi-devel] Demux: rename pf_callback to pf_gather
Jean-Paul Saman
git at videolan.org
Wed May 30 16:43:45 CEST 2012
libdvbpsi | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed May 30 16:41:32 2012 +0200| [9211675decc1b71b7d92e27da61ccf70ab1a6bb2] | committer: 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
> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=9211675decc1b71b7d92e27da61ccf70ab1a6bb2
---
src/demux.c | 7 +------
src/demux.h | 20 +++-----------------
src/tables/atsc_eit.c | 2 +-
src/tables/atsc_ett.c | 2 +-
src/tables/atsc_mgt.c | 2 +-
src/tables/atsc_stt.c | 2 +-
src/tables/atsc_vct.c | 2 +-
src/tables/bat.c | 2 +-
src/tables/eit.c | 2 +-
src/tables/nit.c | 2 +-
src/tables/sdt.c | 2 +-
src/tables/sis.c | 2 +-
src/tables/tot.c | 2 +-
13 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/src/demux.c b/src/demux.c
index 1c97ce9..adfa027 100644
--- a/src/demux.c
+++ b/src/demux.c
@@ -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_subdec_t * p_subdec = dvbpsi_demuxGetSubDec(p_demux, p_section->i_table_id,
p_section->i_extension);
-
if (p_subdec == NULL)
{
/* 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)
}
if (p_subdec)
- {
- p_subdec->pf_callback(p_dvbpsi, p_subdec->p_cb_data, p_section);
- }
+ p_subdec->pf_gather(p_dvbpsi, p_subdec->p_cb_data, p_section);
else
- {
dvbpsi_DeletePSISections(p_section);
- }
}
/*****************************************************************************
diff --git a/src/demux.h b/src/demux.h
index 0068cb7..71afdc9 100644
--- a/src/demux.h
+++ b/src/demux.h
@@ -54,21 +54,6 @@ typedef void (*dvbpsi_demux_new_cb_t) (void * p_cb_data,
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
*****************************************************************************/
/*!
@@ -86,12 +71,13 @@ struct dvbpsi_demux_s;
typedef struct dvbpsi_demux_subdec_s
{
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 */
- struct dvbpsi_demux_subdec_s * p_next; /*!< next subdec */
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;
/*****************************************************************************
diff --git a/src/tables/atsc_eit.c b/src/tables/atsc_eit.c
index fb42339..d18c98b 100644
--- a/src/tables/atsc_eit.c
+++ b/src/tables/atsc_eit.c
@@ -115,7 +115,7 @@ bool dvbpsi_atsc_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
}
/* 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->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachEIT;
diff --git a/src/tables/atsc_ett.c b/src/tables/atsc_ett.c
index fe05b0f..fd231fa 100644
--- a/src/tables/atsc_ett.c
+++ b/src/tables/atsc_ett.c
@@ -122,7 +122,7 @@ bool dvbpsi_atsc_AttachETT(dvbpsi_t * p_dvbpsi, uint8_t i_table_id, uint16_t i_e
}
/* 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->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachETT;
diff --git a/src/tables/atsc_mgt.c b/src/tables/atsc_mgt.c
index f6afb83..7d90b5d 100644
--- a/src/tables/atsc_mgt.c
+++ b/src/tables/atsc_mgt.c
@@ -119,7 +119,7 @@ bool dvbpsi_atsc_AttachMGT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
}
/* 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->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachMGT;
diff --git a/src/tables/atsc_stt.c b/src/tables/atsc_stt.c
index fbe0d15..95562cb 100644
--- a/src/tables/atsc_stt.c
+++ b/src/tables/atsc_stt.c
@@ -98,7 +98,7 @@ bool dvbpsi_atsc_AttachSTT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
}
/* 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->i_id = (uint32_t)i_table_id << 16;
p_subdec->pf_detach = dvbpsi_atsc_DetachSTT;
diff --git a/src/tables/atsc_vct.c b/src/tables/atsc_vct.c
index 525245f..fdb3494 100644
--- a/src/tables/atsc_vct.c
+++ b/src/tables/atsc_vct.c
@@ -128,7 +128,7 @@ bool dvbpsi_atsc_AttachVCT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_ex
}
/* 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->i_id = ((uint32_t)i_table_id << 16) | i_extension;
p_subdec->pf_detach = dvbpsi_atsc_DetachVCT;
diff --git a/src/tables/bat.c b/src/tables/bat.c
index 5deed76..45407ca 100644
--- a/src/tables/bat.c
+++ b/src/tables/bat.c
@@ -86,7 +86,7 @@ bool dvbpsi_AttachBAT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id,
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachBAT;
diff --git a/src/tables/eit.c b/src/tables/eit.c
index bb204aa..2b51061 100644
--- a/src/tables/eit.c
+++ b/src/tables/eit.c
@@ -85,7 +85,7 @@ bool dvbpsi_AttachEIT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachEIT;
diff --git a/src/tables/nit.c b/src/tables/nit.c
index 1992e33..17cec65 100644
--- a/src/tables/nit.c
+++ b/src/tables/nit.c
@@ -87,7 +87,7 @@ bool dvbpsi_AttachNIT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachNIT;
diff --git a/src/tables/sdt.c b/src/tables/sdt.c
index 89ecc40..dfa4118 100644
--- a/src/tables/sdt.c
+++ b/src/tables/sdt.c
@@ -84,7 +84,7 @@ bool dvbpsi_AttachSDT(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = &dvbpsi_DetachSDT;
diff --git a/src/tables/sis.c b/src/tables/sis.c
index e0b90d6..2493163 100644
--- a/src/tables/sis.c
+++ b/src/tables/sis.c
@@ -86,7 +86,7 @@ bool dvbpsi_AttachSIS(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)i_extension;
p_subdec->pf_detach = dvbpsi_DetachSIS;
diff --git a/src/tables/tot.c b/src/tables/tot.c
index bd21cb4..d07ef5b 100644
--- a/src/tables/tot.c
+++ b/src/tables/tot.c
@@ -87,7 +87,7 @@ bool dvbpsi_AttachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id, uint16_t i_extensi
}
/* 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->i_id = (uint32_t)i_table_id << 16 | (uint32_t)0;
p_subdec->pf_detach = dvbpsi_DetachTOT;
More information about the libdvbpsi-devel
mailing list