fold
Description:
Folds func over the elements of iter.
That is to say, func will be called as func (object, ret, user_data) for each object in
this. The normal use of this procedure is to accumulate the results of operating on the objects in ret
.
This procedure can be used (and is used internally) to implement the @foreach and find_custom operations.
The fold will proceed as long as func returns true. When the iterator has no more arguments,
gst_iterator_done will be returned. If func returns false, the
fold will stop, and gst_iterator_ok will be returned. Errors or resyncs will cause fold to return
gst_iterator_error or gst_iterator_resync as appropriate.
The iterator will not be freed.
Parameters:
| this |
The Iterator to fold over |
| func |
the fold function |
| ret |
the seed value passed to the fold function |
| user_data |
user data passed to the fold function |
Returns:
|
A IteratorResult, as described above. MT safe. |