From 884467d493b3df68135b550b3fad0d565a8d9b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 18 Aug 2009 14:05:40 +0200 Subject: [PATCH] gstpad: Add some DISABLE_DEPRECATED markers in the header too The internal links function is deprecated since some time and there already were GST_REMOVE_DEPRECATED markers in the source file, now add them to the header too. Fixes bug #592209. --- gst/gstpad.c | 11 +++++++++++ gst/gstpad.h | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/gst/gstpad.c b/gst/gstpad.c index af65724d08..f978a6786b 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -122,6 +122,15 @@ static gboolean gst_pad_acceptcaps_default (GstPad * pad, GstCaps * caps); static xmlNodePtr gst_pad_save_thyself (GstObject * object, xmlNodePtr parent); #endif +/* Some deprecated stuff that we need inside here for + * backwards compatibility */ +#ifdef GST_DISABLE_DEPRECATED +#ifndef GST_REMOVE_DEPRECATED +#define GST_PAD_INTLINKFUNC(pad) (GST_PAD_CAST(pad)->intlinkfunc) +GList *gst_pad_get_internal_links_default (GstPad * pad); +#endif +#endif + static GstObjectClass *parent_class = NULL; static guint gst_pad_signals[LAST_SIGNAL] = { 0 }; @@ -341,8 +350,10 @@ gst_pad_init (GstPad * pad) GST_PAD_QUERYTYPEFUNC (pad) = GST_DEBUG_FUNCPTR (gst_pad_get_query_types_default); GST_PAD_QUERYFUNC (pad) = GST_DEBUG_FUNCPTR (gst_pad_query_default); +#ifndef GST_REMOVE_DEPRECATED GST_PAD_INTLINKFUNC (pad) = GST_DEBUG_FUNCPTR (gst_pad_get_internal_links_default); +#endif GST_PAD_ITERINTLINKFUNC (pad) = GST_DEBUG_FUNCPTR (gst_pad_iterate_internal_links_default); diff --git a/gst/gstpad.h b/gst/gstpad.h index fa53012473..e79adb2216 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -698,7 +698,9 @@ struct _GstPadClass { #define GST_PAD_EVENTFUNC(pad) (GST_PAD_CAST(pad)->eventfunc) #define GST_PAD_QUERYTYPEFUNC(pad) (GST_PAD_CAST(pad)->querytypefunc) #define GST_PAD_QUERYFUNC(pad) (GST_PAD_CAST(pad)->queryfunc) +#ifndef GST_DISABLE_DEPRECATED #define GST_PAD_INTLINKFUNC(pad) (GST_PAD_CAST(pad)->intlinkfunc) +#endif #define GST_PAD_ITERINTLINKFUNC(pad) (GST_PAD_CAST(pad)->iterintlinkfunc) #define GST_PAD_PEER(pad) (GST_PAD_CAST(pad)->peer) @@ -923,9 +925,11 @@ gboolean gst_pad_pause_task (GstPad *pad); gboolean gst_pad_stop_task (GstPad *pad); /* internal links */ +#ifndef GST_DISABLE_DEPRECATED void gst_pad_set_internal_link_function (GstPad *pad, GstPadIntLinkFunction intlink); GList* gst_pad_get_internal_links (GstPad *pad); GList* gst_pad_get_internal_links_default (GstPad *pad); +#endif void gst_pad_set_iterate_internal_links_function (GstPad * pad, GstPadIterIntLinkFunction iterintlink);