summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mnauw@users.sourceforge.net>2015-02-15 19:52:10 (GMT)
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2015-03-07 19:18:43 (GMT)
commit8ec7272d99e9b7cafcfff178f45e1203d73d38dc (patch)
treec8455b8107afaa78144326f43535884275de9c3f
parentbfaa7d1b9f5aeb17679dc073cbf0dd5f6646c62d (diff)
downloadgstreamer-8ec7272d99e9b7cafcfff178f45e1203d73d38dc.tar.gz
gstreamer-8ec7272d99e9b7cafcfff178f45e1203d73d38dc.tar.xz
flowcombiner: add a gst_flow_combiner_reset() method
https://bugzilla.gnome.org/show_bug.cgi?id=744572 API: gst_flow_combiner_reset()
-rw-r--r--libs/gst/base/gstflowcombiner.c24
-rw-r--r--libs/gst/base/gstflowcombiner.h2
2 files changed, 26 insertions, 0 deletions
diff --git a/libs/gst/base/gstflowcombiner.c b/libs/gst/base/gstflowcombiner.c
index 5d11c6d..435c514 100644
--- a/libs/gst/base/gstflowcombiner.c
+++ b/libs/gst/base/gstflowcombiner.c
@@ -158,6 +158,30 @@ gst_flow_combiner_clear (GstFlowCombiner * combiner)
combiner->last_ret = GST_FLOW_OK;
}
+/**
+ * gst_flow_combiner_reset:
+ * @combiner: the #GstFlowCombiner to clear
+ *
+ * Removes all pads from a #GstFlowCombiner and resets it to its initial state.
+ *
+ * Since: 1.6
+ */
+void
+gst_flow_combiner_reset (GstFlowCombiner * combiner)
+{
+ GList *iter;
+
+ g_return_if_fail (combiner != NULL);
+
+ GST_DEBUG ("Reset flow returns");
+
+ for (iter = combiner->pads.head; iter; iter = iter->next) {
+ GST_PAD_LAST_FLOW_RETURN (iter->data) = GST_FLOW_OK;
+ }
+
+ combiner->last_ret = GST_FLOW_OK;
+}
+
static GstFlowReturn
gst_flow_combiner_get_flow (GstFlowCombiner * combiner)
{
diff --git a/libs/gst/base/gstflowcombiner.h b/libs/gst/base/gstflowcombiner.h
index 692618e..f31d65d 100644
--- a/libs/gst/base/gstflowcombiner.h
+++ b/libs/gst/base/gstflowcombiner.h
@@ -53,6 +53,8 @@ void gst_flow_combiner_remove_pad (GstFlowCombiner * combiner, GstP
void gst_flow_combiner_clear (GstFlowCombiner * combiner);
+void gst_flow_combiner_reset (GstFlowCombiner * combiner);
+
GType gst_flow_combiner_get_type (void);
G_END_DECLS