2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
2003-12-05 12:26:58 +00:00
|
|
|
GStreamer
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
|
|
Media library supporting arbitrary formats and filter graphs.
|
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
|
|
|
GStreamer is a framework for constructing graphs of various filters
|
|
|
|
(termed elements here) that will handle streaming media. Any discreet
|
|
|
|
(packetizable) media type is supported, with provisions for automatically
|
2002-07-12 23:21:20 +00:00
|
|
|
determining source type. Formatting/framing information is provided with
|
|
|
|
a powerful negotiation framework. Plugins are heavily used to provide for
|
2002-01-15 00:41:22 +00:00
|
|
|
all elements, allowing one to construct plugins outside of the GST
|
|
|
|
library, even released binary-only if license require (please don't).
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
GStreamer borrows heavily from both the <ulink
|
|
|
|
url="http://www.cse.ogi.edu/sysl/">OGI media pipeline</ulink> and
|
|
|
|
Microsoft's DirectShow, hopefully taking the best of both and leaving the
|
2002-07-12 23:21:20 +00:00
|
|
|
cruft behind. Its interface is still very fluid and thus can be changed
|
|
|
|
to increase the sanity/noise ratio.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The <application>GStreamer</application> library should be initialized with gst_init() before
|
|
|
|
it can be used. You should pass a pointer to the main argc and argv variables so that GStreamer can
|
|
|
|
process its own command line options, as shown in the following example.
|
|
|
|
|
2004-07-14 15:06:31 +00:00
|
|
|
<example>
|
2004-11-06 11:21:53 +00:00
|
|
|
<title>Initializing the gstreamer library</title>
|
2002-01-15 00:41:22 +00:00
|
|
|
<programlisting>
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2002-06-12 22:27:18 +00:00
|
|
|
/* initialize the GStreamer library */
|
2002-01-15 00:41:22 +00:00
|
|
|
gst_init (&argc, &argv);
|
|
|
|
...
|
|
|
|
}
|
|
|
|
</programlisting>
|
2004-07-14 15:06:31 +00:00
|
|
|
</example>
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
2002-07-12 23:21:20 +00:00
|
|
|
<para>
|
|
|
|
It's allowed to pass two NULL pointers to gst_init() in case you don't want to pass the command
|
|
|
|
line args to GStreamer.
|
|
|
|
</para>
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
<para>
|
|
|
|
You can also use a popt table to initialize your own parameters as shown in the next code
|
|
|
|
fragment:
|
2004-07-14 15:06:31 +00:00
|
|
|
<example>
|
|
|
|
<title>Initializing own parameters when initializing gstreamer</title>
|
2002-06-12 22:27:18 +00:00
|
|
|
<programlisting>
|
|
|
|
static gboolean stats = FALSE;
|
|
|
|
...
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
|
|
|
struct poptOption options[] = {
|
|
|
|
{ "stats", 's', POPT_ARG_NONE|POPT_ARGFLAG_STRIP, &stats, 0,
|
|
|
|
"Show pad stats", NULL},
|
|
|
|
POPT_TABLEEND
|
|
|
|
};
|
|
|
|
|
|
|
|
/* initialize the GStreamer library */
|
|
|
|
gst_init_with_popt_table (&argc, &argv, options);
|
|
|
|
|
|
|
|
...
|
|
|
|
}
|
|
|
|
</programlisting>
|
2004-07-14 15:06:31 +00:00
|
|
|
</example>
|
2002-06-12 22:27:18 +00:00
|
|
|
</para>
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
|
|
|
Use gst_version() to query the library version at runtime or use the GST_VERSION_* macros
|
|
|
|
to find the version at compile time.
|
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-19 20:38:51 +00:00
|
|
|
gst_main() and gst_main_quit() enter and exit the main loop. GStreamer doesn't currently require
|
|
|
|
you to us a mainloop but can intergrate with it without problems.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
Check out both <ulink url="http://www.cse.ogi.edu/sysl/">OGI's
|
|
|
|
pipeline</ulink> and Microsoft's DirectShow for some background.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_init ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@argc:
|
|
|
|
@argv:
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_init_check ##### -->
|
2004-02-04 21:29:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
@argc:
|
|
|
|
@argv:
|
2004-02-04 21:29:38 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-03-31 14:00:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_init_with_popt_table ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@argc:
|
|
|
|
@argv:
|
|
|
|
@popt_options:
|
2003-06-29 14:57:19 +00:00
|
|
|
<!-- # Unused Parameters # -->
|
2004-01-07 16:32:24 +00:00
|
|
|
@Param3:
|
2002-12-08 14:39:38 +00:00
|
|
|
@Returns:
|
2002-03-31 14:00:33 +00:00
|
|
|
|
|
|
|
|
2004-01-07 16:32:24 +00:00
|
|
|
<!-- ##### FUNCTION gst_init_check_with_popt_table ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@argc:
|
|
|
|
@argv:
|
|
|
|
@popt_options:
|
|
|
|
@Returns:
|
|
|
|
<!-- # Unused Parameters # -->
|
|
|
|
@Param3:
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_init_get_popt_table ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
@Returns:
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
|