using GLib;

private static int find_element (void* av, void *bv) {
    Gst.Element a = (Gst.Element)av;
    Gst.Element b = (Gst.Element)bv;
    if (a == b) return 0;
    else return 1;
}

public static void main(string[] args)
{
  Gst.Bin bin = new Gst.Bin("a bin");
  Gst.Iterator iter = bin.iterate_elements ();
  Value sink_value = Value (typeof(Gst.Element));
  if (iter.find_custom (find_element, out sink_value)) {
    stdout.printf("Found element\n");
  }
}
