From: Tim-Philipp Müller Date: Sat, 28 Apr 2018 23:18:58 +0000 (+0100) Subject: pbutils, rtsp: fix deprecation guards X-Git-Tag: 1.19.3~511^2~1537 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f548546d414894007a06baffeb551a0d6874e32a;p=platform%2Fupstream%2Fgstreamer.git pbutils, rtsp: fix deprecation guards Function body must only be removed if compiling with GST_REMOVE_DEPRECATED. Function declaration must not be skipped if GST_DISABLE_DEPRECATED is defined, since it contains our export decorator and we wouldn't export the symbol as public API any more then since we compile with GST_DISABLE_DEPRECATED. --- diff --git a/gst-libs/gst/pbutils/gstdiscoverer-types.c b/gst-libs/gst/pbutils/gstdiscoverer-types.c index 95d0c18..0f0d0b9 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer-types.c +++ b/gst-libs/gst/pbutils/gstdiscoverer-types.c @@ -689,7 +689,7 @@ gst_discoverer_stream_info_get_stream_id (GstDiscovererStreamInfo * info) return info->stream_id; } -#ifndef GST_DISABLE_DEPRECATED +#ifndef GST_REMOVE_DEPRECATED /** * gst_discoverer_stream_info_get_misc: * @info: a #GstDiscovererStreamInfo @@ -1041,7 +1041,7 @@ DISCOVERER_INFO_ACCESSOR_CODE (seekable, gboolean, FALSE); DISCOVERER_INFO_ACCESSOR_CODE (live, gboolean, FALSE); -#ifndef GST_DISABLE_DEPRECATED +#ifndef GST_REMOVE_DEPRECATED /** * gst_discoverer_info_get_misc: * @info: a #GstDiscovererInfo diff --git a/gst-libs/gst/pbutils/gstdiscoverer.h b/gst-libs/gst/pbutils/gstdiscoverer.h index ef5ea2f..dcffefa 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.h +++ b/gst-libs/gst/pbutils/gstdiscoverer.h @@ -78,10 +78,9 @@ const GstToc* gst_discoverer_stream_info_get_toc(GstDiscovererStreamI GST_PBUTILS_API const gchar* gst_discoverer_stream_info_get_stream_id(GstDiscovererStreamInfo* info); -#ifndef GST_DISABLE_DEPRECATED -GST_PBUTILS_API +GST_PBUTILS_DEPRECATED_FOR(gst_discoverer_info_get_missing_elements_installer_details) const GstStructure* gst_discoverer_stream_info_get_misc(GstDiscovererStreamInfo* info); -#endif + GST_PBUTILS_API const gchar * gst_discoverer_stream_info_get_stream_type_nick(GstDiscovererStreamInfo* info); @@ -304,10 +303,8 @@ gboolean gst_discoverer_info_get_seekable(const GstDiscovererIn GST_PBUTILS_API gboolean gst_discoverer_info_get_live(const GstDiscovererInfo* info); -#ifndef GST_DISABLE_DEPRECATED -GST_PBUTILS_API +GST_PBUTILS_DEPRECATED_FOR(gst_discoverer_info_get_missing_elements_installer_details) const GstStructure* gst_discoverer_info_get_misc(const GstDiscovererInfo* info); -#endif GST_PBUTILS_API const GstTagList* gst_discoverer_info_get_tags(const GstDiscovererInfo* info); diff --git a/gst-libs/gst/pbutils/pbutils-prelude.h b/gst-libs/gst/pbutils/pbutils-prelude.h index cb1c79d..691be2c 100644 --- a/gst-libs/gst/pbutils/pbutils-prelude.h +++ b/gst-libs/gst/pbutils/pbutils-prelude.h @@ -28,4 +28,12 @@ #define GST_PBUTILS_API GST_EXPORT #endif +#ifndef GST_DISABLE_DEPRECATED +#define GST_PBUTILS_DEPRECATED GST_PBUTILS_API +#define GST_PBUTILS_DEPRECATED_FOR(f) GST_PBUTILS_API +#else +#define GST_PBUTILS_DEPRECATED G_DEPRECATED GST_PBUTILS_API +#define GST_PBUTILS_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) GST_PBUTILS_API +#endif + #endif /* __GST_PBUTILS_PRELUDE_H__ */ diff --git a/gst-libs/gst/rtsp/gstrtsptransport.c b/gst-libs/gst/rtsp/gstrtsptransport.c index 6de88a2..1336447 100644 --- a/gst-libs/gst/rtsp/gstrtsptransport.c +++ b/gst-libs/gst/rtsp/gstrtsptransport.c @@ -198,7 +198,7 @@ gst_rtsp_transport_init (GstRTSPTransport * transport) return GST_RTSP_OK; } -#ifndef GST_DISABLE_DEPRECATED +#ifndef GST_REMOVE_DEPRECATED /** * gst_rtsp_transport_get_mime: * @trans: a #GstRTSPTransMode diff --git a/gst-libs/gst/rtsp/gstrtsptransport.h b/gst-libs/gst/rtsp/gstrtsptransport.h index 902d9dc..909edec 100644 --- a/gst-libs/gst/rtsp/gstrtsptransport.h +++ b/gst-libs/gst/rtsp/gstrtsptransport.h @@ -183,10 +183,8 @@ GstRTSPResult gst_rtsp_transport_parse (const gchar *str, GstRTSPTra GST_RTSP_API gchar* gst_rtsp_transport_as_text (GstRTSPTransport *transport); -#ifndef GST_DISABLE_DEPRECATED -GST_RTSP_API +GST_RTSP_DEPRECATED_FOR(gst_rtsp_transport_get_media_type) GstRTSPResult gst_rtsp_transport_get_mime (GstRTSPTransMode trans, const gchar **mime); -#endif GST_RTSP_API GstRTSPResult gst_rtsp_transport_get_manager (GstRTSPTransMode trans, const gchar **manager, guint option); diff --git a/gst-libs/gst/rtsp/rtsp-prelude.h b/gst-libs/gst/rtsp/rtsp-prelude.h index 03c028d..34f2113 100644 --- a/gst-libs/gst/rtsp/rtsp-prelude.h +++ b/gst-libs/gst/rtsp/rtsp-prelude.h @@ -28,4 +28,12 @@ #define GST_RTSP_API GST_EXPORT #endif +#ifndef GST_DISABLE_DEPRECATED +#define GST_RTSP_DEPRECATED GST_RTSP_API +#define GST_RTSP_DEPRECATED_FOR(f) GST_RTSP_API +#else +#define GST_RTSP_DEPRECATED G_DEPRECATED GST_RTSP_API +#define GST_RTSP_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) GST_RTSP_API +#endif + #endif /* __GST_RTSP_PRELUDE_H__ */