2008-10-30 15:29:51 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
<!ENTITY % version-entities SYSTEM "version.entities">
|
|
|
|
%version-entities;
|
|
|
|
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
|
|
|
]>
|
2005-10-08 11:12:26 +00:00
|
|
|
<refentry id="gst-running" revision="08 Oct 2005">
|
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>Running GStreamer Applications</refentrytitle>
|
|
|
|
<manvolnum>3</manvolnum>
|
|
|
|
<refmiscinfo>GStreamer Core</refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
|
|
|
<refnamediv>
|
|
|
|
<refname>Running GStreamer Applications</refname>
|
|
|
|
<refpurpose>
|
|
|
|
How to run and debug your GStreamer application
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Running and debugging GStreamer Applications</title>
|
|
|
|
|
|
|
|
<refsect2>
|
|
|
|
<title>Environment variables</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
GStreamer inspects a few of environment variables in addition to standard
|
|
|
|
variables like <envar>LANG</envar>, <envar>PATH</envar> or <envar>HOME</envar>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<formalpara id="GST_PLUGIN_SYSTEM_PATH">
|
|
|
|
<title><envar>GST_PLUGIN_SYSTEM_PATH</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
|
|
|
|
This environment variable can be set to a colon-separated list of paths.
|
|
|
|
If this variable is not set, GStreamer will fill in this list for you
|
|
|
|
with
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
plug-ins in the user's home directory. These are stored in a directory called
|
|
|
|
<filename>plugins</filename> inside the
|
2012-04-04 11:13:52 +00:00
|
|
|
<filename>.gstreamer-&GST_API_VERSION;</filename> directory in the user's
|
2005-10-08 11:12:26 +00:00
|
|
|
home directory.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
plug-ins installed system-wide. On this system, they are stored in
|
|
|
|
<filename>&GST_PLUGINS_DIR;</filename>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
GStreamer will scan these paths for GStreamer plug-ins. These plug-ins will
|
|
|
|
be loaded after the plug-ins in the GST_PLUGIN_PATH variable below.
|
|
|
|
|
|
|
|
The paths are scanned in the given order. This allows a user to override
|
|
|
|
system-installed plug-ins with his own versions.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Setting this variable to an empty string will cause GStreamer not to scan any
|
|
|
|
system paths at all for plug-ins. This can be useful if you're running
|
|
|
|
uninstalled (for development purposes) or while running testsuites.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
|
|
|
<formalpara id="GST_PLUGIN_PATH">
|
|
|
|
<title><envar>GST_PLUGIN_PATH</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This environment variable can be set to a colon-separated list of paths.
|
|
|
|
GStreamer will scan these paths for GStreamer plug-ins. These plug-ins will
|
|
|
|
be loaded in addition to, and before, the plug-ins in the system paths.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2007-10-29 10:05:55 +00:00
|
|
|
<formalpara id="GST_DEBUG">
|
2005-10-08 11:12:26 +00:00
|
|
|
<title><envar>GST_DEBUG</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If GStreamer has been configured with <option>--enable-gst-debug=yes</option>,
|
|
|
|
this variable can be set to a list of debug options, which cause GStreamer
|
|
|
|
to print out different types of debugging information to stderr.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The variable takes a comma-separated list of "category_name:level" pairs
|
|
|
|
to set specific levels for the individual categories.
|
2012-04-17 08:38:05 +00:00
|
|
|
The level value ranges from 0 (nothing) to 9 (MEMDUMP).
|
2005-10-08 11:12:26 +00:00
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>1 - <option>ERROR</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all fatal errors. These are errors that do not allow the core or elements
|
|
|
|
to perform the requested action. The application can still recover if
|
|
|
|
programmed to handle the conditions that triggered the error.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>2 - <option>WARNING</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all warnings. Typically these are non-fatal, but user-visible problems
|
|
|
|
are expected to happen.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-04-17 08:38:05 +00:00
|
|
|
<term>3 - <option>FIXME</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all fixme messages. Fixme messages are messages that indicate that something
|
|
|
|
in the executed code path is not fully implemented or handled yet. The purpose
|
|
|
|
of this message is to make it easier to spot incomplete/unfinished pieces of
|
|
|
|
code when reading the debug log.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>4 - <option>INFO</option></term>
|
2005-10-08 11:12:26 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all informational messages. These are typically used for events in
|
|
|
|
the system that only happen once, or are important and rare enough to be
|
|
|
|
logged at this level.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-04-17 08:38:05 +00:00
|
|
|
<term>5 - <option>DEBUG</option></term>
|
2005-10-08 11:12:26 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all debug messages. These are general debug messages for events
|
|
|
|
that happen only a limited number of times during an object's lifetime;
|
|
|
|
these include setup, teardown, change of parameters, ...
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2012-04-17 08:38:05 +00:00
|
|
|
<term>6 - <option>LOG</option></term>
|
2005-10-08 11:12:26 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all log messages. These are messages for events
|
|
|
|
that happen repeatedly during an object's lifetime;
|
|
|
|
these include streaming and steady-state conditions.
|
2012-04-17 08:38:05 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>7 - <option>TRACE</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Logs all trace messages. These messages for events
|
|
|
|
that happen repeatedly during an object's lifetime such as the
|
|
|
|
ref/unref cycles.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>9 - <option>MEMDUMP</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Log all memory dump messages. Memory dump messages are used to log
|
|
|
|
(small) chunks of data as memory dumps in the log. They will be displayed
|
|
|
|
as hexdump with ASCII characters.
|
2005-10-08 11:12:26 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
The category_name can contain "<option>*"</option> as a wildcard.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
For example, setting <envar>GST_DEBUG</envar> to
|
2012-04-17 08:38:05 +00:00
|
|
|
<option>GST_AUTOPLUG:6,GST_ELEMENT_*:4</option>, will cause the
|
2005-10-08 11:12:26 +00:00
|
|
|
<option>GST_AUTOPLUG</option> category to be logged at full
|
|
|
|
<option>LOG</option> level, while all categories starting with
|
|
|
|
<option>GST_ELEMENT_</option> will be logged at <option>INFO</option> level.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To get all possible debug output, set
|
|
|
|
<envar>GST_DEBUG</envar>
|
2012-06-28 13:41:43 +00:00
|
|
|
to <option>*:9</option>. For debugging purposes a <option>*:6</option> debug
|
|
|
|
log is usually the most useful, as it contains all important information, but
|
|
|
|
hides a lot of noise such as refs/unrefs. For bug reporting purposes, a
|
|
|
|
<option>*:6</option> log is also what will be requested usually. It's often
|
|
|
|
also worth running with <option>*:3</option> to see if there are any
|
|
|
|
non-fatal errors or warnings that might be related to the problem at hand.
|
2005-10-08 11:12:26 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2006-12-11 13:40:32 +00:00
|
|
|
<formalpara id="GST_DEBUG_NO_COLOR">
|
|
|
|
<title><envar>GST_DEBUG_NO_COLOR</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Set this environment variable to any value ("1" typically) to switch off
|
|
|
|
colouring in GST_DEBUG output. This has the same effect as specifying the
|
2007-10-29 10:05:55 +00:00
|
|
|
<option>--gst-debug-no-color</option> command line option to well-behaved
|
|
|
|
GStreamer applications (ie. those that pass command-line options correctly to
|
|
|
|
GStreamer).
|
2006-12-11 13:40:32 +00:00
|
|
|
This is particularly useful to reduce the size of debug output and also allows
|
|
|
|
for the output to be compressed much better than with colours turned on.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2010-09-02 11:44:08 +00:00
|
|
|
<formalpara id="GST_DEBUG_OPTIONS">
|
|
|
|
<title><envar>GST_DEBUG_OPTIONS</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
This environment variable can be used to tweak the behaviour of the debugging
|
|
|
|
system. Currently the only options supported are "pretty-tags" and "full-tags".
|
|
|
|
In "pretty-tags" mode (the default), taglists in the debug log will be
|
|
|
|
serialized so that only the first few and last few bytes of a buffer-type tag
|
|
|
|
will be serialized into the log, to avoid dumping hundreds of lines of useless
|
|
|
|
output into the log in case of large image tags and the like.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2007-10-29 13:46:25 +00:00
|
|
|
<formalpara id="GST_DEBUG_DUMP_DOT_DIR">
|
|
|
|
<title><envar>GST_DEBUG_DUMP_DOT_DIR</envar></title>
|
2007-10-29 10:05:55 +00:00
|
|
|
|
|
|
|
<para>
|
2007-10-29 13:46:25 +00:00
|
|
|
Set this environment variable to a path to turn on all
|
|
|
|
#GST_DEBUG_BIN_TO_DOT_FILE or #GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS calls
|
|
|
|
and have the dot files in that location.
|
2007-10-29 10:05:55 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2006-12-11 13:40:32 +00:00
|
|
|
<formalpara id="GST_REGISTRY_FORK">
|
|
|
|
<title><envar>GST_REGISTRY_FORK</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Set this environment variable to "no" to prevent GStreamer from forking on
|
|
|
|
startup in order to update the plugin registry. This is useful for debugging
|
|
|
|
purposes, but should not be used under normal circumstances, since it means
|
|
|
|
that plugins may be loaded into memory even if they are not needed by the
|
|
|
|
application.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2008-04-24 15:14:54 +00:00
|
|
|
<formalpara id="GST_REGISTRY_UPDATE">
|
|
|
|
<title><envar>GST_REGISTRY_UPDATE</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Set this environment variable to "no" to prevent GStreamer from updating the
|
|
|
|
plugin registry. This is useful for embedded device which is not updating the
|
|
|
|
plugins frequently, it will save time when doing gst_init().
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2012-04-17 08:38:05 +00:00
|
|
|
<formalpara id="GST_TRACE">
|
|
|
|
<title><envar>GST_TRACE</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Enable memory allocation tracing. Most GStreamer objects have support for
|
|
|
|
tracing the number of unfreed objects and their memory pointers.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The variable takes a comma-separated list of tracing options to enable.
|
|
|
|
<variablelist>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>live</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Counts all live objects and dumps an overview of the number of unfreed
|
|
|
|
objects at program exit.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>mem-live</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Keep track of the unfreed memory pointers and dump an overview of all unfreed
|
|
|
|
memory at program exit. Together with a level 9 debug log this can be used to
|
|
|
|
follow the lifecycle of leaked objects in order to track down where they are
|
2012-06-28 13:41:43 +00:00
|
|
|
leaked. This can be useful for debugging memory leaks in situations where
|
|
|
|
tools such as valgrind are not available, or not an option.
|
2012-04-17 08:38:05 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
Use <option>all</option> to enable all tracing flags.
|
|
|
|
</para>
|
|
|
|
</formalpara>
|
|
|
|
|
2012-11-06 17:29:28 +00:00
|
|
|
<formalpara id="GST_DEBUG_FILE">
|
|
|
|
<title><envar>GST_DEBUG_FILE</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Set this variable to a file path to redirect all GStreamer debug
|
|
|
|
messages to this file. If left unset, debug messages with be output
|
|
|
|
unto the standard error.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2010-09-02 11:44:08 +00:00
|
|
|
<formalpara id="ORC_CODE">
|
|
|
|
<title><envar>ORC_CODE</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Useful Orc environment variable. Set ORC_CODE=debug to enable debuggers
|
|
|
|
such as gdb to create useful backtraces from Orc-generated code. Set
|
|
|
|
ORC_CODE=backup or ORC_CODE=emulate if you suspect Orc's SIMD code
|
2011-02-23 10:33:58 +00:00
|
|
|
generator is producing incorrect code (Quite a few important
|
2010-09-02 11:44:08 +00:00
|
|
|
GStreamer plugins like videotestsrc, audioconvert or audioresample use Orc).
|
2011-02-23 10:33:58 +00:00
|
|
|
One can also combine flags like ORC_CODE=backup,debug.
|
2010-09-02 11:44:08 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
|
|
|
<formalpara id="G_DEBUG">
|
|
|
|
<title><envar>G_DEBUG</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Useful GLib environment variable. Set G_DEBUG=fatal_warnings to make
|
|
|
|
GStreamer programs abort when a critical warning such as an assertion failure
|
|
|
|
occurs. This is useful if you want to find out which part of the code caused
|
|
|
|
that warning to be triggered and under what circumstances. Simply set G_DEBUG
|
|
|
|
as mentioned above and run the program in gdb (or let it core dump). Then get
|
|
|
|
a stack trace in the usual way.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
|
|
|
<formalpara id="G_SLICE">
|
|
|
|
<title><envar>G_SLICE</envar></title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Useful GLib environment variable. Set G_SLICE=always-malloc when running
|
|
|
|
GStreamer programs in valgrind, or debugging memory leaks with other tools.
|
|
|
|
See the GLib API reference for more details.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
</formalpara>
|
|
|
|
|
2005-10-08 11:12:26 +00:00
|
|
|
</refsect2>
|
|
|
|
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
</refentry>
|