From 0a495cbea201e3afa7c9b90a8d2e6d12c62fa4ec Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 6 May 2015 13:07:52 -0300 Subject: [PATCH] aggregator: add a convenience macro to get the source pad Easier than casting or acessing the parent everywhere --- gst-libs/gst/base/gstaggregator.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gst-libs/gst/base/gstaggregator.h b/gst-libs/gst/base/gstaggregator.h index dce567b..cdfa9c2 100644 --- a/gst-libs/gst/base/gstaggregator.h +++ b/gst-libs/gst/base/gstaggregator.h @@ -247,6 +247,20 @@ struct _GstAggregatorClass { gpointer _gst_reserved[GST_PADDING_LARGE]; }; +/************************************ + * GstAggregator convenience macros * + ***********************************/ + +/** + * GST_AGGREGATOR_SRC_PAD: + * @agg: a #GstAggregator + * + * Convenience macro to access the source pad of #GstAggregator + * + * Since: 1.6 + */ +#define GST_AGGREGATOR_SRC_PAD(agg) (((GstAggregator *)(agg))->srcpad) + /************************* * GstAggregator methods * ************************/ -- 2.7.4