Iterator.fold

Folds func over the elements of iter. That is to say, proc will be called as proc (object, ret, user_data) for each object in iter. 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

func GstIteratorFoldFunction

the fold function

ret GValue*

the seed value passed to the fold function

userData void*

user data passed to the fold function

Return Value

A GstIteratorResult, as described above. MT safe.

Meta