aboutsummaryrefslogtreecommitdiff
path: root/docs/gst/running.xml
blob: c84b0f6206b26392e5f070969eb9350d87d26d10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<?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'">
]>
<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
<filename>.gstreamer-&GST_API_VERSION;</filename> directory in the user's
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>

<formalpara id="GST_DEBUG">
  <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.
The level value ranges from 0 (nothing) to 5 (LOG).
    <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>
        <term>3 - <option>INFO</option></term>
        <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>
        <term>4 - <option>DEBUG</option></term>
        <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>
        <term>5 - <option>LOG</option></term>
        <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.
</para>
        </listitem>
      </varlistentry>
    </variablelist>

 The category_name can contain "<option>*"</option> as a wildcard.
  </para>

  <para>
For example, setting <envar>GST_DEBUG</envar> to
<option>GST_AUTOPLUG:5,GST_ELEMENT_*:3</option>, will cause the
<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>
to <option>*:5</option>
  </para>

</formalpara>

<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
<option>--gst-debug-no-color</option> command line option to well-behaved
GStreamer applications (ie. those that pass command-line options correctly to
GStreamer).
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>

<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>

<formalpara id="GST_DEBUG_DUMP_DOT_DIR">
  <title><envar>GST_DEBUG_DUMP_DOT_DIR</envar></title>

  <para>
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.
  </para>

</formalpara>

<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>

<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>

<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
generator is producing incorrect code (Quite a few important
GStreamer plugins like videotestsrc, audioconvert or audioresample use Orc).
One can also combine flags like ORC_CODE=backup,debug.
  </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>

</refsect2>

</refsect1>

</refentry>