flowcombiner: add a gst_flow_combiner_update_pad_flow() method

https://bugzilla.gnome.org/show_bug.cgi?id=744572

API: gst_flow_combiner_update_pad_flow()
This commit is contained in:
Mark Nauwelaerts 2015-02-21 20:13:04 +01:00
parent 8ec7272d99
commit b9411dab75
2 changed files with 31 additions and 0 deletions

View file

@ -252,6 +252,34 @@ gst_flow_combiner_update_flow (GstFlowCombiner * combiner, GstFlowReturn fret)
return ret;
}
/**
* gst_flow_combiner_update_pad_flow:
* @combiner: the #GstFlowCombiner
* @pad: the #GstPad whose #GstFlowReturn to update
* @fret: the latest #GstFlowReturn received for a pad in this #GstFlowCombiner
*
* Sets the provided pad's last flow return to provided value and computes
* the combined flow return for the pads in it.
*
* The #GstFlowReturn parameter should be the last flow return update for a pad
* in this #GstFlowCombiner. It will use this value to be able to shortcut some
* combinations and avoid looking over all pads again. e.g. The last combined
* return is the same as the latest obtained #GstFlowReturn.
*
* Returns: The combined #GstFlowReturn
* Since: 1.6
*/
GstFlowReturn
gst_flow_combiner_update_pad_flow (GstFlowCombiner * combiner, GstPad * pad,
GstFlowReturn fret)
{
g_return_val_if_fail (pad != NULL, GST_FLOW_ERROR);
GST_PAD_LAST_FLOW_RETURN (pad) = fret;
return gst_flow_combiner_update_flow (combiner, fret);
}
/**
* gst_flow_combiner_add_pad:
* @combiner: the #GstFlowCombiner

View file

@ -47,6 +47,9 @@ void gst_flow_combiner_free (GstFlowCombiner * combiner);
GstFlowReturn gst_flow_combiner_update_flow (GstFlowCombiner * combiner, GstFlowReturn fret);
GstFlowReturn gst_flow_combiner_update_pad_flow (GstFlowCombiner * combiner, GstPad * pad,
GstFlowReturn fret);
void gst_flow_combiner_add_pad (GstFlowCombiner * combiner, GstPad * pad);
void gst_flow_combiner_remove_pad (GstFlowCombiner * combiner, GstPad * pad);