diff --git a/gst/gstconfig.h.in b/gst/gstconfig.h.in index 1b2ca64ac6..801fa400ad 100644 --- a/gst/gstconfig.h.in +++ b/gst/gstconfig.h.in @@ -154,4 +154,16 @@ # endif #endif +/* These macros are used to mark deprecated functions in GStreamer headers, + * and thus have to be exposed in installed headers. But please + * do *not* use them in other projects. Instead, use G_DEPRECATED + * or define your own wrappers around it. */ +#ifdef GST_DISABLE_DEPRECATED +#define GST_DEPRECATED GST_EXPORT +#define GST_DEPRECATED_FOR(f) GST_EXPORT +#else +#define GST_DEPRECATED G_DEPRECATED GST_EXPORT +#define GST_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) GST_EXPORT +#endif + #endif /* __GST_CONFIG_H__ */ diff --git a/gst/gstobject.c b/gst/gstobject.c index 04daaacea2..32a406d97b 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -835,11 +835,7 @@ gst_object_has_as_ancestor (GstObject * object, GstObject * ancestor) * * MT safe. Grabs and releases @object's locks. */ -/* FIXME 2.0: remove */ #ifndef GST_REMOVE_DEPRECATED -#ifdef GST_DISABLE_DEPRECATED -gboolean gst_object_has_ancestor (GstObject * object, GstObject * ancestor); -#endif gboolean gst_object_has_ancestor (GstObject * object, GstObject * ancestor) { diff --git a/gst/gstobject.h b/gst/gstobject.h index 76a6800334..4021a2686c 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -239,10 +239,8 @@ gboolean gst_object_has_as_parent (GstObject *object, GstObject *parent); GST_EXPORT gboolean gst_object_has_as_ancestor (GstObject *object, GstObject *ancestor); -#ifndef GST_DISABLE_DEPRECATED -GST_EXPORT +GST_DEPRECATED_FOR(gst_object_has_as_ancestor) gboolean gst_object_has_ancestor (GstObject *object, GstObject *ancestor); -#endif GST_EXPORT void gst_object_default_deep_notify (GObject *object, GstObject *orig, diff --git a/gst/gstsegment.c b/gst/gstsegment.c index 8db09df3b1..21d8d9a295 100644 --- a/gst/gstsegment.c +++ b/gst/gstsegment.c @@ -1081,10 +1081,6 @@ gst_segment_position_from_running_time_full (const GstSegment * segment, * Deprecated. Use gst_segment_position_from_running_time() instead. */ #ifndef GST_REMOVE_DEPRECATED -#ifdef GST_DISABLE_DEPRECATED -guint64 gst_segment_to_position (const GstSegment * segment, GstFormat format, - guint64 running_time); -#endif guint64 gst_segment_to_position (const GstSegment * segment, GstFormat format, guint64 running_time) diff --git a/gst/gstsegment.h b/gst/gstsegment.h index fef6108194..aab0a72ce8 100644 --- a/gst/gstsegment.h +++ b/gst/gstsegment.h @@ -245,10 +245,10 @@ guint64 gst_segment_to_running_time (const GstSegment *segment, GstForm GST_EXPORT gint gst_segment_to_running_time_full (const GstSegment *segment, GstFormat format, guint64 position, guint64 * running_time); -#ifndef GST_DISABLE_DEPRECATED -GST_EXPORT + +GST_DEPRECATED_FOR(gst_segment_position_from_running_time) guint64 gst_segment_to_position (const GstSegment *segment, GstFormat format, guint64 running_time); -#endif + GST_EXPORT gint gst_segment_position_from_running_time_full (const GstSegment *segment, GstFormat format, guint64 running_time, guint64 * position);