1GStreamer::Iterator(3)User Contributed Perl DocumentationGStreamer::Iterator(3)
2
3
4
6 GStreamer::Iterator
7
9 foreach ($bin -> iterate_elements()) {
10 do_something($_);
11 }
12
13 my $iter = $bin -> iterate_elements();
14 while ($_ = $iter -> next()) {
15 do_something($_);
16 }
17
19 There are two ways to use a GStreamer::Iterator. The first is to use
20 normal Perl looping stuff:
21
22 foreach ($bin -> iterate_elements()) {
23 do_something($_);
24 }
25
26 This is very elegant and Perl-ish, but may also be a bit slower.
27
28 The alternative is to use the next method:
29
30 my $iter = $bin -> iterate_elements();
31 while ($_ = $iter -> next()) {
32 do_something($_);
33 }
34
35 This is hardly beautiful but avoids looping over the elements
36 unnecessarily and is thus faster.
37
39 scalar = $iter->next
41 GStreamer
42
44 Copyright (C) 2005-2014 by the gtk2-perl team.
45
46 This software is licensed under the LGPL. See GStreamer for a full
47 notice.
48
49
50
51perl v5.30.0 2019-09-19 GStreamer::Iterator(3)