pbutils, rtsp: fix deprecation guards
authorTim-Philipp Müller <tim@centricular.com>
Sat, 28 Apr 2018 23:18:58 +0000 (00:18 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 12 Aug 2018 23:24:50 +0000 (00:24 +0100)
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.

gst-libs/gst/pbutils/gstdiscoverer-types.c
gst-libs/gst/pbutils/gstdiscoverer.h
gst-libs/gst/pbutils/pbutils-prelude.h
gst-libs/gst/rtsp/gstrtsptransport.c
gst-libs/gst/rtsp/gstrtsptransport.h
gst-libs/gst/rtsp/rtsp-prelude.h

index 95d0c18..0f0d0b9 100644 (file)
@@ -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
index ef5ea2f..dcffefa 100644 (file)
@@ -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); 
index cb1c79d..691be2c 100644 (file)
 #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__ */
index 6de88a2..1336447 100644 (file)
@@ -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
index 902d9dc..909edec 100644 (file)
@@ -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);
index 03c028d..34f2113 100644 (file)
 #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__ */