mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
gst: add GST_DEPRECATED_FOR() and also export deprecated symbols
Can't use a #ifndef GST_DISABLE_DEPRECATED guard around deprecated functions any more, as they won't get exported then. Besides, we get a nicer error message from the compiler telling us what function to use instead this way.
This commit is contained in:
parent
92d3246f76
commit
0eecc49c13
5 changed files with 16 additions and 14 deletions
|
@ -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__ */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue