gst.sgml 3.88 KB
Newer Older
1
<!-- ##### SECTION Title ##### -->
2
GStreamer
3
4
5
6
7
8
9
10
11

<!-- ##### 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
Wim Taymans's avatar
Wim Taymans committed
12
13
determining source type.  Formatting/framing information is provided with
a powerful negotiation framework.  Plugins are heavily used to provide for
14
15
16
17
18
19
20
21
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
Wim Taymans's avatar
Wim Taymans committed
22
23
cruft behind.  Its interface is still very fluid and thus can be changed 
to increase the sanity/noise ratio.
24
25
26
27
28
29
30
31
32
33
34
</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.

  <programlisting>
  int 
  main (int argc, char *argv[])
  {
Wim Taymans's avatar
Wim Taymans committed
35
    /* initialize the GStreamer library */
36
37
38
39
40
    gst_init (&amp;argc, &amp;argv);
    ...
  }
  </programlisting>
</para>
Wim Taymans's avatar
Wim Taymans committed
41
42
43
44
<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>
Wim Taymans's avatar
Wim Taymans committed
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

<para>
You can also use a popt table to initialize your own parameters as shown in the next code 
fragment:
  <programlisting>
  static gboolean stats = FALSE;
  ...

  int 
  main (int argc, char *argv[])
  {
    struct poptOption options[] = {
      { "stats",  's',  POPT_ARG_NONE|POPT_ARGFLAG_STRIP,   &amp;stats,   0,
          "Show pad stats", NULL},
        POPT_TABLEEND
      };

    /* initialize the GStreamer library */
    gst_init_with_popt_table (&amp;argc, &amp;argv, options);
      
    ...
  }
  </programlisting>
</para>
69
70
71
72
73
<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>
Wim Taymans's avatar
Wim Taymans committed
74
75
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.
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
</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: 


Wim Taymans's avatar
Wim Taymans committed
93
94
95
96
97
98
99
100
<!-- ##### FUNCTION gst_init_with_popt_table ##### -->
<para>

</para>

@argc: 
@argv: 
@popt_options: 
101
<!-- # Unused Parameters # -->
102
@Param3: 
103
@Returns: 
Wim Taymans's avatar
Wim Taymans committed
104
105


Wim Taymans's avatar
Wim Taymans committed
106
107
108
109
110
111
112
113
114
115
<!-- ##### FUNCTION gst_init_check ##### -->
<para>

</para>

@argc: 
@argv: 
@Returns: 


116
117
118
119
120
121
122
123
124
125
126
127
128
<!-- ##### FUNCTION gst_init_check_with_popt_table ##### -->
<para>

</para>

@argc: 
@argv: 
@popt_options: 
@Returns: 
<!-- # Unused Parameters # -->
@Param3: 


129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!-- ##### FUNCTION gst_version ##### -->
<para>

</para>

@major: 
@minor: 
@micro: 


<!-- ##### FUNCTION gst_main ##### -->
<para>

</para>



<!-- ##### FUNCTION gst_main_quit ##### -->
<para>

</para>



Wim Taymans's avatar
Wim Taymans committed
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!-- ##### FUNCTION gst_has_threads ##### -->
<para>

</para>

@Returns: 


<!-- ##### FUNCTION gst_use_threads ##### -->
<para>

</para>

@use_threads: 


Wim Taymans's avatar
Wim Taymans committed
169
170
<!-- ##### VARIABLE g_log_domain_gstreamer ##### -->
<para>
Wim Taymans's avatar
Wim Taymans committed
171
The variable that holds the GStreamer log domain
Wim Taymans's avatar
Wim Taymans committed
172
173
174
</para>


175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!-- ##### MACRO GST_VERSION_MAJOR ##### -->
<para>
The major version of GStreamer at compile time
</para>



<!-- ##### MACRO GST_VERSION_MINOR ##### -->
<para>
The minor version of GStreamer at compile time
</para>



<!-- ##### MACRO GST_VERSION_MICRO ##### -->
<para>
The micro version of GStreamer at compile time
</para>