Class Iterator

java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.Iterator
All Implemented Interfaces:
Proxy

@Generated("io.github.jwharm.JavaGI") public class Iterator extends ProxyInstance
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.

Note that if calling a GstIterator function results in your code receiving a refcounted object (with, say, g_value_get_object()), the refcount for that object will not be increased. Your code is responsible for taking a reference if it wants to continue using it later.

The basic use pattern of an iterator is as follows:

  GstIterator *it = _get_iterator(object);
   GValue item = G_VALUE_INIT;
   done = FALSE;
   while (!done) {
     switch (gst_iterator_next (it, &item)) {
       case GST_ITERATOR_OK:
         ...get/use/change item here...
         g_value_reset (&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;
     }
   }
   g_value_unset (&item);
   gst_iterator_free (it);