diff options
author | Stefan Kost <ensonic@users.sf.net> | 2011-05-02 15:36:14 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2011-05-18 09:55:57 +0300 |
commit | 9ff4ec3104d2510b8f379ff38c671682ff795e33 (patch) | |
tree | 41c025fffb1d1c720aeee904f4c65c0bfa280952 /gst | |
parent | da21881f281d0570035d44569e1bdef9e9cf54e3 (diff) |
docs: add deprecation guards
Move GstPadIntLinkFunction to private header to avoid a dozen #ifdefs. Use a
gpointer in public header instead.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/gst_private.h | 5 | ||||
-rw-r--r-- | gst/gstpad.c | 14 | ||||
-rw-r--r-- | gst/gstpad.h | 13 | ||||
-rw-r--r-- | gst/gstplugin.h | 2 |
4 files changed, 24 insertions, 10 deletions
diff --git a/gst/gst_private.h b/gst/gst_private.h index a8f780c1d..6bd67250f 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -241,5 +241,10 @@ extern GstDebugCategory *_priv_GST_CAT_POLL; #endif +#ifdef GST_DISABLE_DEPRECATED +typedef GList* (*GstPadIntLinkFunction) (GstPad *pad); +#endif + + G_END_DECLS #endif /* __GST_PRIVATE_H__ */ diff --git a/gst/gstpad.c b/gst/gstpad.c index 668509497..fdb0e455b 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1132,7 +1132,7 @@ had_right_state: * take an indeterminate amount of time. * You can pass NULL as the callback to make this call block. Be careful with * this blocking call as it might not return for reasons stated above. - * + * * <note> * Pad block handlers are only called for source pads in push mode * and sink pads in pull mode. @@ -2022,7 +2022,7 @@ no_format: * @sinkpad: the sink #GstPad. * * Checks if the source pad and the sink pad are compatible so they can be - * linked. + * linked. * * Returns: TRUE if the pads can be linked. */ @@ -3287,7 +3287,7 @@ gst_pad_iterate_internal_links_default (GstPad * pad) * two concurrent iterators were used and the last iterator would still be * thread-unsafe. Just don't use this method anymore. */ data = g_slice_new (IntLinkIterData); - data->list = GST_PAD_INTLINKFUNC (pad) (pad); + data->list = ((GstPadIntLinkFunction) GST_PAD_INTLINKFUNC (pad)) (pad); data->cookie = 0; GST_WARNING_OBJECT (pad, "Making unsafe iterator"); @@ -3398,7 +3398,7 @@ add_unref_pad_to_list (GstPad * pad, GList ** list) * Deprecated: This function does not ref the pads in the list so that they * could become invalid by the time the application accesses them. It's also * possible that the list changes while handling the pads, which the caller of - * this function is unable to know. Use the thread-safe + * this function is unable to know. Use the thread-safe * gst_pad_iterate_internal_links_default() instead. */ #ifndef GST_REMOVE_DEPRECATED @@ -3490,11 +3490,11 @@ no_parent: * * Returns: (transfer full) (element-type Gst.Pad): a newly allocated #GList * of pads, free with g_list_free(). - * + * * Deprecated: This function does not ref the pads in the list so that they * could become invalid by the time the application accesses them. It's also * possible that the list changes while handling the pads, which the caller of - * this function is unable to know. Use the thread-safe + * this function is unable to know. Use the thread-safe * gst_pad_iterate_internal_links() instead. */ #ifndef GST_REMOVE_DEPRECATED @@ -3511,7 +3511,7 @@ gst_pad_get_internal_links (GstPad * pad) GST_WARNING_OBJECT (pad, "Calling unsafe internal links"); if (GST_PAD_INTLINKFUNC (pad)) - res = GST_PAD_INTLINKFUNC (pad) (pad); + res = ((GstPadIntLinkFunction) GST_PAD_INTLINKFUNC (pad)) (pad); return res; } diff --git a/gst/gstpad.h b/gst/gstpad.h index 10cb206bb..f2711aaf0 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -192,7 +192,7 @@ GQuark gst_flow_to_quark (GstFlowReturn ret); * @GST_PAD_LINK_CHECK_NOTHING: Don't check hierarchy or caps compatibility. * @GST_PAD_LINK_CHECK_HIERARCHY: Check the pads have same parents/grandparents. * Could be omitted if it is already known that the two elements that own the - * pads are in the same bin. + * pads are in the same bin. * @GST_PAD_LINK_CHECK_TEMPLATE_CAPS: Check if the pads are compatible by using * their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but * would be unsafe e.g. if one pad has %GST_CAPS_ANY. @@ -223,7 +223,7 @@ typedef enum { /** * GST_PAD_LINK_CHECK_DEFAULT: * - * The default checks done when linking pads (i.e. the ones used by + * The default checks done when linking pads (i.e. the ones used by * gst_pad_link()). * * Since: 0.10.30 @@ -405,7 +405,10 @@ typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad); * * Deprecated: use the threadsafe #GstPadIterIntLinkFunction instead. */ +#ifndef GST_DISABLE_DEPRECATED typedef GList* (*GstPadIntLinkFunction) (GstPad *pad); +#endif + /** * GstPadIterIntLinkFunction: @@ -708,7 +711,11 @@ struct _GstPad { GstPadQueryFunction queryfunc; /* internal links */ - GstPadIntLinkFunction intlinkfunc; +#ifndef GST_DISABLE_DEPRECATED + GstPadIntLinkFunction _intlinkfunc; +#else + gpointer intlinkfunc; +#endif GstPadBufferAllocFunction bufferallocfunc; diff --git a/gst/gstplugin.h b/gst/gstplugin.h index c4f9c4479..3964cd260 100644 --- a/gst/gstplugin.h +++ b/gst/gstplugin.h @@ -298,6 +298,7 @@ G_END_DECLS /* We don't have deprecation guards here on purpose, it's enough to have * deprecation guards around _gst_plugin_register_static(), and will result in * much better error messages when compiling with -DGST_DISABLE_DEPRECATED */ +#ifndef GST_DISABLE_DEPRECATED #define GST_PLUGIN_DEFINE_STATIC(major,minor,name,description,init,version,license,package,origin) \ static void GST_GNUC_CONSTRUCTOR \ _gst_plugin_static_init__ ##init (void) \ @@ -318,6 +319,7 @@ _gst_plugin_static_init__ ##init (void) \ }; \ _gst_plugin_register_static (&plugin_desc_); \ } +#endif /** * GST_LICENSE_UNKNOWN: |