source: trunk/third/gstreamer/docs/manual/appendix-integration.xml @ 21448

Revision 21448, 6.1 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21447, which included commits to RCS files with non-trunk default branches.
Line 
1<chapter id="chapter-intgration">
2  <title>Integration</title>
3  <para>
4    &GStreamer; tries to integrate closely with operating systems (such
5    as Linux and UNIX-like operating systems, OS X or Windows) and desktop
6    environments (such as GNOME or KDE). In this chapter, we'll mention
7    some specific techniques to integrate your application with your
8    operating system or desktop environment of choice.
9  </para>
10 
11  <sect1 id="section-integration-nix">
12    <title>Linux and UNIX-like operating systems</title>
13    <para>
14      &GStreamer; provides a basic set of elements that are useful when
15      integrating with Linux or a UNIX-like operating system.
16    </para>
17    <itemizedlist>
18      <listitem>
19        <para>
20          For audio input and output, &GStreamer; provides input and
21          output elements for several audio subsystems. Amongst others,
22          &GStreamer; includes elements for ALSA (alsasrc, alsamixer,
23          alsasink), OSS (osssrc, ossmixer, osssink) and Sun audio
24          (sunaudiosrc, sunaudiomixer, sunaudiosink).
25        </para>
26      </listitem>
27      <listitem>
28        <para>
29          For video input, &GStreamer; contains source elements for
30          Video4linux (v4lsrc, v4lmjpegsrc, v4lelement and v4lmjpegisnk)
31          and Video4linux2 (v4l2src, v4l2element).
32        </para>
33      </listitem>
34      <listitem>
35        <para>
36          For video output, &GStreamer; provides elements for output
37          to X-windows (ximagesink), Xv-windows (xvimagesink; for
38          hardware-accelerated video), direct-framebuffer (dfbimagesink)
39          and openGL image contexts (glsink).
40        </para>
41      </listitem>
42    </itemizedlist>
43  </sect1>
44
45  <sect1 id="section-integration-gnome">
46    <title>GNOME desktop</title>
47    <para>
48      &GStreamer; has been the media backend of the <ulink type="http"
49      url="http://www.gnome.org/">GNOME</ulink> desktop since GNOME-2.2
50      onwards. Nowadays, a whole bunch of GNOME applications make use of
51      &GStreamer; for media-processing, including (but not limited to)
52      <ulink type="http" url="http://www.rhythmbox.org/">Rhythmbox</ulink>,
53      <ulink type="http" url="http://www.hadess.net/totem.php3">Totem</ulink>
54      and <ulink type="http"
55      url="http://www.burtonini.com/blog/computers/sound-juicer">Sound
56      Juicer</ulink>.
57    </para>
58    <para>
59      Most of these GNOME applications make use of some specific techniques
60      to integrate as closely as possible with the GNOME desktop:
61    </para>
62    <itemizedlist>
63      <listitem>
64        <para>
65          GNOME applications call <function>gnome_program_init ()</function>
66          to parse command-line options and initialize the necessary gnome
67          modules. &GStreamer; applications would normally call
68          <function>gst_init ()</function> to do the same for GStreamer.
69          This would mean that only one of the two can parse command-line
70          options. To work around this issue, &GStreamer; can provide a
71          <classname>poptOption</classname> array which can be passed to
72          <function>gnome_program_init ()</function>.
73        </para>
74        <programlisting><!-- example-begin gnome.c a -->
75#include &lt;gnome.h&gt;
76#include &lt;gst/gst.h&gt;
77
78gint
79main (gint   argc,
80      gchar *argv[])
81{
82  struct poptOption options[] = {
83    {NULL, '\0', POPT_ARG_INCLUDE_TABLE, NULL, 0, "GStreamer", NULL},
84    POPT_TABLEEND
85  };
86
87  /* init GStreamer and GNOME using the GStreamer popt tables */
88  options[0].arg = (void *) gst_init_get_popt_table ();
89  gnome_program_init ("my-application", "0.0.1", LIBGNOMEUI_MODULE, argc, argv,
90                      GNOME_PARAM_POPT_TABLE, options,
91                      NULL);
92<!-- example-end gnome.c a -->
93[..]<!-- example-begin gnome.c b --><!--
94  return 0;
95--><!-- example-end gnome.c b -->
96<!-- example-begin gnome.c c -->
97}
98        <!-- example-end gnome.c c --></programlisting>
99      </listitem>
100      <listitem>
101        <para>
102          GNOME stores the default video and audio sources and sinks in GConf.
103          &GStreamer; provides a small utility library that can be used to
104          get the elements from the registry using functions such as
105          <function>gst_gconf_get_default_video_sink ()</function>. See the
106          header file (<filename>gst/gconf/gconf.h</filename>) for details.
107          All GNOME applications are recommended to use those variables.
108        </para>
109      </listitem>
110      <listitem>
111        <para>
112          &GStreamer; provides data input/output elements for use with the
113          GNOME-VFS system. These elements are called <quote>gnomevfssrc</quote>
114          and <quote>gnomevfssink</quote>.
115        </para>
116      </listitem>
117    </itemizedlist>
118  </sect1>
119
120  <sect1 id="section-integration-kde">
121    <title>KDE desktop</title>
122    <para>
123      &GStreamer; has been proposed for inclusion in KDE-4.0. Currently,
124      &GStreamer; is included as an optional component, and it's used by
125      several KDE applications, including <ulink type="http"
126      url="http://amarok.kde.org/">AmaroK</ulink> and <ulink type="http"
127      url="http://developer.kde.org/~wheeler/juk.html">JuK</ulink>. A
128      backend for <ulink type="http"
129      url="http://www.xs4all.nl/~jjvrieze/kmplayer.html">KMPlayer</ulink>
130      is currently under development.
131    </para>
132    <para>
133      Although not yet as complete as the GNOME integration bits, there
134      are already some KDE integration specifics available. This list will
135      probably grow as &GStreamer; starts to be used in KDE-4.0:
136    </para>
137    <itemizedlist>
138      <listitem>
139        <para>
140          AmaroK contains a kiosrc element, which is a source element that
141          integrates with the KDE VFS subsystem KIO.
142        </para>
143      </listitem>
144    </itemizedlist>
145  </sect1>
146
147  <sect1 id="section-integration-osx">
148    <title>OS X</title>
149    <para>
150      &GStreamer; provides native video and audio output elements for OS X.
151      It builds using the standard development tools for OS X.
152    </para>
153  </sect1>
154
155  <sect1 id="section-integration-win32">
156    <title>Windows</title>
157    <para>
158      &GStreamer; builds using Microsoft Visual C .NET 2003 and using Cygwin.
159    </para>
160  </sect1>
161</chapter>
Note: See TracBrowser for help on using the repository browser.