Small updates to the manual

Original commit message from CVS:
Small updates to the manual
This commit is contained in:
Wim Taymans 2002-03-31 15:28:51 +00:00
parent d7a5d173c8
commit 213703ed1b
16 changed files with 109 additions and 556 deletions

View file

@ -0,0 +1,5 @@
<chapter id="cha-clocks">
<title>Clocks in GStreamer</title>
<para>
</para>
</chapter>

View file

@ -0,0 +1,6 @@
<chapter id="cha-scheduler">
<title>Understanding schedulers</title>
<para>
</para>
</chapter>

View file

@ -1,318 +0,0 @@
<chapter id="cha-advanced">
<title>Threads</title>
<para>
The small application we created in the previous chapter used the
concept of a factory to create the elements. In this chapter we will
show you how to use the factory concepts.
</para>
<sect1>
<title>The problems with the helloworld example</title>
<para>
If we take a look at how the elements were created in the previous
example we used a rather crude mechanism:
</para>
<programlisting>
...
/* now it's time to get the parser */
parse = gst_elementfactory_make("mp3parse","parse");
decoder = gst_elementfactory_make("mpg123","decoder");
...
</programlisting>
<para>
While this mechanism is quite effective it also has one big problems:
The elements are created base on their name. Indeed, we create an
element mpg123 by explicitly stating the mpg123 elements name.
Our little program therefore always uses the mpg123 decoder element
to decode the MP3 audio stream, even if there are 3 other MP3 decoders
in the system. We will see how we can use a more general way to create
an MP3 decoder element.
</para>
<para>
We have to introduce the concept of MIME types added to the source and
sink pads.
</para>
</sect1>
<sect1>
<title>MIME Types</title>
<para>
GStreamer uses MIME types to indentify the different types of data
that can be handled by the elements. They are the high level
mechanisms to make sure that everyone is talking about the right
kind of data.
</para>
<para>
A MIME (Multipurpose Internet Mail Extension) types are a set of
string that donote a certain type of data. examples include:
<itemizedlist>
<listitem>
<para>
audio/raw : raw audio samples
</para>
</listitem>
<listitem>
<para>
audio/mpeg : mpeg audio
</para>
</listitem>
<listitem>
<para>
video/mpeg : mpeg video
</para>
</listitem>
</itemizedlist>
</para>
<para>
An element must associate a MIME type to its source and sink pads
when it is loaded into the system. GStreamer knows about the
different elements and what type of data they expect and emit.
This allows for very dynamic and extensible element creation as we
will see.
</para>
<para>
In our helloworld example the elements we constructed would have the
following MIME types associated with their source and sink pads:
</para>
<para>
We will see how you can create an element based on the MIME types
of its source and sink pads. This way the end-user will have the
ability to choose his/her favorite audio/mpeg decoder without
you even having to care about it.
</para>
<para>
The typing of the source and sink pads also makes it possible to
'autoplug' a pipeline. We will have the ability to say: "construct
me a pipeline that does an audio/mpeg to audio/raw conversion".
</para>
<note>
<para>
The basic GStreamer library does not try to solve all of your
autoplug problems. It leaves the hard decisions to the application
programmer, where they belong.
</para>
</note>
</sect1>
<sect1>
<title>GStreamer types</title>
<para>
GStreamer assigns a unique number to all registered MIME types. It
also maintains a list of all elements that either uses this type
as a source or as a sink. GStreamer also keeps a reference to
a function that can be used to determine if a given buffer is of
the given MIME type.
</para>
<para>
There is also an association between a MIME type and a file
extension.
</para>
<para>
The type information is maintained in a list of
<classname>GstType</classname>. The definition of a
<classname>GstType</classname> is like:
</para>
<programlisting>
typedef gboolean (*GstTypeFindFunc) (GstBuffer *buf,gpointer *priv);
typedef struct _GstType GstType;
struct _GstType {
guint16 id; /* type id (assigned) */
gchar *mime; /* MIME type */
gchar *exts; /* space-delimited list of extensions */
GstTypeFindFunc typefindfunc; /* typefind function */
GList *srcs; /* list of src objects for this type */
GList *sinks; /* list of sink objects for type */
};
</programlisting>
<para>
All operations on <classname>GstType</classname> occur via their
<classname>guint16 id</classname> numbers, with <classname>GstType</classname>
structure private to the GStreamer library.
</para>
<sect2>
<title>MIME type to id conversion</title>
<para>
We can obtain the id for a given MIME type
with the following piece of code:
</para>
<programlisting>
guint16 id;
id = gst_type_find_by_mime("audio/mpeg");
</programlisting>
<para>
This function will return 0 if the type was not known.
</para>
</sect2>
<sect2>
<title>id to <classname>GstType</classname> conversion</title>
<para>
We can obtain the <classname>GstType</classname> for a given id
with the following piece of code:
</para>
<programlisting>
GstType *type;
type = gst_type_find_by_id(id);
</programlisting>
<para>
This function will return NULL if the id was associated with
any known <classname>GstType</classname>
</para>
</sect2>
<sect2>
<title>extension to id conversion</title>
<para>
We can obtain the id for a given file extension
with the following piece of code:
</para>
<programlisting>
guint16 id;
id = gst_type_find_by_ext(".mp3");
</programlisting>
<para>
This function will return 0 if the extension was not known.
</para>
</sect2>
<sect2>
<title>id to <classname>GstElementFactory</classname> conversion</title>
<para>
When we have obtained a given type id using one of the above methods,
we can obtain a list of all the elements that operate on this MIME
type or extension.
</para>
<para>
Obtain a list of all the elements that use this id as source with:
</para>
<programlisting>
GList *list;
list = gst_type_gst_srcs(id);
</programlisting>
<para>
Obtain a list of all the elements that use this id as sink with:
</para>
<programlisting>
GList *list;
list = gst_type_gst_sinks(id);
</programlisting>
<para>
When you have a list of elements, you can simply take the first
element of the list to obtain an appropriate element.
</para>
<note>
<para>
As you can see, there might be a multitude of elements that
are able to operate on audio/raw types. some might include:
<itemizedlist>
<listitem>
<para>
an MP3 audio encoder.
</para>
</listitem>
<listitem>
<para>
an audio sink.
</para>
</listitem>
<listitem>
<para>
an audio resampler.
</para>
</listitem>
<listitem>
<para>
a spectrum filter.
</para>
</listitem>
</itemizedlist>
Depending on the application, you might want to use a different
element. This is why GStreamer leaves that decision up to the
application programmer.
</para>
</note>
</sect2>
<sect2>
<title>id to id path detection</title>
<para>
You can obtain a <classname>GList</classname> of elements that
will transform the source id into the destination id.
</para>
<programlisting>
GList *list;
list = gst_type_gst_sink_to_src(sourceid, sinkid);
</programlisting>
<para>
This piece of code will give you the elements needed to construct
a path from sourceid to sinkid. This function is mainly used in
autoplugging the pipeline.
</para>
</sect2>
</sect1>
<sect1>
<title>creating elements with the factory</title>
<para>
In the previous section we described how you could obtain
an element factory using MIME types. Once the factory has been
obtained, you can create an element using:
</para>
<programlisting>
GstElementFactory *factory;
GstElement *element;
// obtain the factory
factory = ...
element = gst_elementfactory_create(factory, "name");
</programlisting>
<para>
This way, you do not have to create elements by name which
allows the end-user to select the elements he/she prefers for the
given MIME types.
</para>
</sect1>
<sect1>
<title>GStreamer basic types</title>
<para>
GStreamer only has two builtin types:
</para>
<itemizedlist>
<listitem>
<para>
audio/raw : raw audio samples
</para>
</listitem>
<listitem>
<para>
video/raw and image/raw : raw video data
</para>
</listitem>
</itemizedlist>
<para>
All other MIME types are maintained by the plugin elements.
</para>
</sect1>
</chapter>

