1GStreamer(3)          User Contributed Perl Documentation         GStreamer(3)
2
3
4

NAME

6       GStreamer - Perl interface to the GStreamer library
7

SYNOPSIS

9         use GStreamer -init;
10
11         my $loop = Glib::MainLoop -> new();
12
13         # set up
14         my $play = GStreamer::ElementFactory -> make("playbin", "play");
15         $play -> set(uri => Glib::filename_to_uri $file, "localhost");
16         $play -> get_bus() -> add_watch(\&my_bus_callback, $loop);
17         $play -> set_state("playing");
18
19         # run
20         $loop -> run();
21
22         # clean up
23         $play -> set_state("null");
24
25         sub my_bus_callback {
26           my ($bus, $message, $loop) = @_;
27
28           if ($message -> type & "error") {
29             warn $message -> error;
30             $loop -> quit();
31           }
32
33           elsif ($message -> type & "eos") {
34             $loop -> quit();
35           }
36
37           # remove message from the queue
38           return TRUE;
39         }
40

ABSTRACT

42       GStreamer makes everybody dance like crazy.  It provides the means to
43       play, stream, and convert nearly any type of media -- be it audio or
44       video.  GStreamer wraps the GStreamer library in a nice and Perlish
45       way, freeing the programmer from any memory management and object
46       casting hassles.
47

INITIALIZATION

49       GStreamer->init
50           Initializes GStreamer.  Automatically parses @ARGV, stripping any
51           options known to GStreamer.
52
53       boolean = GStreamer->init_check
54           Checks if initialization is possible.  Returns TRUE if so.
55
56       When importing GStreamer, you can pass the "-init" option to have
57       GStreamer->init automatically called for you.  If you need to know if
58       initialization is possible without actually doing it, use
59       GStreamer->init_check.
60

VERSION CHECKING

62       boolean = GStreamer->CHECK_VERSION (major, minor, micro)
63           ·   major (integer)
64
65           ·   minor (integer)
66
67           ·   micro (integer)
68
69           Returns TRUE if the GStreamer library version GStreamer was
70           compiled against is newer than the one specified by the three
71           arguments.
72
73       (major, minor, micro) = GStreamer->GET_VERSION_INFO
74           Returns the version information of the GStreamer library GStreamer
75           was compiled against.
76
77       (major, minor, micro) = GStreamer->version
78           Returns the version information of the GStreamer library GStreamer
79           is currently running against.
80

SEE ALSO

82       GStreamer::index
83           Lists the automatically generated API documentation pages.
84
85       <http://gstreamer.freedesktop.org/>
86           GStreamer's website has much useful information, including a good
87           tutorial and of course the API reference, which is canonical for
88           GStreamer as well.
89
90       Gtk2::api
91           Just like Gtk2, GStreamer tries to stick closely to the C API,
92           deviating from it only when it makes things easier and/or more
93           Perlish.  Gtk2::api gives general rules for how to map from the C
94           API to Perl, most of which also apply to GStreamer.
95
96       Glib
97           Glib is the foundation this binding is built upon.  If you look for
98           information on basic stuff like signals or object properties, this
99           is what you should read.
100

AUTHORS

102       Torsten Schoenfeld <kaffeetisch at gmx dot de>
103       Brett Kosinski <brettk at frodo.dyn.gno dot org>
104
106       Copyright (C) 2005-2008 by the gtk2-perl team
107
108
109
110perl v5.12.0                      2009-02-22                      GStreamer(3)
Impressum