Commit e67b4b3c authored by Jean-Paul Saman's avatar Jean-Paul Saman

Give a warning when using deprecated macros from libdvbpsi version 0.2.2 and earlier.

The API in version 1.0.0 has changed and the macros dvbpsi_New*/dvbpsi_Delete* have been
deprecated (and removed).
parent eab4dbda
......@@ -375,6 +375,11 @@ __attribute__((deprecated))
void dvbpsi_PushPacket(dvbpsi_handle h_dvbpsi, uint8_t* p_data);
#define dvbpsi_PushPacket(h,p) dvbpsi_packet_push(h,p)
/* Macros from libdvbpsi < version 1.0.0 are deprecated.
* NOTE: You probably want to use libdvbpsi-0.2.2 instead.
*/
#define DEPRECATED_MACRO DEPRECATED_MACRO_USE_libdvbpsi_0_2_2
#ifdef __cplusplus
};
#endif
......
......@@ -291,6 +291,16 @@ dvbpsi_descriptor_t *dvbpsi_BATTSAddDescriptor(
uint8_t i_tag, uint8_t i_length,
uint8_t *p_data);
#define dvbpsi_NewBAT(p_bat, i_bouquet_id, i_version, b_current_next) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteBAT(p_bat) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -199,6 +199,15 @@ dvbpsi_descriptor_t* dvbpsi_CATAddDescriptor(dvbpsi_cat_t* p_cat,
__attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenCATSections(dvbpsi_cat_t* p_cat);
#define dvbpsi_NewCAT(p_cat, i_version, b_current_next) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteCAT(p_cat) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
......
......@@ -298,6 +298,16 @@ dvbpsi_eit_event_t* dvbpsi_EITAddEvent(dvbpsi_eit_t* p_eit,
uint16_t i_event_id, uint64_t i_start_time, uint32_t i_duration,
uint8_t i_running_status, int b_free_ca);
#define dvbpsi_NewEIT(p_eit, i_service_id, i_version, b_current_next, i_ts_id, i_network_id, i_segment_last_section_number, i_last_table_id) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteEIT(p_eit) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -289,6 +289,16 @@ __attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenNITSections(dvbpsi_nit_t* p_nit,
uint8_t i_table_id);
#define dvbpsi_NewNIT(p_nit, i_network_id, i_version, b_current_next) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteNIT(p_nit) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -221,6 +221,16 @@ dvbpsi_pat_program_t* dvbpsi_PATAddProgram(dvbpsi_pat_t* p_pat,
__attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenPATSections(dvbpsi_pat_t* p_pat, int i_max_pps);
#define dvbpsi_NewPAT(p_pat, i_ts_id, i_version, b_current_next) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeletePAT(p_pat) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -279,6 +279,16 @@ dvbpsi_descriptor_t* dvbpsi_PMTESAddDescriptor(dvbpsi_pmt_es_t* p_es,
__attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenPMTSections(dvbpsi_pmt_t* p_pmt);
#define dvbpsi_NewPMT(p_pmt, i_program_number, i_version, b_current_next, i_pcr_pid) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeletePMT(p_pmt) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -279,6 +279,16 @@ dvbpsi_descriptor_t *dvbpsi_SDTServiceAddDescriptor(
__attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenSDTSections(dvbpsi_sdt_t * p_sdt);
#define dvbpsi_NewSDT(p_sdt, i_ts_id, i_version, b_current_next, i_network_id) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteSDT(p_sdt) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -483,6 +483,16 @@ dvbpsi_descriptor_t *dvbpsi_SISAddDescriptor( dvbpsi_sis_t *p_sis,
__attribute__((deprecated))
dvbpsi_psi_section_t *dvbpsi_GenSISSections(dvbpsi_sis_t * p_sis);
#define dvbpsi_NewSIS(p_sis, i_protocol_version) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteSIS(p_sis) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
......@@ -215,6 +215,16 @@ dvbpsi_descriptor_t* dvbpsi_TOTAddDescriptor(dvbpsi_tot_t* p_tot,
__attribute__((deprecated))
dvbpsi_psi_section_t* dvbpsi_GenTOTSections(dvbpsi_tot_t* p_tot);
#define dvbpsi_NewTOT(p_tot, i_utc_time) \
do { \
DEPRECATED_MACRO \
} while (0);
#define dvbpsi_DeleteTOT(p_tot) \
do { \
DEPRECATED_MACRO \
} while (0);
#ifdef __cplusplus
};
#endif
......
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