View file

@ -3,74 +3,6 @@
<para>
</para>
<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>

View file

@ -0,0 +1,3 @@
pre.programlisting {
background: #E8E8FF;
}

View file

@ -22,7 +22,7 @@
int
main (int argc, char *argv[])
{
GstElement *pipeline, *filesrc, *parse, *decoder, *audiosink;
GstElement *pipeline, *filesrc, *decoder, *audiosink;
gst_init(&amp;argc, &amp;argv);
@ -38,23 +38,19 @@ main (int argc, char *argv[])
filesrc = gst_elementfactory_make ("filesrc", "disk_source");
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
/* now it's time to get the decoder */
decoder = gst_elementfactory_make ("mad", "decoder");
/* and an audio sink */
audiosink = gst_elementfactory_make ("osssink", "play_audio");
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (filesrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
@ -69,7 +65,6 @@ main (int argc, char *argv[])
/* we don't need a reference to these objects anymore */
gst_object_unref (GST_OBJECT (audiosink));
gst_object_unref (GST_OBJECT (parse));
gst_object_unref (GST_OBJECT (decoder));
gst_object_unref (GST_OBJECT (filesrc));
gst_object_unref (GST_OBJECT (pipeline));
@ -103,12 +98,12 @@ main (int argc, char *argv[])
</programlisting>
<para>
We are going to create 4 elements and one pipeline. Since all objects are
We are going to create 3 elements and one pipeline. Since all objects are
in fact elements, we can define them as:
</para>
<programlisting>
...
GstElement *pipeline, *filesrc, *parse, *decoder, *audiosink;
GstElement *pipeline, *filesrc, *decoder, *audiosink;
...
</programlisting>
@ -143,16 +138,12 @@ main (int argc, char *argv[])
</note>
<para>
We now create the MP3 decoder element. <application>GStreamer</application> requires you
to put a parser in front of the decoder. This parser will
cut the raw data from the disk source into MP3 frames
suitable for the decoder. In the advanced concepts chapter we will
see how this can be avoided.
We now create the MP3 decoder element. This assumes that the 'mad' plugin
is installed on the system where this application is executed.
</para>
<programlisting>
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
decoder = gst_elementfactory_make ("mad", "decoder");
</programlisting>
<para>
gst_elementfactory_make() takes two arguments: a string that will
@ -177,7 +168,6 @@ main (int argc, char *argv[])
<programlisting>
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
</programlisting>
@ -188,8 +178,6 @@ main (int argc, char *argv[])
<programlisting>
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (filesrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
@ -220,8 +208,8 @@ main (int argc, char *argv[])
</programlisting>
<note>
<para>
<application>GStreamer</application> will take care of the READY and PAUSED state for y
ou when going from NULL to PLAYING.
<application>GStreamer</application> will take care of the READY and PAUSED state for
you when going from NULL to PLAYING.
</para>
</note>
@ -263,16 +251,13 @@ main (int argc, char *argv[])
To compile the helloworld example, use:
</para>
<programlisting>
gcc -Wall `gstreamer-config --cflags --libs` helloworld.c \
gcc -Wall `pkg-config gstreamer --cflags --libs` helloworld.c \
-o helloworld
</programlisting>
<para>
This uses the program gstreamer-config, which comes with <application>GStreamer</application>. This program "knows"
what compiler switches are needed to compile programs that use <application>GStreamer</application>.
gstreamer-config --cflags will output a list of include
directories for the compiler to look in, and gstreamer-config --libs will output the
list of libraries for the compiler to link with and the directories to find them
in.
We use pkg-config to get the compiler flags needed to compile this application.
make sure to have your PKG_CONFIG_PATH environment variable set to the correct
location if you are building this application against the uninstalled location.
</para>
<para>
You can run the example with (substitute helloworld.mp3 with you favorite MP3 file):
@ -301,7 +286,5 @@ main (int argc, char *argv[])
into the pipeline is not that hard to do. The most important thing is
that you can reuse allready existing elements.
</para>
</sect1>
</chapter>

5
docs/manual/clocks.xml Normal file
View file

@ -0,0 +1,5 @@
<chapter id="cha-clocks">
<title>Clocks in GStreamer</title>
<para>
</para>
</chapter>

View file

@ -25,10 +25,13 @@
audiocard. We will use this simple graph to construct an mpeg player later
in this manual.
</para>
<para>
You can connect two pads with:
</para>
<programlisting>
<sect1 id="sec-conn-basic">
<title>Making simple connections</title>
<para>
You can connect two pads with:
</para>
<programlisting>
GstPad *srcpad, *sinkpad;
srcpad = gst_element_get_pad (element1, "src");
@ -40,11 +43,11 @@
// and disconnect them
gst_pad_disconnect (srcpad, sinkpad);
</programlisting>
<para>
A convenient shortcut for the above code is done with the gst_element_connect ()
function:
</para>
</programlisting>
<para>
A convenient shortcut for the above code is done with the gst_element_connect ()
function:
</para>
<programlisting>
// connect them
@ -53,13 +56,22 @@
// and disconnect them
gst_element_disconnect (element1, "src", element2, "sink");
</programlisting>
<para>
You can query if a pad is connected with GST_PAD_IS_CONNECTED (pad).
</para>
<para>
To query for the <classname>GstPad</classname> this srcpad is connected to, use
gst_pad_get_peer (srcpad).
</para>
</programlisting>
<para>
You can query if a pad is connected with GST_PAD_IS_CONNECTED (pad).
</para>
<para>
To query for the <classname>GstPad</classname> this srcpad is connected to, use
gst_pad_get_peer (srcpad).
</para>
</sect1>
<sect1 id="sec-conn-filtered">
<title>Making filtered connections</title>
<para>
You can also force a specific media type on the connection by using gst_pad_connect_filtered ()
and gst_element_connect_filtered ().
</para>
</sect1>
</chapter>

View file

@ -24,6 +24,8 @@
<!ENTITY THREADS SYSTEM "threads.xml">
<!ENTITY QUEUES SYSTEM "queues.xml">
<!ENTITY COTHREADS SYSTEM "cothreads.xml">
<!ENTITY SCHEDULERS SYSTEM "schedulers.xml">
<!ENTITY CLOCKS SYSTEM "clocks.xml">
<!ENTITY DYNAMIC SYSTEM "dynamic.xml">
<!ENTITY TYPEDETECTION SYSTEM "typedetection.xml">
<!ENTITY UTILITY SYSTEM "utility.xml">
@ -171,6 +173,10 @@
&COTHREADS;
&SCHEDULERS;
&CLOCKS;
&DYNAMIC;
&TYPEDETECTION;

View file

@ -14,38 +14,26 @@ Single
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
4050 3750 4575 3750
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
6525 3750 7125 3750
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
4575 2775 6525 2775 6525 4425 4575 4425 4575 2775
2 2 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
4575 3600 5325 3600 5325 4125 4575 4125 4575 3600
2 2 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
5775 3600 6525 3600 6525 4125 5775 4125 5775 3600
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
6525 3750 7125 3750
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
7125 2775 9075 2775 9075 4425 7125 4425 7125 2775
2 2 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
7125 3600 7875 3600 7875 4125 7125 4125 7125 3600
2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
9600 2775 11550 2775 11550 4425 9600 4425 9600 2775
2 2 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
8325 3600 9075 3600 9075 4125 8325 4125 8325 3600
2 2 0 1 0 6 50 0 20 0.000 0 0 -1 0 0 5
9600 3600 10350 3600 10350 4125 9600 4125 9600 3600
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
1 1 1.00 90.00 120.00
9075 3750 9600 3750
2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5
1950 1950 11700 1950 11700 4800 1950 4800 1950 1950
4 0 0 50 0 16 12 0.0000 4 135 255 2175 2250 bin\001
1950 1950 9375 1950 9375 4800 1950 4800 1950 1950
4 0 0 50 0 16 12 0.0000 4 180 660 2175 2250 pipeline\001
4 0 0 50 0 16 12 0.0000 4 105 255 3525 3975 src\001
4 0 0 50 0 16 12 0.0000 4 135 330 4725 3975 sink\001
4 0 0 50 0 16 12 0.0000 4 105 255 6075 3975 src\001
4 0 0 50 0 16 12 0.0000 4 135 330 7350 3975 sink\001
4 0 0 50 0 16 12 0.0000 4 105 255 8625 3975 src\001
4 0 0 50 0 16 12 0.0000 4 135 330 9750 3975 sink\001
4 0 0 50 0 16 12 0.0000 4 165 1005 2250 3075 disk_source\001
4 0 0 50 0 16 12 0.0000 4 150 465 4725 3075 parse\001
4 0 0 50 0 16 12 0.0000 4 135 690 7275 3075 decoder\001
4 0 0 50 0 16 12 0.0000 4 180 930 9750 3075 play_audio\001
4 0 0 50 0 16 12 0.0000 4 135 330 4725 3975 sink\001
4 0 0 50 0 16 12 0.0000 4 105 255 6000 3975 src\001
4 0 0 50 0 16 12 0.0000 4 135 690 4725 3075 decoder\001
4 0 0 50 0 16 12 0.0000 4 135 330 7350 3975 sink\001
4 0 0 50 0 16 12 0.0000 4 180 930 7275 3075 play_audio\001

View file

@ -22,7 +22,7 @@
int
main (int argc, char *argv[])
{
GstElement *pipeline, *filesrc, *parse, *decoder, *audiosink;
GstElement *pipeline, *filesrc, *decoder, *audiosink;
gst_init(&amp;argc, &amp;argv);
@ -38,23 +38,19 @@ main (int argc, char *argv[])
filesrc = gst_elementfactory_make ("filesrc", "disk_source");
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
/* now it's time to get the decoder */
decoder = gst_elementfactory_make ("mad", "decoder");
/* and an audio sink */
audiosink = gst_elementfactory_make ("osssink", "play_audio");
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (filesrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
@ -69,7 +65,6 @@ main (int argc, char *argv[])
/* we don't need a reference to these objects anymore */
gst_object_unref (GST_OBJECT (audiosink));
gst_object_unref (GST_OBJECT (parse));
gst_object_unref (GST_OBJECT (decoder));
gst_object_unref (GST_OBJECT (filesrc));
gst_object_unref (GST_OBJECT (pipeline));
@ -103,12 +98,12 @@ main (int argc, char *argv[])
</programlisting>
<para>
We are going to create 4 elements and one pipeline. Since all objects are
We are going to create 3 elements and one pipeline. Since all objects are
in fact elements, we can define them as:
</para>
<programlisting>
...
GstElement *pipeline, *filesrc, *parse, *decoder, *audiosink;
GstElement *pipeline, *filesrc, *decoder, *audiosink;
...
</programlisting>
@ -143,16 +138,12 @@ main (int argc, char *argv[])
</note>
<para>
We now create the MP3 decoder element. <application>GStreamer</application> requires you
to put a parser in front of the decoder. This parser will
cut the raw data from the disk source into MP3 frames
suitable for the decoder. In the advanced concepts chapter we will
see how this can be avoided.
We now create the MP3 decoder element. This assumes that the 'mad' plugin
is installed on the system where this application is executed.
</para>
<programlisting>
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
decoder = gst_elementfactory_make ("mad", "decoder");
</programlisting>
<para>
gst_elementfactory_make() takes two arguments: a string that will
@ -177,7 +168,6 @@ main (int argc, char *argv[])
<programlisting>
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
</programlisting>
@ -188,8 +178,6 @@ main (int argc, char *argv[])
<programlisting>
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (filesrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
@ -220,8 +208,8 @@ main (int argc, char *argv[])
</programlisting>
<note>
<para>
<application>GStreamer</application> will take care of the READY and PAUSED state for y
ou when going from NULL to PLAYING.
<application>GStreamer</application> will take care of the READY and PAUSED state for
you when going from NULL to PLAYING.
</para>
</note>
@ -263,16 +251,13 @@ main (int argc, char *argv[])
To compile the helloworld example, use:
</para>
<programlisting>
gcc -Wall `gstreamer-config --cflags --libs` helloworld.c \
gcc -Wall `pkg-config gstreamer --cflags --libs` helloworld.c \
-o helloworld
</programlisting>
<para>
This uses the program gstreamer-config, which comes with <application>GStreamer</application>. This program "knows"
what compiler switches are needed to compile programs that use <application>GStreamer</application>.
gstreamer-config --cflags will output a list of include
directories for the compiler to look in, and gstreamer-config --libs will output the
list of libraries for the compiler to link with and the directories to find them
in.
We use pkg-config to get the compiler flags needed to compile this application.
make sure to have your PKG_CONFIG_PATH environment variable set to the correct
location if you are building this application against the uninstalled location.
</para>
<para>
You can run the example with (substitute helloworld.mp3 with you favorite MP3 file):
@ -301,7 +286,5 @@ main (int argc, char *argv[])
into the pipeline is not that hard to do. The most important thing is
that you can reuse allready existing elements.
</para>
</sect1>
</chapter>

View file

@ -82,6 +82,11 @@
No provisions have been made for emerging technologies such as
the GNOME object embedding using BONOBO.
</para>
<para>
While the GStreamer core does not use network transparent technologies
at the lowest level, it shouldn't be hard to create a wrapper around the
core components.
</para>
</sect2>
<sect2 id="sec-motivation-catchup">

View file

@ -82,6 +82,11 @@
No provisions have been made for emerging technologies such as
the GNOME object embedding using BONOBO.
</para>
<para>
While the GStreamer core does not use network transparent technologies
at the lowest level, it shouldn't be hard to create a wrapper around the
core components.
</para>
</sect2>
<sect2 id="sec-motivation-catchup">

View file

@ -3,74 +3,6 @@
<para>
</para>
<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>

View file

@ -0,0 +1,6 @@
<chapter id="cha-scheduler">
<title>Understanding schedulers</title>
<para>
</para>
</chapter>

View file

@ -6,7 +6,7 @@
provides some easy wrappers for this common operation.
</para>
<para>
Instead of writing the following Gtk+ code to query the GTK_STRING value
Instead of writing the following glib code to query the GTK_STRING value
of an object:
</para>
<programlisting>