aggregator: add a convenience macro to get the source pad
authorThiago Santos <thiagoss@osg.samsung.com>
Wed, 6 May 2015 16:07:52 +0000 (13:07 -0300)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:26 +0000 (15:10 +0000)
Easier than casting or acessing the parent everywhere

libs/gst/base/gstaggregator.h

index dce567b..cdfa9c2 100644 (file)
@@ -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 *
  ************************/