2000-08-22 21:18:18 +00:00
|
|
|
<chapter id="cha-programs">
|
|
|
|
<title>Programs</title>
|
|
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
2000-09-09 16:36:10 +00:00
|
|
|
<sect1>
|
|
|
|
<title><command>gstreamer-config</command></title>
|
|
|
|
<para>
|
|
|
|
<command>gstreamer-config</command> is a script to get information about the installed
|
|
|
|
version of <application>GStreamer</application>.
|
|
|
|
This program "knows" what compiler switches are needed to compile programs that use
|
|
|
|
<application>GStreamer</application>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<command>gstreamer-config</command> accepts the following options:
|
|
|
|
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<option>--version</option> Print the currently installed version of
|
|
|
|
<application>GStreamer</application> on the standard output.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<option>--libs</option> Print the linker flags that are necessary to link a
|
|
|
|
<application>GStreamer</application> program.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<option>--cflags</option> Print the compiler flags that are necessary to compile a
|
|
|
|
<application>GStreamer</application> program.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<option>--prefix=<replaceable>PREFIX</replaceable></option>
|
|
|
|
If specified, use <replaceable>PREFIX</replaceable> instead of the installation
|
|
|
|
prefix that <application>GStreamer</application> was built with when computing the
|
|
|
|
output for the <option>--cflags</option> and <option>--libs</option> options.
|
|
|
|
This option is also used for the exec prefix if
|
|
|
|
<option>--exec-prefix</option> was not specified. This option must be specified before any
|
|
|
|
<option>--libs</option> or <option>--cflags</option> options.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<option>--exec-prefix=<replaceable>PREFIX</replaceable></option>
|
|
|
|
If specified, use <replaceable>PREFIX</replaceable> instead of the installation exec
|
|
|
|
prefix that <application>GStreamer</application> was built with when computing the
|
|
|
|
output for the <option>--cflags</option> and <option>--libs</option> options. This option must be
|
|
|
|
specified before any <option>--libs</option> or <option>--cflags</option>
|
|
|
|
options.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
A simple <filename>Makefile</filename> will contain something like:
|
|
|
|
<programlisting>
|
|
|
|
CC = gcc
|
|
|
|
|
|
|
|
helloworld2: helloworld2.c
|
|
|
|
$(CC) -Wall `gstreamer-config --cflags --libs` helloworld2.c -o helloworld2
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o helloworld2
|
|
|
|
</programlisting>
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1>
|
|
|
|
<title><command>gstreamer-register</command></title>
|
|
|
|
<para>
|
|
|
|
<command>gstreamer-register</command> is used to rebuild the database of plugins.
|
|
|
|
It is used after a new plugin has been added to the system. The plugin database
|
|
|
|
can be found in <filename>/etc/gstreamer/reg.xml</filename>.
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1>
|
|
|
|
<title><command>gstreamer-launch</command></title>
|
|
|
|
<para>
|
|
|
|
This is a tool that will construct pipelines based on a command-line
|
|
|
|
syntax.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
A simple commandline looks like:
|
|
|
|
|
|
|
|
<screen>
|
|
|
|
gstreamer-launch disksrc hello.mp3 ! mp3parse ! mpg123 ! audiosink-oss
|
|
|
|
</screen>
|
|
|
|
|
|
|
|
A more complex pipeline looks like:
|
|
|
|
|
|
|
|
<screen>
|
|
|
|
gstreamer-launch disksrc redpill.vob ! css-descramble ! private_stream_1.0 ! \
|
|
|
|
(ac3parse ! ac3dec ! audiosink) video_0 ! (mpeg2dec ! videosink)
|
|
|
|
</screen>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
2000-08-22 21:18:18 +00:00
|
|
|
</chapter>
|