summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/libs/gst-plugins-bad-libs-sections.txt2
-rw-r--r--gst-libs/gst/base/gstaggregator.c22
-rw-r--r--gst-libs/gst/base/gstaggregator.h1
3 files changed, 25 insertions, 0 deletions
diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt
index 2c3928bd7..a523236f5 100644
--- a/docs/libs/gst-plugins-bad-libs-sections.txt
+++ b/docs/libs/gst-plugins-bad-libs-sections.txt
@@ -1323,6 +1323,8 @@ GstAggregatorPad
GstAggregatorPadClass
gst_aggregator_pad_steal_buffer
gst_aggregator_pad_get_buffer
+gst_aggregator_pad_drop_buffer
+gst_aggregator_pad_is_eos
<SUBSECTION Standard>
GST_IS_AGGREGATOR_PAD
GST_IS_AGGREGATOR_PAD_CLASS
diff --git a/gst-libs/gst/base/gstaggregator.c b/gst-libs/gst/base/gstaggregator.c
index b69b7dbe2..77ea80dbf 100644
--- a/gst-libs/gst/base/gstaggregator.c
+++ b/gst-libs/gst/base/gstaggregator.c
@@ -2063,6 +2063,28 @@ gst_aggregator_pad_steal_buffer (GstAggregatorPad * pad)
}
/**
+ * gst_aggregator_pad_drop_buffer:
+ * @pad: the pad where to drop any pending buffer
+ *
+ * Drop the buffer currently queued in @pad.
+ *
+ * Returns: TRUE if there was a buffer queued in @pad, or FALSE if not.
+ */
+gboolean
+gst_aggregator_pad_drop_buffer (GstAggregatorPad * pad)
+{
+ GstBuffer *buf;
+
+ buf = gst_aggregator_pad_steal_buffer (pad);
+
+ if (buf == NULL)
+ return FALSE;
+
+ gst_buffer_unref (buf);
+ return TRUE;
+}
+
+/**
* gst_aggregator_pad_get_buffer:
* @pad: the pad to get buffer from
*
diff --git a/gst-libs/gst/base/gstaggregator.h b/gst-libs/gst/base/gstaggregator.h
index d0f1cdc88..8c4e7cff8 100644
--- a/gst-libs/gst/base/gstaggregator.h
+++ b/gst-libs/gst/base/gstaggregator.h
@@ -104,6 +104,7 @@ GType gst_aggregator_pad_get_type (void);
GstBuffer * gst_aggregator_pad_steal_buffer (GstAggregatorPad * pad);
GstBuffer * gst_aggregator_pad_get_buffer (GstAggregatorPad * pad);
+gboolean gst_aggregator_pad_drop_buffer (GstAggregatorPad * pad);
gboolean gst_aggregator_pad_is_eos (GstAggregatorPad * pad);
/*********************