Iterator
Object Hierarchy:
Description:
[
Compact ]
public class Iterator<
T>
A GstIterator is used to retrieve multiple objects from another object in a threadsafe way.
Various GStreamer objects provide access to their internal structures using an iterator.
In general, whenever calling a GstIterator function results in your code receiving a refcounted object, the refcount for that object will have
been increased. Your code is responsible for unrefing that object after use.
The basic use pattern of an iterator is as follows:
Using an iterator:
it = _get_iterator(object);
done = FALSE;
while (!done) {
switch (gst_iterator_next (it, &item)) {
case GST_ITERATOR_OK:
... use/change item here...
gst_object_unref (item);
break;
case GST_ITERATOR_RESYNC:
...rollback changes to items...
gst_iterator_resync (it);
break;
case GST_ITERATOR_ERROR:
...wrong parameters were given...
done = TRUE;
break;
case GST_ITERATOR_DONE:
done = TRUE;
break;
}
}
gst_iterator_free (it);
Last reviewed on 2009-06-16 (0.10.24)
Content:
Creation methods:
- public Iterator (uint size, Type type, Mutex @lock, ref uint32 master_cookie, IteratorNextFunction<T> next, IteratorItemFunction<T> item, IteratorResyncFunction resync, IteratorFreeFunction free)
- public Iterator.list (Type type, Mutex @lock, ref uint32 master_cookie, List<T> list, void* owner, IteratorItemFunction<T> item, IteratorDisposeFunction free)
- public Iterator.single (Type type, T object, CopyFunction copy, FreeFunc free)
Methods:
Fields: