Codebase list farstream-0.2 / 3b4d60a
Imported Upstream version 0.0.28 Sjoerd Simons 13 years ago
103 changed file(s) with 4446 addition(s) and 1197 deletion(s). Raw diff Collapse all Expand all
0 commit 76dc68d80b4ddae7bdb4159ebdf94f447457ae70
1 Author: Olivier Crête <olivier.crete@collabora.co.uk>
2 Date: Tue May 10 16:50:41 2011 -0400
3
4 Version 0.0.28
5
6 commit 8ad7a67d943bc0aae96a97f049c0bd14ce342b5e
7 Author: Olivier Crête <olivier.crete@collabora.co.uk>
8 Date: Tue May 10 17:59:29 2011 -0400
9
10 Don't check for property we know to be there
11
12 We require a newer version of gst-plugins-good/base/bad/etc now
13 so no need to check if the properties exist at runtime.
14
15 commit fb125f32c9bb03e7ff55a97e35b073e04fe4c516
16 Author: Olivier Crête <olivier.crete@collabora.co.uk>
17 Date: Mon Feb 28 18:35:50 2011 -0500
18
19 utils: Add function to get the default RTP Header Extensions
20
21 commit 9ad130b60723971127f20b2be4e45da1e357b145
22 Author: Olivier Crête <olivier.crete@collabora.co.uk>
23 Date: Mon Feb 28 18:25:34 2011 -0500
24
25 tests: Add tests for Rtp Header Extension functions
26
27 commit b262c6ccc5eb62f2047fed62b3aa71ce0a6d7daf
28 Author: Olivier Crête <olivier.crete@collabora.co.uk>
29 Date: Mon Feb 28 18:14:42 2011 -0500
30
31 rtp: Add function to compare two FsRtpHeaderExtension structures
32
33 commit 5b3a20d2e22e835f5e9879ae428e43027a74b9f8
34 Author: Olivier Crête <olivier.crete@collabora.co.uk>
35 Date: Mon Feb 28 17:12:05 2011 -0500
36
37 rtp: Add function to load header extensions from a keyfile
38
39 commit c8782fe69bbf295c77e14785dfc8f4d618ed375b
40 Author: Olivier Crête <olivier.crete@collabora.co.uk>
41 Date: Mon Feb 28 17:09:59 2011 -0500
42
43 codec: Don't assert on invalid params
44
45 commit b3d6aeaad89e8e59330d37c9b6b6c30179de7ef5
46 Author: Olivier Crête <olivier.crete@collabora.co.uk>
47 Date: Fri Feb 18 17:31:46 2011 -0500
48
49 rtp: Add formatter for hdrext types
50
51 commit 3b225697d5865b4d63b2ddbce2d8f263cbe0922e
52 Author: Olivier Crête <olivier.crete@collabora.co.uk>
53 Date: Thu Jan 27 21:09:43 2011 -0500
54
55 tests: Add tests for RTP header extension negotiation
56
57 commit 7eb6ee3991b7252ab957f0452e671ebf98ccafdd
58 Author: Olivier Crête <olivier.crete@collabora.co.uk>
59 Date: Wed Jan 26 20:26:38 2011 -0500
60
61 rtpsession: Negotiate RTP Header extensions
62
63 commit 3198dd02b4e5fde72df5b7099ee98039118f7ea4
64 Author: Olivier Crête <olivier.crete@collabora.co.uk>
65 Date: Wed Jan 26 20:02:54 2011 -0500
66
67 rtpsession: Set the new codec where they are created
68
69 Improves the cleanliness a bit
70
71 commit be7232a85ba5b94ee2566814f6fb0f3300a40fa3
72 Author: Olivier Crête <olivier.crete@collabora.co.uk>
73 Date: Wed Jan 26 19:20:47 2011 -0500
74
75 rtpcodecnego: Add functions to do RTP Header Extension Negotiation
76
77 commit ea906e92d9cfd17e7894fb8b16d91b584674bb07
78 Author: Olivier Crête <olivier.crete@collabora.co.uk>
79 Date: Mon Jan 24 18:11:26 2011 -0500
80
81 rtp: Add rtp-header-extension properties
82
83 commit 7d31c8292832b1f9446554a33fe009baebe595f0
84 Author: Olivier Crête <olivier.crete@collabora.co.uk>
85 Date: Thu Jan 20 20:47:26 2011 -0500
86
87 rtp: Document FsRtpHeaderExtension and its methods
88
89 commit 8d1c6e468da8300f9bec8963f8029724465bfe82
90 Author: Olivier Crête <olivier.crete@collabora.co.uk>
91 Date: Thu Jan 20 20:31:14 2011 -0500
92
93 rtp: Add public header with the FsRtpHeaderExtension type
94
95 Also now require GLib 2.26, welcome to 2011!
96
97 commit 4213400c11666ba223136d1bf7bafca4708782ba
98 Author: Olivier Crête <olivier.crete@collabora.co.uk>
99 Date: Tue Mar 1 16:35:59 2011 -0500
100
101 tests: Test minimum reporting interval negotiation
102
103 commit 39eef469c8e11fc6bf519e88952de8f0270e9067
104 Author: Olivier Crête <olivier.crete@collabora.co.uk>
105 Date: Tue Jan 4 18:49:42 2011 -0500
106
107 tests: Add some other invalid codecs to the GKeyFile loading test
108
109 commit 97c2bc06ba7087f5f6f25712a13811bab108a62b
110 Author: Olivier Crête <olivier.crete@collabora.co.uk>
111 Date: Tue Jan 4 18:49:18 2011 -0500
112
113 codec: Always use fs_codec_new() to allocate a codec
114
115 commit 5ea7f5df1cf9320bf4d174757380ba868c369ae8
116 Author: Olivier Crête <olivier.crete@collabora.co.uk>
117 Date: Thu Apr 21 20:36:29 2011 -0400
118
119 rtpsession: Set the properties on the rtp session correctly
120
121 Also request it early enough
122
123 commit 017d8dd4fbc7815fde01f218e21ebd272daec65f
124 Author: Olivier Crête <olivier.crete@collabora.co.uk>
125 Date: Tue Jan 4 18:17:47 2011 -0500
126
127 rtpsession: Set the minimum-reporting-interval to the minimum of the codecs
128
129 Take into account the current sending codec as well as the receiving codecs
130 of all substreams
131
132 commit d9a0e18a9c950a532f3e9309fcb2618b14737859
133 Author: Olivier Crête <olivier.crete@collabora.co.uk>
134 Date: Tue Jan 4 17:00:54 2011 -0500
135
136 codec: Make the minimum reporting interval invalid value G_MAXUINT
137
138 commit 2471788666aeb248dba01577e699ed3cf883446a
139 Author: Olivier Crête <olivier.crete@collabora.co.uk>
140 Date: Fri Nov 26 16:19:36 2010 -0500
141
142 tests: Test minimum_reporting_interval property
143
144 commit 5e09a0d71e7e2935290f03e4169edec40a85d4ef
145 Author: Olivier Crête <olivier.crete@collabora.co.uk>
146 Date: Thu Nov 25 18:33:28 2010 -0500
147
148 rtpcodecnego: Negotiate Minimum reporting interval
149
150 commit e8833d436b647be6177812722c74763ef61e7347
151 Author: Olivier Crête <olivier.crete@collabora.co.uk>
152 Date: Thu Aug 12 16:55:16 2010 +0200
153
154 tests: Add test for AVPF negotiation
155
156 commit c253ef2e4ebc167680063333f8df48317ff64079
157 Author: Olivier Crête <olivier.crete@collabora.co.uk>
158 Date: Tue Aug 10 14:08:24 2010 +0200
159
160 rtp: Pass feedback params into the caps
161
162 commit f2a90db7e0be7e6633796df41840ceef355fa0b2
163 Author: Olivier Crête <olivier.crete@collabora.co.uk>
164 Date: Tue Aug 10 14:02:13 2010 +0200
165
166 rtpcodecnego: Intersect feedback parameters
167
168 commit 807da106f72d47cba98147e4da81ac66bfbd2391
169 Author: Olivier Crête <olivier.crete@collabora.co.uk>
170 Date: Wed Aug 11 17:58:00 2010 +0200
171
172 tests: Add test for feedback parameters
173
174 commit 6d33637c1e812847ded010c92fc095413c7fe56a
175 Author: Olivier Crête <olivier.crete@collabora.co.uk>
176 Date: Wed Aug 11 16:54:02 2010 +0200
177
178 tests: Test reading feedback params from GKeyFile
179
180 commit f8781be57cb7cae76ccaacd4e30196948bdb0c92
181 Author: Olivier Crête <olivier.crete@collabora.co.uk>
182 Date: Tue Aug 10 13:50:44 2010 +0200
183
184 codec: Add function to remove feedback parameters
185
186 commit 8254c4f7bf21340a65cd6ad2e7a27cc55f0a89e6
187 Author: Olivier Crête <olivier.crete@collabora.co.uk>
188 Date: Mon Aug 9 18:06:50 2010 +0200
189
190 codec: Add feedback params to gkeyfile
191
192 commit 624a152060dd413d64eb0ecc5b54ad72f0c5a7f9
193 Author: Olivier Crête <olivier.crete@collabora.co.uk>
194 Date: Mon Aug 9 17:57:13 2010 +0200
195
196 codec: Add feedback parameter
197
198 commit f228f6f47d95a10ade20ea9f0258ac1aeb923c66
199 Author: Olivier Crête <olivier.crete@collabora.co.uk>
200 Date: Thu Aug 5 19:47:43 2010 +0200
201
202 codec: Add minimum reporting interval parameter
203
204 commit 6784b6bb1b86402e4346e86c3c74c7d9def2d8ea
205 Author: Olivier Crête <olivier.crete@collabora.co.uk>
206 Date: Thu Aug 5 19:23:30 2010 +0200
207
208 fscodec: Refactor freeing of codec parameters
209
210 commit a8d280c7e1c305c665b160be67679bfee847b220
211 Author: Olivier Crête <olivier.crete@collabora.co.uk>
212 Date: Wed Aug 11 17:32:43 2010 +0200
213
214 tests: Use standardised function to remove fscodec optional params
215
216 commit 5dff4b882ce6f00f01b5b35621e7e74bda7b3d92
217 Author: Olivier Crête <olivier.crete@collabora.co.uk>
218 Date: Fri May 6 15:28:23 2011 -0400
219
220 rawudp: Send the original STUN packets from the same thread
221
222 This is to make sure the STUN packets for each component are sent in order.
223 Some firewalls just allocate output ports linearly. In that case, we prefer
224 if the order of the outside ports is the same as the order of the local ports,
225 that way, if we do UPnP, we have fewer chances of mixing it up.
226
227 commit 88940cf647ae0365e04cd94731406f3a75a777ba
228 Author: Olivier Crête <olivier.crete@collabora.co.uk>
229 Date: Tue May 3 19:19:13 2011 -0400
230
231 Version 0.0.27.1
232
233 commit e6f8664811983b7ebc799b795ee2c3bf25d6b18b
234 Author: Olivier Crête <olivier.crete@collabora.co.uk>
235 Date: Tue May 3 19:11:20 2011 -0400
236
237 Version 0.0.27
238
239 commit f6b0768165bae81725297c48ea06da25158d7544
240 Author: Olivier Crête <olivier.crete@collabora.co.uk>
241 Date: Wed Apr 27 19:17:39 2011 -0400
242
243 tests: fix some leaks
244
245 fix some leaks in the tests
246
247 commit 63feab41120a48fef5c31269d5c2ad0e6caa9255
248 Author: Olivier Crête <olivier.crete@collabora.co.uk>
249 Date: Mon Apr 25 20:07:15 2011 -0400
250
251 nicetransmitter: Check if gststream isn't NULL before using it
252
253 There could be a delay between the _stop() function and the stream transmitter
254 is disposed during which one could try to access it.
255
256 commit 223d1cc50b512dab8cd84c2f8badb85fabf9cb9d
257 Author: Olivier Crête <olivier.crete@collabora.co.uk>
258 Date: Mon Apr 25 19:28:51 2011 -0400
259
260 rawsession: Set the fakesink to async=sync=FALSE
261
262 If we don't do that, the whole pipeline may wait for frames to reach it.
263
264 commit d9285cc92c39b3b3446e7d63b39b58e47a634a3c
265 Author: Olivier Crête <olivier.crete@collabora.co.uk>
266 Date: Mon Apr 25 16:32:10 2011 -0400
267
268 tests: Allow for conflict in pad count in multicast test
269
270 commit 8f13ba6c97941c2ff5c93f66c799fb737688096d
271 Author: Olivier Crête <olivier.crete@collabora.co.uk>
272 Date: Thu Apr 21 20:44:33 2011 -0400
273
274 rtpsession: Set the bitrate inside the send codecbin based on the send-bitrate property
275
276 commit 900b91121c6f72c49e3325219ff4526c89715bed
277 Author: Olivier Crête <olivier.crete@collabora.co.uk>
278 Date: Thu Apr 21 20:43:45 2011 -0400
279
280 rtpsession: Add send bitrate property
281
282 commit c50d6e3e6b8d38c6eae1582743136fbdccfab613
283 Author: Olivier Crête <olivier.crete@collabora.co.uk>
284 Date: Thu Apr 21 20:42:47 2011 -0400
285
286 fsutils: Add function to set bitrate generically
287
288 Since upstream GStreamer does not want to do it, lets add
289 a function to set the bitrate on different encoders without having to
290 keep all the knowledge around.
291
292 commit 23d85ce645fa96d8c258aa6bc4e67faada7c46d7
293 Author: Olivier Crête <olivier.crete@collabora.co.uk>
294 Date: Wed Apr 13 18:35:53 2011 -0400
295
296 rtpsession: Use the regular ca->codec, not the send_codec to create dtmf source
297
298 The special sources lookup codec looks at the ->codec field, not at the ->send_codec
299 field to look up the match CodecAssociation
300
301 commit c1df094b8451994ba8efdba279fe1e646d17aee6
302 Author: Olivier Crête <olivier.crete@collabora.co.uk>
303 Date: Wed Apr 13 18:06:19 2011 -0400
304
305 rtpsession: Return FALSE if there is an error on rtp_set_send_codec
306
307 commit 6b8ed9f70b5ca6ec94edde7077d6f628a47706bc
308 Author: Youness Alaoui <youness.alaoui@collabora.co.uk>
309 Date: Wed Apr 6 17:31:20 2011 -0400
310
311 shm-transmitter: Do not call sink_set_sending if the shm_sink is NULL
312
313 commit 0e582381ef874cb8a6785b6f8d11e2d4edb9a2b3
314 Author: Olivier Crête <olivier.crete@collabora.co.uk>
315 Date: Tue Apr 5 12:45:37 2011 -0400
316
317 tests: Check for multicast before gupnp tests
318
319 commit 67a0fdf66e4f4c73a25292f5b72f617513755df4
320 Author: Olivier Crête <olivier.crete@collabora.co.uk>
321 Date: Sat Apr 2 21:58:16 2011 -0400
322
323 python: Don't link to libpython
324
325 Some distributions (Debian) link libpython statically into the python
326 interpreter
327
328 commit 467d8807d779743652d48a235ba2647930eee61e
329 Author: Olivier Crête <olivier.crete@collabora.co.uk>
330 Date: Wed Mar 16 17:40:02 2011 -0400
331
332 rtpsession: Immediately adds transmitter sink, we need to send RTCP even when receiving
333
334 The parent elements should be be waiting for this bin to continue because
335 transmitter has async=FALSE and async-handling=TRUE
336
337 Reverts a020bf8c34656e8c5b1ebfde478847e6aebbfa51
338
339 commit 68ae7a7b5c55d821d2940db8b200a610e511d16c
340 Author: Olivier Crête <olivier.crete@collabora.co.uk>
341 Date: Mon Jan 11 15:36:09 2010 -0500
342
343 Request keyframes with all-headers when we have a new target
344
345 commit ee9674058b327d3e2fc0c70a41bbd0ae3016147c
346 Author: Olivier Crête <olivier.crete@collabora.co.uk>
347 Date: Mon Feb 7 17:34:55 2011 +0100
348
349 stream: Add python bindings for src pad iterator
350
351 commit bb637b74caec4dccfc186bc0f8a11e5001e0f8bd
352 Author: Olivier Crête <olivier.crete@collabora.co.uk>
353 Date: Mon Feb 7 16:24:35 2011 +0100
354
355 tests: Ignore some more things in the async dispose case
356
357 commit 8f9e381cdcaaf5091f0983b0e8880479ea2ff891
358 Author: Olivier Crête <olivier.crete@collabora.co.uk>
359 Date: Wed Mar 9 18:09:17 2011 -0500
360
361 nicestream: Request keyframe only if stream is >= connected
362
363 commit 1560b16f912f0ef775274a4962e3870b571bbe86
364 Author: Olivier Crête <olivier.crete@collabora.co.uk>
365 Date: Tue Feb 8 16:49:45 2011 +0000
366
367 raw: Move all Gst processing to the session
368
369 commit 6aee195dba0efd3533aa9d3fedae32cf38caec42
370 Author: Olivier Crête <olivier.crete@collabora.co.uk>
371 Date: Wed Mar 9 17:36:48 2011 -0500
372
373 rawsession: Correctly protect transmitter_linked
374
375 commit 48c8cc96d5a26f4f48bd842a34aefff873db3c8f
376 Author: Olivier Crête <olivier.crete@collabora.co.uk>
377 Date: Wed Mar 9 16:58:14 2011 -0500
378
379 rawsession: Set capsfilter to null when disposing
380
381 commit 228f5eaa39d6246f9d13dd3fa494c679b589b3fe
382 Author: Olivier Crête <olivier.crete@collabora.co.uk>
383 Date: Tue Feb 8 15:51:05 2011 +0000
384
385 rawstream: Rename capsfilter to recv_capsfilter
386
387 commit cec5a855a517d286c999ad700b1739915bbf3cf3
388 Author: Olivier Crête <olivier.crete@collabora.co.uk>
389 Date: Tue Feb 8 15:46:36 2011 +0000
390
391 rawsession: Correctly name remove_stream method
392
393 commit 821fb893894b9a7434d5bf2cd9ea2ebfc0a438a9
394 Author: Olivier Crête <olivier.crete@collabora.co.uk>
395 Date: Wed Mar 9 16:45:02 2011 -0500
396
397 rawsession: Rename capsfilter to send_capsfilter
398
399 commit f1cfa2c2cd0e852a77e5916d1e73feb13fc7fe83
400 Author: Olivier Crête <olivier.crete@collabora.co.uk>
401 Date: Tue Feb 8 14:04:12 2011 +0000
402
403 rawstream: Greatly simplify ghostpad addition
404
405 commit 8e2f7e2ca05f9b8eba3577c2a398a6df25757f49
406 Author: Olivier Crête <olivier.crete@collabora.co.uk>
407 Date: Wed Mar 9 16:42:16 2011 -0500
408
409 rawsession: Add method to get transmitter from stream
410
411 commit 6862918b82dec55533b3f0dfa102a9400b8a94fd
412 Author: Olivier Crête <olivier.crete@collabora.co.uk>
413 Date: Tue Feb 8 11:21:22 2011 +0000
414
415 rawsession: If its !=NULL is useless
416
417 commit 347b3b30056646da20c1dfbf7b9dbe59ff63a22b
418 Author: Olivier Crête <olivier.crete@collabora.co.uk>
419 Date: Tue Mar 1 16:56:08 2011 -0500
420
421 rtp: Use fs_codec_new() everywhere
422
423 commit a004b388e5a28d38892a93243e7186a48a08e3e0
424 Author: Olivier Crête <olivier.crete@collabora.co.uk>
425 Date: Mon Feb 28 15:21:59 2011 -0500
426
427 interfaces: Re-order includes/ifdefs to make it build on windows
428
429 commit 4807a91be9d7cb8b1767b5cd416872f0c1aeb4ff
430 Author: Olivier Crête <olivier.crete@collabora.co.uk>
431 Date: Wed Feb 23 16:13:24 2011 -0500
432
433 Version 0.0.26.1
434
0435 commit 72ef2c35a48538b6c26ef9900a227611dc9c6cdc
1436 Author: Olivier Crête <olivier.crete@collabora.co.uk>
2437 Date: Wed Feb 23 16:04:46 2011 -0500
1414 ============
1515
1616 Build time:
17 - gstreamer 0.10.26
18 - gst-plugins-base 0.10.26
19 - glib 2.16
17 - gstreamer 0.10.33
18 - gst-plugins-base 0.10.33
19 - glib 2.26
2020 - Python 2.4
2121 - libnice 0.1.0
2222
2929
3030 Run time for the RTP plugin:
3131 All of the build time requirements (except gtk-doc) plus
32 - gst-plugins-good 0.10.17
32 - gst-plugins-good 0.10.29
3333 - gst-plugins-bad 0.10.20
3434
3535 Run time for the MSN plugin:
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.66 for Farsight2 0.0.26.
2 # Generated by GNU Autoconf 2.66 for Farsight2 0.0.28.
33 #
44 # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight>.
55 #
562562 # Identity of this package.
563563 PACKAGE_NAME='Farsight2'
564564 PACKAGE_TARNAME='farsight2'
565 PACKAGE_VERSION='0.0.26'
566 PACKAGE_STRING='Farsight2 0.0.26'
565 PACKAGE_VERSION='0.0.28'
566 PACKAGE_STRING='Farsight2 0.0.28'
567567 PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight'
568568 PACKAGE_URL=''
569569
14501450 # Omit some internal or obsolete options to make the list less imposing.
14511451 # This message is too long to be a string in the A/UX 3.1 sh.
14521452 cat <<_ACEOF
1453 \`configure' configures Farsight2 0.0.26 to adapt to many kinds of systems.
1453 \`configure' configures Farsight2 0.0.28 to adapt to many kinds of systems.
14541454
14551455 Usage: $0 [OPTION]... [VAR=VALUE]...
14561456
15201520
15211521 if test -n "$ac_init_help"; then
15221522 case $ac_init_help in
1523 short | recursive ) echo "Configuration of Farsight2 0.0.26:";;
1523 short | recursive ) echo "Configuration of Farsight2 0.0.28:";;
15241524 esac
15251525 cat <<\_ACEOF
15261526
16911691 test -n "$ac_init_help" && exit $ac_status
16921692 if $ac_init_version; then
16931693 cat <<\_ACEOF
1694 Farsight2 configure 0.0.26
1694 Farsight2 configure 0.0.28
16951695 generated by GNU Autoconf 2.66
16961696
16971697 Copyright (C) 2010 Free Software Foundation, Inc.
21632163 This file contains any messages produced by compilers while
21642164 running configure, to aid debugging if configure makes a mistake.
21652165
2166 It was created by Farsight2 $as_me 0.0.26, which was
2166 It was created by Farsight2 $as_me 0.0.28, which was
21672167 generated by GNU Autoconf 2.66. Invocation command line was
21682168
21692169 $ $0 $@
29832983
29842984 # Define the identity of the package.
29852985 PACKAGE='farsight2'
2986 VERSION='0.0.26'
2986 VERSION='0.0.28'
29872987
29882988
29892989 cat >>confdefs.h <<_ACEOF
30253025
30263026
30273027
3028 PACKAGE_VERSION_MAJOR=$(echo 0.0.26 | cut -d'.' -f1)
3029 PACKAGE_VERSION_MINOR=$(echo 0.0.26 | cut -d'.' -f2)
3030 PACKAGE_VERSION_MICRO=$(echo 0.0.26 | cut -d'.' -f3)
3028 PACKAGE_VERSION_MAJOR=$(echo 0.0.28 | cut -d'.' -f1)
3029 PACKAGE_VERSION_MINOR=$(echo 0.0.28 | cut -d'.' -f2)
3030 PACKAGE_VERSION_MICRO=$(echo 0.0.28 | cut -d'.' -f3)
30313031
30323032
30333033
30383038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5
30393039 $as_echo_n "checking nano version... " >&6; }
30403040
3041 NANO=$(echo 0.0.26 | cut -d'.' -f4)
3041 NANO=$(echo 0.0.28 | cut -d'.' -f4)
30423042
30433043 if test x"$NANO" = x || test "x$NANO" = "x0" ; then
30443044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5
31693169
31703170
31713171
3172 FS2_CURRENT=6
3173 FS2_REVISION=1
3174 FS2_AGE=6
3175 FS2_LIBVERSION=6:1:6
3172 FS2_CURRENT=8
3173 FS2_REVISION=0
3174 FS2_AGE=8
3175 FS2_LIBVERSION=8:0:8
31763176
31773177
31783178
1098610986
1098710987
1098810988
10989 GST_REQ=0.10.26
10990 GSTPB_REQ=0.10.26
10989 GST_REQ=0.10.33
10990 GSTPB_REQ=0.10.33
1099110991
1099210992
1099310993
1374713747
1374813748
1374913749
13750 GLIB_REQ=2.16
13750 GLIB_REQ=2.26
1375113751 if test "x$GLIB_REQ" = "x"
1375213752 then
1375313753 as_fn_error $? "Please specify a required version for GLib 2.0" "$LINENO" 5
1594415944 # report actual input values of CONFIG_FILES etc. instead of their
1594515945 # values after options handling.
1594615946 ac_log="
15947 This file was extended by Farsight2 $as_me 0.0.26, which was
15947 This file was extended by Farsight2 $as_me 0.0.28, which was
1594815948 generated by GNU Autoconf 2.66. Invocation command line was
1594915949
1595015950 CONFIG_FILES = $CONFIG_FILES
1601016010 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1601116011 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1601216012 ac_cs_version="\\
16013 Farsight2 config.status 0.0.26
16013 Farsight2 config.status 0.0.28
1601416014 configured by $0, generated by GNU Autoconf 2.66,
1601516015 with options \\"\$ac_cs_config\\"
1601616016
44 dnl initialize autoconf
55 dnl releases only do -Wall, cvs and prerelease does -Werror too
66 dnl use a three digit version number for releases, and four for cvs/prerelease
7 AC_INIT(Farsight2, 0.0.26,
7 AC_INIT(Farsight2, 0.0.28,
88 https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight,
99 farsight2)
1010
5151 dnl - interfaces added -> increment AGE
5252 dnl - interfaces removed -> AGE = 0
5353 dnl sets FS2_LT_LDFLAGS
54 AS_LIBTOOL(FS2, 6, 1, 6)
54 AS_LIBTOOL(FS2, 8, 0, 8)
5555
5656 dnl FIXME: this macro doesn't actually work;
5757 dnl the generated libtool script has no support for the listed tags.
6161 AM_PROG_LIBTOOL
6262
6363 dnl *** required versions of GStreamer stuff ***
64 GST_REQ=0.10.26
65 GSTPB_REQ=0.10.26
64 GST_REQ=0.10.33
65 GSTPB_REQ=0.10.33
6666
6767 dnl *** autotools stuff ****
6868
237237 dnl *** checks for dependency libraries ***
238238
239239 dnl GLib is required
240 AG_GST_GLIB_CHECK([2.16])
240 AG_GST_GLIB_CHECK([2.26])
241241
242242 PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.16)
243243 AC_SUBST(GIO_UNIX_CFLAGS)
3030 <xi:include href="xml/fs-codec.xml"/>
3131 </chapter>
3232 <chapter>
33 <title>Protocol Specific types</title>
34 <xi:include href="xml/fs-rtp.xml"/>
35 </chapter>
36 <chapter>
3337 <title>Farsight Utility Functions and Objects</title>
3438 <xi:include href="xml/fs-element-added-notifier.xml"/>
3539 <xi:include href="xml/fs-interfaces.xml"/>
119119 FsCodec
120120 FsMediaType
121121 FsCodecParameter
122 FsFeedbackParameter
122123 FS_CODEC_ID_ANY
123124 FS_CODEC_ID_DISABLE
124125 fs_codec_new
133134 fs_codec_add_optional_parameter
134135 fs_codec_remove_optional_parameter
135136 fs_codec_get_optional_parameter
137 fs_codec_add_feedback_parameter
138 fs_codec_get_feedback_parameter
139 fs_codec_remove_feedback_parameter
136140 FS_CODEC_FORMAT
137141 FS_CODEC_ARGS
138142 fs_media_type_to_string
261265 </SECTION>
262266
263267 <SECTION>
268 <FILE>fs-rtp</FILE>
269 <TITLE>RTP Specific types</TITLE>
270 <INCLUDE>gst/farsight/fs-rtp.h</INCLUDE>
271 FsRtpHeaderExtension
272 fs_rtp_header_extension_new
273 fs_rtp_header_extension_copy
274 fs_rtp_header_extension_destroy
275 fs_rtp_header_extension_are_equal
276 fs_rtp_header_extension_list_copy
277 fs_rtp_header_extension_list_destroy
278 fs_rtp_header_extension_list_from_keyfile
279 FS_RTP_HEADER_EXTENSION_FORMAT
280 FS_RTP_HEADER_EXTENSION_ARGS
281 <SUBSECTION Standard>
282 FS_TYPE_RTP_HEADER_EXTENSION
283 FS_TYPE_RTP_HEADER_EXTENSION_LIST
284 fs_rtp_header_extension_get_type
285 fs_rtp_header_extension_list_get_type
286 </SECTION>
287
264288 <FILE>fs-utils</FILE>
289 <TITLE>Utility functions</TITLE>
265290 <INCLUDE>gst/farsight/fs-utils.h</INCLUDE>
291 fs_utils_set_bitrate
266292 fs_utils_get_default_codec_preferences
267293 fs_utils_get_default_element_properties
268 </SECTION>
294 fs_utils_get_default_rtp_header_extension_preferences
295 </SECTION>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsBaseConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch04.html" title="Farsight Classes Base Implementations">
8 <link rel="prev" href="ch04.html" title="Farsight Classes Base Implementations">
9 <link rel="next" href="ch05.html" title="Farsight Transmitter Classes">
7 <link rel="up" href="ch05.html" title="Farsight Classes Base Implementations">
8 <link rel="prev" href="ch05.html" title="Farsight Classes Base Implementations">
9 <link rel="next" href="ch06.html" title="Farsight Transmitter Classes">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1515 <tr valign="middle">
16 <td><a accesskey="p" href="ch04.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
16 <td><a accesskey="p" href="ch05.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1818 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1919 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="ch05.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
20 <td><a accesskey="n" href="ch06.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2121 </tr>
2222 <tr><td colspan="5" class="shortcuts">
2323 <a href="#FsBaseConference.synopsis" class="shortcut">Top</a>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch01.html" title="Farsight GStreamer Interfaces">
88 <link rel="prev" href="ch01.html" title="Farsight GStreamer Interfaces">
9191 of type <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GST-MESSAGE-ELEMENT:CAPS"><span class="type">GST_MESSAGE_ELEMENT</span></a> sent over the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a>.
9292 </p>
9393 <div class="refsect2" title='The "farsight-error" message'>
94 <a name="id318267"></a><h3>The "<code class="literal">farsight-error</code>" message</h3>
94 <a name="id415196"></a><h3>The "<code class="literal">farsight-error</code>" message</h3>
9595 <div class="informalexample">
9696 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
9797 <tbody>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsElementAddedNotifier</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch03.html" title="Farsight Utility Functions and Objects">
8 <link rel="prev" href="ch03.html" title="Farsight Utility Functions and Objects">
7 <link rel="up" href="ch04.html" title="Farsight Utility Functions and Objects">
8 <link rel="prev" href="ch04.html" title="Farsight Utility Functions and Objects">
99 <link rel="next" href="farsight2-libs-Network-interfaces-discovery.html" title="Network interfaces discovery">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1515 <tr valign="middle">
16 <td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
16 <td><a accesskey="p" href="ch04.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1818 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1919 <th width="100%" align="center">Farsight2 Reference Manual</th>
2020 <td><a accesskey="n" href="farsight2-libs-Network-interfaces-discovery.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsParticipant</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch02.html" title="Farsight Core Library">
88 <link rel="prev" href="ch02.html" title="Farsight Core Library">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsStream</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch02.html" title="Farsight Core Library">
88 <link rel="prev" href="farsight2-libs-fs-session.html" title="FsSession">
110110 of type <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GST-MESSAGE-ELEMENT:CAPS"><span class="type">GST_MESSAGE_ELEMENT</span></a> sent over the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a>.
111111 </p>
112112 <div class="refsect2" title='The "farsight-new-local-candidate" message'>
113 <a name="id398080"></a><h3>The "<code class="literal">farsight-new-local-candidate</code>" message</h3>
113 <a name="id498750"></a><h3>The "<code class="literal">farsight-new-local-candidate</code>" message</h3>
114114 <div class="informalexample">
115115 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
116116 <tbody>
130130 </div>
131131 <hr>
132132 <div class="refsect2" title='The "farsight-local-candidates-prepared" message'>
133 <a name="id398116"></a><h3>The "<code class="literal">farsight-local-candidates-prepared</code>" message</h3>
133 <a name="id498786"></a><h3>The "<code class="literal">farsight-local-candidates-prepared</code>" message</h3>
134134 <div class="informalexample">
135135 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
136136 <tbody>
149149 </div>
150150 <hr>
151151 <div class="refsect2" title='The "farsight-new-active-candidate-pair" message'>
152 <a name="id398146"></a><h3>The "<code class="literal">farsight-new-active-candidate-pair</code>" message</h3>
152 <a name="id498816"></a><h3>The "<code class="literal">farsight-new-active-candidate-pair</code>" message</h3>
153153 <div class="informalexample">
154154 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
155155 <tbody>
175175 </div>
176176 <hr>
177177 <div class="refsect2" title='The "farsight-recv-codecs-changed" message'>
178 <a name="id398190"></a><h3>The "<code class="literal">farsight-recv-codecs-changed</code>" message</h3>
178 <a name="id498860"></a><h3>The "<code class="literal">farsight-recv-codecs-changed</code>" message</h3>
179179 <div class="informalexample">
180180 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
181181 <tbody>
200200 </div>
201201 <hr>
202202 <div class="refsect2" title='The "farsight-component-state-changed" message'>
203 <a name="id398254"></a><h3>The "<code class="literal">farsight-component-state-changed</code>" message</h3>
203 <a name="id498924"></a><h3>The "<code class="literal">farsight-component-state-changed</code>" message</h3>
204204 <div class="informalexample">
205205 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
206206 <tbody>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsStreamTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch05.html" title="Farsight Transmitter Classes">
7 <link rel="up" href="ch06.html" title="Farsight Transmitter Classes">
88 <link rel="prev" href="FsTransmitter.html" title="FsTransmitter">
9 <link rel="next" href="ch06.html" title="Farsight Plugins Infrastructure">
9 <link rel="next" href="ch07.html" title="Farsight Plugins Infrastructure">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1515 <tr valign="middle">
1616 <td><a accesskey="p" href="FsTransmitter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
17 <td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1818 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1919 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="ch06.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
20 <td><a accesskey="n" href="ch07.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2121 </tr>
2222 <tr><td colspan="5" class="shortcuts">
2323 <a href="#FsStreamTransmitter.synopsis" class="shortcut">Top</a>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch05.html" title="Farsight Transmitter Classes">
8 <link rel="prev" href="ch05.html" title="Farsight Transmitter Classes">
7 <link rel="up" href="ch06.html" title="Farsight Transmitter Classes">
8 <link rel="prev" href="ch06.html" title="Farsight Transmitter Classes">
99 <link rel="next" href="FsStreamTransmitter.html" title="FsStreamTransmitter">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1515 <tr valign="middle">
16 <td><a accesskey="p" href="ch05.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch05.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
16 <td><a accesskey="p" href="ch06.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1818 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1919 <th width="100%" align="center">Farsight2 Reference Manual</th>
2020 <td><a accesskey="n" href="FsStreamTransmitter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Farsight GStreamer Interfaces</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
88 <link rel="prev" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
2020 </tr></table>
2121 <div class="chapter" title="Farsight GStreamer Interfaces">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id318718"></a>Farsight GStreamer Interfaces</h2></div></div></div>
23 <a name="id415990"></a>Farsight GStreamer Interfaces</h2></div></div></div>
2424 <div class="toc"><dl><dt>
2525 <span class="refentrytitle"><a href="FsConference.html">FsConference</a></span><span class="refpurpose"> — Interface for farsight conference elements</span>
2626 </dt></dl></div>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Farsight Core Library</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
88 <link rel="prev" href="FsConference.html" title="FsConference">
2020 </tr></table>
2121 <div class="chapter" title="Farsight Core Library">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id318729"></a>Farsight Core Library</h2></div></div></div>
23 <a name="id416001"></a>Farsight Core Library</h2></div></div></div>
2424 <div class="toc"><dl>
2525 <dt>
2626 <span class="refentrytitle"><a href="FsParticipant.html">FsParticipant</a></span><span class="refpurpose"> — A participant in a conference</span>
11 <html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Farsight Utility Functions and Objects</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
4 <title>Protocol Specific types</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
88 <link rel="prev" href="farsight2-libs-FsCodec.html" title="FsCodec">
9 <link rel="next" href="FsElementAddedNotifier.html" title="FsElementAddedNotifier">
9 <link rel="next" href="farsight2-libs-RTP-Specific-types.html" title="RTP Specific types">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1616 <td><a accesskey="u" href="pt01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="FsElementAddedNotifier.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
19 <td><a accesskey="n" href="farsight2-libs-RTP-Specific-types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2020 </tr></table>
21 <div class="chapter" title="Farsight Utility Functions and Objects">
21 <div class="chapter" title="Protocol Specific types">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id323957"></a>Farsight Utility Functions and Objects</h2></div></div></div>
24 <div class="toc"><dl>
25 <dt>
26 <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span>
27 </dt>
28 <dt>
29 <span class="refentrytitle"><a href="farsight2-libs-Network-interfaces-discovery.html">Network interfaces discovery</a></span><span class="refpurpose"> — Utility functions to discover local network interfaces</span>
30 </dt>
31 <dt>
32 <span class="refentrytitle"><a href="farsight2-libs-fs-utils.html">fs-utils</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
33 </dt>
34 </dl></div>
23 <a name="id445534"></a>Protocol Specific types</h2></div></div></div>
24 <div class="toc"><dl><dt>
25 <span class="refentrytitle"><a href="farsight2-libs-RTP-Specific-types.html">RTP Specific types</a></span><span class="refpurpose"></span>
26 </dt></dl></div>
3527 </div>
3628 <div class="footer">
3729 <hr>
11 <html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Farsight Classes Base Implementations</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
4 <title>Farsight Utility Functions and Objects</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
8 <link rel="prev" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
9 <link rel="next" href="FsBaseConference.html" title="FsBaseConference">
7 <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
8 <link rel="prev" href="farsight2-libs-RTP-Specific-types.html" title="RTP Specific types">
9 <link rel="next" href="FsElementAddedNotifier.html" title="FsElementAddedNotifier">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
15 <td><a accesskey="p" href="pt02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16 <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
15 <td><a accesskey="p" href="farsight2-libs-RTP-Specific-types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16 <td><a accesskey="u" href="pt01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="FsBaseConference.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
19 <td><a accesskey="n" href="FsElementAddedNotifier.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2020 </tr></table>
21 <div class="chapter" title="Farsight Classes Base Implementations">
21 <div class="chapter" title="Farsight Utility Functions and Objects">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id323983"></a>Farsight Classes Base Implementations</h2></div></div></div>
24 <div class="toc"><dl><dt>
25 <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span>
26 </dt></dl></div>
23 <a name="id445546"></a>Farsight Utility Functions and Objects</h2></div></div></div>
24 <div class="toc"><dl>
25 <dt>
26 <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span>
27 </dt>
28 <dt>
29 <span class="refentrytitle"><a href="farsight2-libs-Network-interfaces-discovery.html">Network interfaces discovery</a></span><span class="refpurpose"> — Utility functions to discover local network interfaces</span>
30 </dt>
31 <dt>
32 <span class="refentrytitle"><a href="farsight2-libs-Utility-functions.html">Utility functions</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
33 </dt>
34 </dl></div>
2735 </div>
2836 <div class="footer">
2937 <hr>
11 <html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Farsight Transmitter Classes</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
4 <title>Farsight Classes Base Implementations</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
8 <link rel="prev" href="FsBaseConference.html" title="FsBaseConference">
9 <link rel="next" href="FsTransmitter.html" title="FsTransmitter">
8 <link rel="prev" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
9 <link rel="next" href="FsBaseConference.html" title="FsBaseConference">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
15 <td><a accesskey="p" href="FsBaseConference.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
15 <td><a accesskey="p" href="pt02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
1616 <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="FsTransmitter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
19 <td><a accesskey="n" href="FsBaseConference.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2020 </tr></table>
21 <div class="chapter" title="Farsight Transmitter Classes">
21 <div class="chapter" title="Farsight Classes Base Implementations">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id323994"></a>Farsight Transmitter Classes</h2></div></div></div>
24 <div class="toc"><dl>
25 <dt>
26 <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span>
27 </dt>
28 <dt>
29 <span class="refentrytitle"><a href="FsStreamTransmitter.html">FsStreamTransmitter</a></span><span class="refpurpose"> — A stream transmitter object used to convey per-stream
30 information to a transmitter.</span>
31 </dt>
32 </dl></div>
23 <a name="id445572"></a>Farsight Classes Base Implementations</h2></div></div></div>
24 <div class="toc"><dl><dt>
25 <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span>
26 </dt></dl></div>
3327 </div>
3428 <div class="footer">
3529 <hr>
11 <html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Farsight Plugins Infrastructure</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
4 <title>Farsight Transmitter Classes</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
8 <link rel="prev" href="FsStreamTransmitter.html" title="FsStreamTransmitter">
9 <link rel="next" href="farsight2-libs-FsPlugin.html" title="FsPlugin">
8 <link rel="prev" href="FsBaseConference.html" title="FsBaseConference">
9 <link rel="next" href="FsTransmitter.html" title="FsTransmitter">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
15 <td><a accesskey="p" href="FsStreamTransmitter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
15 <td><a accesskey="p" href="FsBaseConference.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
1616 <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="farsight2-libs-FsPlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
19 <td><a accesskey="n" href="FsTransmitter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2020 </tr></table>
21 <div class="chapter" title="Farsight Plugins Infrastructure">
21 <div class="chapter" title="Farsight Transmitter Classes">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id319674"></a>Farsight Plugins Infrastructure</h2></div></div></div>
24 <div class="toc"><dl><dt>
25 <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span>
26 </dt></dl></div>
23 <a name="id445583"></a>Farsight Transmitter Classes</h2></div></div></div>
24 <div class="toc"><dl>
25 <dt>
26 <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span>
27 </dt>
28 <dt>
29 <span class="refentrytitle"><a href="FsStreamTransmitter.html">FsStreamTransmitter</a></span><span class="refpurpose"> — A stream transmitter object used to convey per-stream
30 information to a transmitter.</span>
31 </dt>
32 </dl></div>
2733 </div>
2834 <div class="footer">
2935 <hr>
0 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Farsight Plugins Infrastructure</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
6 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
8 <link rel="prev" href="FsStreamTransmitter.html" title="FsStreamTransmitter">
9 <link rel="next" href="farsight2-libs-FsPlugin.html" title="FsPlugin">
10 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
11 <link rel="stylesheet" href="style.css" type="text/css">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
15 <td><a accesskey="p" href="FsStreamTransmitter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16 <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
17 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
18 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="farsight2-libs-FsPlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
20 </tr></table>
21 <div class="chapter" title="Farsight Plugins Infrastructure">
22 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id445600"></a>Farsight Plugins Infrastructure</h2></div></div></div>
24 <div class="toc"><dl><dt>
25 <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span>
26 </dt></dl></div>
27 </div>
28 <div class="footer">
29 <hr>
30 Generated by GTK-Doc V1.15</div>
31 </body>
32 </html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsCandidate</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch02.html" title="Farsight Core Library">
88 <link rel="prev" href="FsStream.html" title="FsStream">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsCodec</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch02.html" title="Farsight Core Library">
88 <link rel="prev" href="farsight2-libs-FsCandidate.html" title="FsCandidate">
9 <link rel="next" href="ch03.html" title="Farsight Utility Functions and Objects">
9 <link rel="next" href="ch03.html" title="Protocol Specific types">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
4242 <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec">FsCodec</a>;
4343 enum <a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType">FsMediaType</a>;
4444 <a class="link" href="farsight2-libs-FsCodec.html#FsCodecParameter" title="FsCodecParameter">FsCodecParameter</a>;
45 <a class="link" href="farsight2-libs-FsCodec.html#FsFeedbackParameter" title="FsFeedbackParameter">FsFeedbackParameter</a>;
4546 #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS" title="FS_CODEC_ID_ANY">FS_CODEC_ID_ANY</a>
4647 #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS" title="FS_CODEC_ID_DISABLE">FS_CODEC_ID_DISABLE</a>
4748 <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="returnvalue">FsCodec</span></a> * <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-new" title="fs_codec_new ()">fs_codec_new</a> (<em class="parameter"><code><span class="type">int</span> id</code></em>,
6768 <a class="link" href="farsight2-libs-FsCodec.html#FsCodecParameter" title="FsCodecParameter"><span class="returnvalue">FsCodecParameter</span></a> * <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-get-optional-parameter" title="fs_codec_get_optional_parameter ()">fs_codec_get_optional_parameter</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
6869 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
6970 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>);
71 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-add-feedback-parameter" title="fs_codec_add_feedback_parameter ()">fs_codec_add_feedback_parameter</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
72 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
73 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subtype</code></em>,
74 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extra_params</code></em>);
75 <a class="link" href="farsight2-libs-FsCodec.html#FsFeedbackParameter" title="FsFeedbackParameter"><span class="returnvalue">FsFeedbackParameter</span></a> * <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-get-feedback-parameter" title="fs_codec_get_feedback_parameter ()">fs_codec_get_feedback_parameter</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
76 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
77 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subtype</code></em>,
78 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extra_params</code></em>);
79 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-remove-feedback-parameter" title="fs_codec_remove_feedback_parameter ()">fs_codec_remove_feedback_parameter</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
80 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *item</code></em>);
7081 #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS" title="FS_CODEC_FORMAT">FS_CODEC_FORMAT</a>
7182 #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS" title="FS_CODEC_ARGS()">FS_CODEC_ARGS</a> (codec)
7283 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="farsight2-libs-FsCodec.html#fs-media-type-to-string" title="fs_media_type_to_string ()">fs_media_type_to_string</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>);
194205 </table></div>
195206 </div>
196207 <hr>
208 <div class="refsect2" title="FsFeedbackParameter">
209 <a name="FsFeedbackParameter"></a><h3>FsFeedbackParameter</h3>
210 <pre class="programlisting">typedef struct {
211 gchar *type;
212 gchar *subtype;
213 gchar *extra_params;
214 } FsFeedbackParameter;
215 </pre>
216 <p>
217 Use to store feedback parameters
218 </p>
219 <div class="variablelist"><table border="0">
220 <col align="left" valign="top">
221 <tbody>
222 <tr>
223 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="FsFeedbackParameter.type"></a>type</code></em>;</span></p></td>
224 <td>the type of feedback, like "ack", "name", "ccm"
225 </td>
226 </tr>
227 <tr>
228 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="FsFeedbackParameter.subtype"></a>subtype</code></em>;</span></p></td>
229 <td>the subtype of feedback (can be an empty string)
230 </td>
231 </tr>
232 <tr>
233 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="FsFeedbackParameter.extra-params"></a>extra_params</code></em>;</span></p></td>
234 <td>a string containing extra parameters (can be empty)
235 </td>
236 </tr>
237 </tbody>
238 </table></div>
239 </div>
240 <hr>
197241 <div class="refsect2" title="FS_CODEC_ID_ANY">
198242 <a name="FS-CODEC-ID-ANY:CAPS"></a><h3>FS_CODEC_ID_ANY</h3>
199243 <pre class="programlisting">#define FS_CODEC_ID_ANY (-1)
350394 6
351395 7
352396 8
353 9</pre></td>
397 9
398 10
399 11
400 12
401 13
402 14</pre></td>
354403 <td class="listing_code"><pre class="programlisting"><span class="symbol">[</span><span class="normal">audio</span><span class="symbol">/</span><span class="normal">codec1</span><span class="symbol">]</span>
355404 <span class="normal">clock</span><span class="symbol">-</span><span class="normal">rate</span><span class="symbol">=</span><span class="number">8000</span>
356405
359408
360409 <span class="symbol">[</span><span class="normal">audio</span><span class="symbol">/</span><span class="normal">codec2</span><span class="symbol">]</span>
361410 <span class="normal">one_param</span><span class="symbol">=</span><span class="normal">QCIF</span>
362 <span class="normal">another_param</span><span class="symbol">=</span><span class="normal">WOW</span></pre></td>
411 <span class="normal">another_param</span><span class="symbol">=</span><span class="normal">WOW</span>
412
413 <span class="symbol">[</span><span class="normal">video</span><span class="symbol">/</span><span class="normal">codec3</span><span class="symbol">]</span>
414 <span class="normal">wierd_param</span><span class="symbol">=</span><span class="number">42</span>
415 <span class="normal">feedback</span><span class="symbol">:</span><span class="normal">nack</span><span class="symbol">/</span><span class="normal">pli</span><span class="symbol">=</span><span class="number">1</span>
416 <span class="normal">feedback</span><span class="symbol">:</span><span class="normal">tfrc</span><span class="symbol">=</span></pre></td>
363417 </tr>
364418 </tbody>
365419 </table>
505559 </tr>
506560 <tr>
507561 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
508 <td>The value of the optional parameter
562 <td>
509563 </td>
510564 </tr>
511565 </tbody>
532586 </tr>
533587 <tr>
534588 <td><p><span class="term"><em class="parameter"><code>param</code></em> :</span></p></td>
535 <td>a pointer to the <a class="link" href="farsight2-libs-FsCodec.html#FsCodecParameter" title="FsCodecParameter"><span class="type">FsCodecParameter</span></a> to remove
589 <td>
536590 </td>
537591 </tr>
538592 </tbody>
575629 </table></div>
576630 </div>
577631 <hr>
632 <div class="refsect2" title="fs_codec_add_feedback_parameter ()">
633 <a name="fs-codec-add-feedback-parameter"></a><h3>fs_codec_add_feedback_parameter ()</h3>
634 <pre class="programlisting"><span class="returnvalue">void</span> fs_codec_add_feedback_parameter (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
635 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
636 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subtype</code></em>,
637 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extra_params</code></em>);</pre>
638 <p>
639 This function adds an new feedback parameter to a <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a>
640 </p>
641 <div class="variablelist"><table border="0">
642 <col align="left" valign="top">
643 <tbody>
644 <tr>
645 <td><p><span class="term"><em class="parameter"><code>codec</code></em> :</span></p></td>
646 <td>The <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> to add the parameter to
647 </td>
648 </tr>
649 <tr>
650 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
651 <td>The type of the feedback parameter
652 </td>
653 </tr>
654 <tr>
655 <td><p><span class="term"><em class="parameter"><code>subtype</code></em> :</span></p></td>
656 <td>The subtype of the feedback parameter
657 </td>
658 </tr>
659 <tr>
660 <td><p><span class="term"><em class="parameter"><code>extra_params</code></em> :</span></p></td>
661 <td>The extra_params of the feeback parameter
662 </td>
663 </tr>
664 </tbody>
665 </table></div>
666 </div>
667 <hr>
668 <div class="refsect2" title="fs_codec_get_feedback_parameter ()">
669 <a name="fs-codec-get-feedback-parameter"></a><h3>fs_codec_get_feedback_parameter ()</h3>
670 <pre class="programlisting"><a class="link" href="farsight2-libs-FsCodec.html#FsFeedbackParameter" title="FsFeedbackParameter"><span class="returnvalue">FsFeedbackParameter</span></a> * fs_codec_get_feedback_parameter (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
671 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
672 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *subtype</code></em>,
673 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *extra_params</code></em>);</pre>
674 <p>
675 Finds the <a class="link" href="farsight2-libs-FsCodec.html#FsFeedbackParameter" title="FsFeedbackParameter"><span class="type">FsFeedbackParameter</span></a> in the <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> that has the requested
676 subtype, type and extra_params. One of which must be non-NULL;
677 </p>
678 <div class="variablelist"><table border="0">
679 <col align="left" valign="top">
680 <tbody>
681 <tr>
682 <td><p><span class="term"><em class="parameter"><code>codec</code></em> :</span></p></td>
683 <td>a <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a>
684 </td>
685 </tr>
686 <tr>
687 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
688 <td>The subtype of the parameter to search for or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for any type
689 </td>
690 </tr>
691 <tr>
692 <td><p><span class="term"><em class="parameter"><code>subtype</code></em> :</span></p></td>
693 <td>The subtype of the parameter to search for or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for any subtype
694 </td>
695 </tr>
696 <tr>
697 <td><p><span class="term"><em class="parameter"><code>extra_params</code></em> :</span></p></td>
698 <td>The extra_params of the parameter to search for or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for
699 any extra_params
700 </td>
701 </tr>
702 <tr>
703 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
704 <td> the <a class="link" href="farsight2-libs-FsCodec.html#FsFeedbackParameter" title="FsFeedbackParameter"><span class="type">FsFeedbackParameter</span></a> from the <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
705 </td>
706 </tr>
707 </tbody>
708 </table></div>
709 </div>
710 <hr>
711 <div class="refsect2" title="fs_codec_remove_feedback_parameter ()">
712 <a name="fs-codec-remove-feedback-parameter"></a><h3>fs_codec_remove_feedback_parameter ()</h3>
713 <pre class="programlisting"><span class="returnvalue">void</span> fs_codec_remove_feedback_parameter (<em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec"><span class="type">FsCodec</span></a> *codec</code></em>,
714 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *item</code></em>);</pre>
715 <p>
716 </p>
717 <div class="variablelist"><table border="0">
718 <col align="left" valign="top">
719 <tbody>
720 <tr>
721 <td><p><span class="term"><em class="parameter"><code>codec</code></em> :</span></p></td>
722 <td>
723 </td>
724 </tr>
725 <tr>
726 <td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
727 <td>
728 </td>
729 </tr>
730 </tbody>
731 </table></div>
732 </div>
733 <hr>
578734 <div class="refsect2" title="FS_CODEC_FORMAT">
579735 <a name="FS-CODEC-FORMAT:CAPS"></a><h3>FS_CODEC_FORMAT</h3>
580736 <pre class="programlisting">#define FS_CODEC_FORMAT "%d: %s %s clock:%d channels:%d params:%p"
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsPlugin</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch06.html" title="Farsight Plugins Infrastructure">
8 <link rel="prev" href="ch06.html" title="Farsight Plugins Infrastructure">
7 <link rel="up" href="ch07.html" title="Farsight Plugins Infrastructure">
8 <link rel="prev" href="ch07.html" title="Farsight Plugins Infrastructure">
99 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1010 <link rel="stylesheet" href="style.css" type="text/css">
1111 </head>
1212 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1313 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1414 <tr valign="middle">
15 <td><a accesskey="p" href="ch06.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16 <td><a accesskey="u" href="ch06.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
15 <td><a accesskey="p" href="ch07.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
16 <td><a accesskey="u" href="ch07.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
1919 <td> </td>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Network interfaces discovery</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch03.html" title="Farsight Utility Functions and Objects">
7 <link rel="up" href="ch04.html" title="Farsight Utility Functions and Objects">
88 <link rel="prev" href="FsElementAddedNotifier.html" title="FsElementAddedNotifier">
9 <link rel="next" href="farsight2-libs-fs-utils.html" title="fs-utils">
9 <link rel="next" href="farsight2-libs-Utility-functions.html" title="Utility functions">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
1515 <tr valign="middle">
1616 <td><a accesskey="p" href="FsElementAddedNotifier.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
17 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
1818 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1919 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="farsight2-libs-fs-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
20 <td><a accesskey="n" href="farsight2-libs-Utility-functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2121 </tr>
2222 <tr><td colspan="5" class="shortcuts">
2323 <a href="#farsight2-libs-Network-interfaces-discovery.synopsis" class="shortcut">Top</a>
0 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>RTP Specific types</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
6 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch03.html" title="Protocol Specific types">
8 <link rel="prev" href="ch03.html" title="Protocol Specific types">
9 <link rel="next" href="ch04.html" title="Farsight Utility Functions and Objects">
10 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
11 <link rel="stylesheet" href="style.css" type="text/css">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
15 <tr valign="middle">
16 <td><a accesskey="p" href="ch03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="ch04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr>
22 <tr><td colspan="5" class="shortcuts">
23 <a href="#farsight2-libs-RTP-Specific-types.synopsis" class="shortcut">Top</a>
24  | 
25 <a href="#farsight2-libs-RTP-Specific-types.description" class="shortcut">Description</a>
26 </td></tr>
27 </table>
28 <div class="refentry" title="RTP Specific types">
29 <a name="farsight2-libs-RTP-Specific-types"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="farsight2-libs-RTP-Specific-types.top_of_page"></a>RTP Specific types</span></h2>
33 <p>RTP Specific types</p>
34 </td>
35 <td valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsynopsisdiv" title="Synopsis">
38 <a name="farsight2-libs-RTP-Specific-types.synopsis"></a><h2>Synopsis</h2>
39 <pre class="synopsis">
40 #include &lt;gst/farsight/fs-rtp.h&gt;
41
42 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension">FsRtpHeaderExtension</a>;
43 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new" title="fs_rtp_header_extension_new ()">fs_rtp_header_extension_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
44 <em class="parameter"><code><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> direction</code></em>,
45 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);
46 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-copy" title="fs_rtp_header_extension_copy ()">fs_rtp_header_extension_copy</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);
47 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-destroy" title="fs_rtp_header_extension_destroy ()">fs_rtp_header_extension_destroy</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);
48 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-are-equal" title="fs_rtp_header_extension_are_equal ()">fs_rtp_header_extension_are_equal</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension1</code></em>,
49 <em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension2</code></em>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-copy" title="fs_rtp_header_extension_list_copy ()">fs_rtp_header_extension_list_copy</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);
51 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy" title="fs_rtp_header_extension_list_destroy ()">fs_rtp_header_extension_list_destroy</a>
52 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);
53 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-from-keyfile" title="fs_rtp_header_extension_list_from_keyfile ()">fs_rtp_header_extension_list_from_keyfile</a>
54 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
55 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>,
56 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
57 #define <a class="link" href="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS" title="FS_RTP_HEADER_EXTENSION_FORMAT">FS_RTP_HEADER_EXTENSION_FORMAT</a>
58 #define <a class="link" href="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS" title="FS_RTP_HEADER_EXTENSION_ARGS()">FS_RTP_HEADER_EXTENSION_ARGS</a> (hdrext)
59 </pre>
60 </div>
61 <div class="refsect1" title="Description">
62 <a name="farsight2-libs-RTP-Specific-types.description"></a><h2>Description</h2>
63 <p>
64 </p>
65 </div>
66 <div class="refsect1" title="Details">
67 <a name="farsight2-libs-RTP-Specific-types.details"></a><h2>Details</h2>
68 <div class="refsect2" title="FsRtpHeaderExtension">
69 <a name="FsRtpHeaderExtension"></a><h3>FsRtpHeaderExtension</h3>
70 <pre class="programlisting">typedef struct {
71 guint id;
72 FsStreamDirection direction;
73 gchar *uri;
74 } FsRtpHeaderExtension;
75 </pre>
76 <p>
77 Defines a RTP header extension with its negotiated identifier, direction
78 and URI. They should only be created with <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new" title="fs_rtp_header_extension_new ()"><code class="function">fs_rtp_header_extension_new()</code></a>.
79 </p>
80 <div class="variablelist"><table border="0">
81 <col align="left" valign="top">
82 <tbody>
83 <tr>
84 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="FsRtpHeaderExtension.id"></a>id</code></em>;</span></p></td>
85 <td>The identifier of the RTP header extension
86 </td>
87 </tr>
88 <tr>
89 <td><p><span class="term"><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> <em class="structfield"><code><a name="FsRtpHeaderExtension.direction"></a>direction</code></em>;</span></p></td>
90 <td>the direction in which this extension can be used
91 </td>
92 </tr>
93 <tr>
94 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="FsRtpHeaderExtension.uri"></a>uri</code></em>;</span></p></td>
95 <td>The URI that defines this extension
96 </td>
97 </tr>
98 </tbody>
99 </table></div>
100 </div>
101 <hr>
102 <div class="refsect2" title="fs_rtp_header_extension_new ()">
103 <a name="fs-rtp-header-extension-new"></a><h3>fs_rtp_header_extension_new ()</h3>
104 <pre class="programlisting"><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * fs_rtp_header_extension_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
105 <em class="parameter"><code><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> direction</code></em>,
106 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);</pre>
107 <p>
108 Creates a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
109 </p>
110 <div class="variablelist"><table border="0">
111 <col align="left" valign="top">
112 <tbody>
113 <tr>
114 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
115 <td>The identifier of the RTP header extension
116 </td>
117 </tr>
118 <tr>
119 <td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td>
120 <td>the direction in which this extension can be used
121 </td>
122 </tr>
123 <tr>
124 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
125 <td>The URI that defines this extension
126 </td>
127 </tr>
128 <tr>
129 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
130 <td> a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
131 </td>
132 </tr>
133 </tbody>
134 </table></div>
135 </div>
136 <hr>
137 <div class="refsect2" title="fs_rtp_header_extension_copy ()">
138 <a name="fs-rtp-header-extension-copy"></a><h3>fs_rtp_header_extension_copy ()</h3>
139 <pre class="programlisting"><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * fs_rtp_header_extension_copy (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);</pre>
140 <p>
141 Copies a <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
142 </p>
143 <div class="variablelist"><table border="0">
144 <col align="left" valign="top">
145 <tbody>
146 <tr>
147 <td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td>
148 <td>The RTP header extension definition to copy
149 </td>
150 </tr>
151 <tr>
152 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
153 <td> a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
154 </td>
155 </tr>
156 </tbody>
157 </table></div>
158 </div>
159 <hr>
160 <div class="refsect2" title="fs_rtp_header_extension_destroy ()">
161 <a name="fs-rtp-header-extension-destroy"></a><h3>fs_rtp_header_extension_destroy ()</h3>
162 <pre class="programlisting"><span class="returnvalue">void</span> fs_rtp_header_extension_destroy (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);</pre>
163 <p>
164 Frees the passed <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
165 </p>
166 <div class="variablelist"><table border="0">
167 <col align="left" valign="top">
168 <tbody><tr>
169 <td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td>
170 <td>A RTP header extension to free
171 </td>
172 </tr></tbody>
173 </table></div>
174 </div>
175 <hr>
176 <div class="refsect2" title="fs_rtp_header_extension_are_equal ()">
177 <a name="fs-rtp-header-extension-are-equal"></a><h3>fs_rtp_header_extension_are_equal ()</h3>
178 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> fs_rtp_header_extension_are_equal (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension1</code></em>,
179 <em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension2</code></em>);</pre>
180 <p>
181 Compares two <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> structures
182 </p>
183 <div class="variablelist"><table border="0">
184 <col align="left" valign="top">
185 <tbody>
186 <tr>
187 <td><p><span class="term"><em class="parameter"><code>extension1</code></em> :</span></p></td>
188 <td>The first <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
189 </td>
190 </tr>
191 <tr>
192 <td><p><span class="term"><em class="parameter"><code>extension2</code></em> :</span></p></td>
193 <td>The second <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
194 </td>
195 </tr>
196 <tr>
197 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
198 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if they are identical, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
199 </td>
200 </tr>
201 </tbody>
202 </table></div>
203 </div>
204 <hr>
205 <div class="refsect2" title="fs_rtp_header_extension_list_copy ()">
206 <a name="fs-rtp-header-extension-list-copy"></a><h3>fs_rtp_header_extension_list_copy ()</h3>
207 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_rtp_header_extension_list_copy (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);</pre>
208 <p>
209 Does a deep copy of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
210 </p>
211 <div class="variablelist"><table border="0">
212 <col align="left" valign="top">
213 <tbody>
214 <tr>
215 <td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
216 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
217 </td>
218 </tr>
219 <tr>
220 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
221 <td> a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
222 </td>
223 </tr>
224 </tbody>
225 </table></div>
226 </div>
227 <hr>
228 <div class="refsect2" title="fs_rtp_header_extension_list_destroy ()">
229 <a name="fs-rtp-header-extension-list-destroy"></a><h3>fs_rtp_header_extension_list_destroy ()</h3>
230 <pre class="programlisting"><span class="returnvalue">void</span> fs_rtp_header_extension_list_destroy
231 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);</pre>
232 <p>
233 Frees the passed <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
234 </p>
235 <div class="variablelist"><table border="0">
236 <col align="left" valign="top">
237 <tbody><tr>
238 <td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
239 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
240 </td>
241 </tr></tbody>
242 </table></div>
243 </div>
244 <hr>
245 <div class="refsect2" title="fs_rtp_header_extension_list_from_keyfile ()">
246 <a name="fs-rtp-header-extension-list-from-keyfile"></a><h3>fs_rtp_header_extension_list_from_keyfile ()</h3>
247 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_rtp_header_extension_list_from_keyfile
248 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
249 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>,
250 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
251 <p>
252 Reads the content of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> of the following format into a
253 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> structures.
254 </p>
255 <p>
256 The groups have a format "rtp-hdrext:audio:XXX" or
257 "rtp-hdrext:video:XXX" where XXX is a unique string (per media type).
258 </p>
259 <p>
260 The valid keys are:
261 </p>
262 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
263 <li class="listitem">id: a int between in the 1-255 and 4096-4351 ranges</li>
264 <li class="listitem">uri: a URI describing the RTP Header Extension</li>
265 <li class="listitem">direction (optional): To only send or receive a RTP Header
266 Extension, possible values are "send", "receive", "none" or "both".
267 Defaults to "both"</li>
268 </ul></div>
269 <p>
270 </p>
271 <p>
272 Example:
273 </p>
274 <div class="informalexample">
275 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
276 <tbody>
277 <tr>
278 <td class="listing_lines" align="right"><pre>1
279 2
280 3
281 4
282 5
283 6
284 7
285 8</pre></td>
286 <td class="listing_code"><pre class="programlisting"><span class="symbol">[</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">audio</span><span class="symbol">:</span><span class="normal">a</span><span class="symbol">]</span>
287 <span class="normal">id</span><span class="symbol">=</span><span class="number">1</span>
288 <span class="normal">uri</span><span class="symbol">=</span><span class="normal">urn</span><span class="symbol">:</span><span class="normal">ietf</span><span class="symbol">:</span><span class="normal">params</span><span class="symbol">:</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">toffset</span>
289
290 <span class="symbol">[</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">audio</span><span class="symbol">:</span><span class="normal">abc</span><span class="symbol">]</span>
291 <span class="normal">id</span><span class="symbol">=</span><span class="number">3</span>
292 <span class="normal">uri</span><span class="symbol">=</span><span class="normal">urn</span><span class="symbol">:</span><span class="normal">ietf</span><span class="symbol">:</span><span class="normal">params</span><span class="symbol">:</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">ntp</span><span class="symbol">-</span><span class="number">64</span>
293 <span class="normal">direction</span><span class="symbol">=</span><span class="normal">receive</span></pre></td>
294 </tr>
295 </tbody>
296 </table>
297 </div>
298
299 <p>
300 </p>
301 <div class="variablelist"><table border="0">
302 <col align="left" valign="top">
303 <tbody>
304 <tr>
305 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
306 <td>Name of the <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> to read the RTP Header Extensions from
307 </td>
308 </tr>
309 <tr>
310 <td><p><span class="term"><em class="parameter"><code>media_type</code></em> :</span></p></td>
311 <td>The media type for which to get header extensions
312 </td>
313 </tr>
314 <tr>
315 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
316 <td>location of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or NULL if no error occured
317 </td>
318 </tr>
319 <tr>
320 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> that must be freed with
322 <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy" title="fs_rtp_header_extension_list_destroy ()"><code class="function">fs_rtp_header_extension_list_destroy()</code></a>
323 </td>
324 </tr>
325 </tbody>
326 </table></div>
327 </div>
328 <hr>
329 <div class="refsect2" title="FS_RTP_HEADER_EXTENSION_FORMAT">
330 <a name="FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"></a><h3>FS_RTP_HEADER_EXTENSION_FORMAT</h3>
331 <pre class="programlisting">#define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s"
332 </pre>
333 <p>
334 A format that can be used in printf like format strings to format a
335 FsRtpHeaderExtension
336 </p>
337 </div>
338 <hr>
339 <div class="refsect2" title="FS_RTP_HEADER_EXTENSION_ARGS()">
340 <a name="FS-RTP-HEADER-EXTENSION-ARGS:CAPS"></a><h3>FS_RTP_HEADER_EXTENSION_ARGS()</h3>
341 <pre class="programlisting">#define FS_RTP_HEADER_EXTENSION_ARGS(hdrext)</pre>
342 <p>
343 Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS
344 </p>
345 <div class="variablelist"><table border="0">
346 <col align="left" valign="top">
347 <tbody><tr>
348 <td><p><span class="term"><em class="parameter"><code>hdrext</code></em> :</span></p></td>
349 <td>a <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
350 </td>
351 </tr></tbody>
352 </table></div>
353 </div>
354 </div>
355 </div>
356 <div class="footer">
357 <hr>
358 Generated by GTK-Doc V1.15</div>
359 </body>
360 </html>
0 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>Utility functions</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
6 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch04.html" title="Farsight Utility Functions and Objects">
8 <link rel="prev" href="farsight2-libs-Network-interfaces-discovery.html" title="Network interfaces discovery">
9 <link rel="next" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
10 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
11 <link rel="stylesheet" href="style.css" type="text/css">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
15 <tr valign="middle">
16 <td><a accesskey="p" href="farsight2-libs-Network-interfaces-discovery.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="pt02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr>
22 <tr><td colspan="5" class="shortcuts">
23 <a href="#farsight2-libs-Utility-functions.synopsis" class="shortcut">Top</a>
24  | 
25 <a href="#farsight2-libs-Utility-functions.description" class="shortcut">Description</a>
26 </td></tr>
27 </table>
28 <div class="refentry" title="Utility functions">
29 <a name="farsight2-libs-Utility-functions"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="farsight2-libs-Utility-functions.top_of_page"></a>Utility functions</span></h2>
33 <p>Utility functions — Miscellaneous useful functions</p>
34 </td>
35 <td valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsynopsisdiv" title="Synopsis">
38 <a name="farsight2-libs-Utility-functions.synopsis"></a><h2>Synopsis</h2>
39 <pre class="synopsis">
40 #include &lt;gst/farsight/fs-utils.h&gt;
41
42 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension">FsRtpHeaderExtension</a>;
43 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new" title="fs_rtp_header_extension_new ()">fs_rtp_header_extension_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
44 <em class="parameter"><code><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> direction</code></em>,
45 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);
46 <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-copy" title="fs_rtp_header_extension_copy ()">fs_rtp_header_extension_copy</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);
47 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-destroy" title="fs_rtp_header_extension_destroy ()">fs_rtp_header_extension_destroy</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);
48 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-are-equal" title="fs_rtp_header_extension_are_equal ()">fs_rtp_header_extension_are_equal</a> (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension1</code></em>,
49 <em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension2</code></em>);
50 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-copy" title="fs_rtp_header_extension_list_copy ()">fs_rtp_header_extension_list_copy</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);
51 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy" title="fs_rtp_header_extension_list_destroy ()">fs_rtp_header_extension_list_destroy</a>
52 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);
53 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-from-keyfile" title="fs_rtp_header_extension_list_from_keyfile ()">fs_rtp_header_extension_list_from_keyfile</a>
54 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
55 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>,
56 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
57 #define <a class="link" href="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS" title="FS_RTP_HEADER_EXTENSION_FORMAT">FS_RTP_HEADER_EXTENSION_FORMAT</a>
58 #define <a class="link" href="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS" title="FS_RTP_HEADER_EXTENSION_ARGS()">FS_RTP_HEADER_EXTENSION_ARGS</a> (hdrext)
59 <span class="returnvalue">void</span> <a class="link" href="farsight2-libs-Utility-functions.html#fs-utils-set-bitrate" title="fs_utils_set_bitrate ()">fs_utils_set_bitrate</a> (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
60 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> bitrate</code></em>);
61 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-Utility-functions.html#fs-utils-get-default-codec-preferences" title="fs_utils_get_default_codec_preferences ()">fs_utils_get_default_codec_preferences</a>
62 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);
63 <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> * <a class="link" href="farsight2-libs-Utility-functions.html#fs-utils-get-default-element-properties" title="fs_utils_get_default_element_properties ()">fs_utils_get_default_element_properties</a>
64 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);
65 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-Utility-functions.html#fs-utils-get-default-rtp-header-extension-preferences" title="fs_utils_get_default_rtp_header_extension_preferences ()">fs_utils_get_default_rtp_header_extension_preferences</a>
66 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
67 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>);
68 </pre>
69 </div>
70 <div class="refsect1" title="Description">
71 <a name="farsight2-libs-Utility-functions.description"></a><h2>Description</h2>
72 </div>
73 <div class="refsect1" title="Details">
74 <a name="farsight2-libs-Utility-functions.details"></a><h2>Details</h2>
75 <div class="refsect2" title="FsRtpHeaderExtension">
76 <a name="FsRtpHeaderExtension"></a><h3>FsRtpHeaderExtension</h3>
77 <pre class="programlisting">typedef struct {
78 guint id;
79 FsStreamDirection direction;
80 gchar *uri;
81 } FsRtpHeaderExtension;
82 </pre>
83 <p>
84 Defines a RTP header extension with its negotiated identifier, direction
85 and URI. They should only be created with <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new" title="fs_rtp_header_extension_new ()"><code class="function">fs_rtp_header_extension_new()</code></a>.
86 </p>
87 <div class="variablelist"><table border="0">
88 <col align="left" valign="top">
89 <tbody>
90 <tr>
91 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="FsRtpHeaderExtension.id"></a>id</code></em>;</span></p></td>
92 <td>The identifier of the RTP header extension
93 </td>
94 </tr>
95 <tr>
96 <td><p><span class="term"><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> <em class="structfield"><code><a name="FsRtpHeaderExtension.direction"></a>direction</code></em>;</span></p></td>
97 <td>the direction in which this extension can be used
98 </td>
99 </tr>
100 <tr>
101 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="FsRtpHeaderExtension.uri"></a>uri</code></em>;</span></p></td>
102 <td>The URI that defines this extension
103 </td>
104 </tr>
105 </tbody>
106 </table></div>
107 </div>
108 <hr>
109 <div class="refsect2" title="fs_rtp_header_extension_new ()">
110 <a name="fs-rtp-header-extension-new"></a><h3>fs_rtp_header_extension_new ()</h3>
111 <pre class="programlisting"><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * fs_rtp_header_extension_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
112 <em class="parameter"><code><a class="link" href="FsStream.html#FsStreamDirection" title="enum FsStreamDirection"><span class="type">FsStreamDirection</span></a> direction</code></em>,
113 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *uri</code></em>);</pre>
114 <p>
115 Creates a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
116 </p>
117 <div class="variablelist"><table border="0">
118 <col align="left" valign="top">
119 <tbody>
120 <tr>
121 <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
122 <td>The identifier of the RTP header extension
123 </td>
124 </tr>
125 <tr>
126 <td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td>
127 <td>the direction in which this extension can be used
128 </td>
129 </tr>
130 <tr>
131 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
132 <td>The URI that defines this extension
133 </td>
134 </tr>
135 <tr>
136 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
137 <td> a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
138 </td>
139 </tr>
140 </tbody>
141 </table></div>
142 </div>
143 <hr>
144 <div class="refsect2" title="fs_rtp_header_extension_copy ()">
145 <a name="fs-rtp-header-extension-copy"></a><h3>fs_rtp_header_extension_copy ()</h3>
146 <pre class="programlisting"><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="returnvalue">FsRtpHeaderExtension</span></a> * fs_rtp_header_extension_copy (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);</pre>
147 <p>
148 Copies a <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
149 </p>
150 <div class="variablelist"><table border="0">
151 <col align="left" valign="top">
152 <tbody>
153 <tr>
154 <td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td>
155 <td>The RTP header extension definition to copy
156 </td>
157 </tr>
158 <tr>
159 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
160 <td> a new <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
161 </td>
162 </tr>
163 </tbody>
164 </table></div>
165 </div>
166 <hr>
167 <div class="refsect2" title="fs_rtp_header_extension_destroy ()">
168 <a name="fs-rtp-header-extension-destroy"></a><h3>fs_rtp_header_extension_destroy ()</h3>
169 <pre class="programlisting"><span class="returnvalue">void</span> fs_rtp_header_extension_destroy (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension</code></em>);</pre>
170 <p>
171 Frees the passed <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
172 </p>
173 <div class="variablelist"><table border="0">
174 <col align="left" valign="top">
175 <tbody><tr>
176 <td><p><span class="term"><em class="parameter"><code>extension</code></em> :</span></p></td>
177 <td>A RTP header extension to free
178 </td>
179 </tr></tbody>
180 </table></div>
181 </div>
182 <hr>
183 <div class="refsect2" title="fs_rtp_header_extension_are_equal ()">
184 <a name="fs-rtp-header-extension-are-equal"></a><h3>fs_rtp_header_extension_are_equal ()</h3>
185 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> fs_rtp_header_extension_are_equal (<em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension1</code></em>,
186 <em class="parameter"><code><a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> *extension2</code></em>);</pre>
187 <p>
188 Compares two <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> structures
189 </p>
190 <div class="variablelist"><table border="0">
191 <col align="left" valign="top">
192 <tbody>
193 <tr>
194 <td><p><span class="term"><em class="parameter"><code>extension1</code></em> :</span></p></td>
195 <td>The first <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
196 </td>
197 </tr>
198 <tr>
199 <td><p><span class="term"><em class="parameter"><code>extension2</code></em> :</span></p></td>
200 <td>The second <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
201 </td>
202 </tr>
203 <tr>
204 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
205 <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if they are identical, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
206 </td>
207 </tr>
208 </tbody>
209 </table></div>
210 </div>
211 <hr>
212 <div class="refsect2" title="fs_rtp_header_extension_list_copy ()">
213 <a name="fs-rtp-header-extension-list-copy"></a><h3>fs_rtp_header_extension_list_copy ()</h3>
214 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_rtp_header_extension_list_copy (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);</pre>
215 <p>
216 Does a deep copy of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
217 </p>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
220 <tbody>
221 <tr>
222 <td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
223 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
224 </td>
225 </tr>
226 <tr>
227 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
228 <td> a new <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
229 </td>
230 </tr>
231 </tbody>
232 </table></div>
233 </div>
234 <hr>
235 <div class="refsect2" title="fs_rtp_header_extension_list_destroy ()">
236 <a name="fs-rtp-header-extension-list-destroy"></a><h3>fs_rtp_header_extension_list_destroy ()</h3>
237 <pre class="programlisting"><span class="returnvalue">void</span> fs_rtp_header_extension_list_destroy
238 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *extensions</code></em>);</pre>
239 <p>
240 Frees the passed <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
241 </p>
242 <div class="variablelist"><table border="0">
243 <col align="left" valign="top">
244 <tbody><tr>
245 <td><p><span class="term"><em class="parameter"><code>extensions</code></em> :</span></p></td>
246 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
247 </td>
248 </tr></tbody>
249 </table></div>
250 </div>
251 <hr>
252 <div class="refsect2" title="fs_rtp_header_extension_list_from_keyfile ()">
253 <a name="fs-rtp-header-extension-list-from-keyfile"></a><h3>fs_rtp_header_extension_list_from_keyfile ()</h3>
254 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_rtp_header_extension_list_from_keyfile
255 (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
256 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>,
257 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
258 <p>
259 Reads the content of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> of the following format into a
260 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> structures.
261 </p>
262 <p>
263 The groups have a format "rtp-hdrext:audio:XXX" or
264 "rtp-hdrext:video:XXX" where XXX is a unique string (per media type).
265 </p>
266 <p>
267 The valid keys are:
268 </p>
269 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
270 <li class="listitem">id: a int between in the 1-255 and 4096-4351 ranges</li>
271 <li class="listitem">uri: a URI describing the RTP Header Extension</li>
272 <li class="listitem">direction (optional): To only send or receive a RTP Header
273 Extension, possible values are "send", "receive", "none" or "both".
274 Defaults to "both"</li>
275 </ul></div>
276 <p>
277 </p>
278 <p>
279 Example:
280 </p>
281 <div class="informalexample">
282 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
283 <tbody>
284 <tr>
285 <td class="listing_lines" align="right"><pre>1
286 2
287 3
288 4
289 5
290 6
291 7
292 8</pre></td>
293 <td class="listing_code"><pre class="programlisting"><span class="symbol">[</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">audio</span><span class="symbol">:</span><span class="normal">a</span><span class="symbol">]</span>
294 <span class="normal">id</span><span class="symbol">=</span><span class="number">1</span>
295 <span class="normal">uri</span><span class="symbol">=</span><span class="normal">urn</span><span class="symbol">:</span><span class="normal">ietf</span><span class="symbol">:</span><span class="normal">params</span><span class="symbol">:</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">toffset</span>
296
297 <span class="symbol">[</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">audio</span><span class="symbol">:</span><span class="normal">abc</span><span class="symbol">]</span>
298 <span class="normal">id</span><span class="symbol">=</span><span class="number">3</span>
299 <span class="normal">uri</span><span class="symbol">=</span><span class="normal">urn</span><span class="symbol">:</span><span class="normal">ietf</span><span class="symbol">:</span><span class="normal">params</span><span class="symbol">:</span><span class="normal">rtp</span><span class="symbol">-</span><span class="normal">hdrext</span><span class="symbol">:</span><span class="normal">ntp</span><span class="symbol">-</span><span class="number">64</span>
300 <span class="normal">direction</span><span class="symbol">=</span><span class="normal">receive</span></pre></td>
301 </tr>
302 </tbody>
303 </table>
304 </div>
305
306 <p>
307 </p>
308 <div class="variablelist"><table border="0">
309 <col align="left" valign="top">
310 <tbody>
311 <tr>
312 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
313 <td>Name of the <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> to read the RTP Header Extensions from
314 </td>
315 </tr>
316 <tr>
317 <td><p><span class="term"><em class="parameter"><code>media_type</code></em> :</span></p></td>
318 <td>The media type for which to get header extensions
319 </td>
320 </tr>
321 <tr>
322 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
323 <td>location of a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or NULL if no error occured
324 </td>
325 </tr>
326 <tr>
327 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
328 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a> that must be freed with
329 <a class="link" href="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy" title="fs_rtp_header_extension_list_destroy ()"><code class="function">fs_rtp_header_extension_list_destroy()</code></a>
330 </td>
331 </tr>
332 </tbody>
333 </table></div>
334 </div>
335 <hr>
336 <div class="refsect2" title="FS_RTP_HEADER_EXTENSION_FORMAT">
337 <a name="FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"></a><h3>FS_RTP_HEADER_EXTENSION_FORMAT</h3>
338 <pre class="programlisting">#define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s"
339 </pre>
340 <p>
341 A format that can be used in printf like format strings to format a
342 FsRtpHeaderExtension
343 </p>
344 </div>
345 <hr>
346 <div class="refsect2" title="FS_RTP_HEADER_EXTENSION_ARGS()">
347 <a name="FS-RTP-HEADER-EXTENSION-ARGS:CAPS"></a><h3>FS_RTP_HEADER_EXTENSION_ARGS()</h3>
348 <pre class="programlisting">#define FS_RTP_HEADER_EXTENSION_ARGS(hdrext)</pre>
349 <p>
350 Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS
351 </p>
352 <div class="variablelist"><table border="0">
353 <col align="left" valign="top">
354 <tbody><tr>
355 <td><p><span class="term"><em class="parameter"><code>hdrext</code></em> :</span></p></td>
356 <td>a <a class="link" href="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension" title="FsRtpHeaderExtension"><span class="type">FsRtpHeaderExtension</span></a>
357 </td>
358 </tr></tbody>
359 </table></div>
360 </div>
361 <hr>
362 <div class="refsect2" title="fs_utils_set_bitrate ()">
363 <a name="fs-utils-set-bitrate"></a><h3>fs_utils_set_bitrate ()</h3>
364 <pre class="programlisting"><span class="returnvalue">void</span> fs_utils_set_bitrate (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
365 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#glong"><span class="type">glong</span></a> bitrate</code></em>);</pre>
366 <p>
367 This allows setting the bitrate on all elements that have a "bitrate"
368 property without having to know the type or of the unit used by that element.
369 </p>
370 <p>
371 This will be obsolete in 0.11 (when all elements use bit/sec for the
372 "bitrate" property.
373 </p>
374 <div class="variablelist"><table border="0">
375 <col align="left" valign="top">
376 <tbody>
377 <tr>
378 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
379 <td>The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>
380 </td>
381 </tr>
382 <tr>
383 <td><p><span class="term"><em class="parameter"><code>bitrate</code></em> :</span></p></td>
384 <td>The bitrate in bits/sec
385 </td>
386 </tr>
387 </tbody>
388 </table></div>
389 </div>
390 <hr>
391 <div class="refsect2" title="fs_utils_get_default_codec_preferences ()">
392 <a name="fs-utils-get-default-codec-preferences"></a><h3>fs_utils_get_default_codec_preferences ()</h3>
393 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_utils_get_default_codec_preferences
394 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);</pre>
395 <p>
396 These default codec preferences should work with the elements that are
397 available in the main GStreamer element repositories.
398 They should be suitable for standards based protocols like SIP or XMPP.
399 </p>
400 <div class="variablelist"><table border="0">
401 <col align="left" valign="top">
402 <tbody>
403 <tr>
404 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
405 <td>Element for which to fetch default codec preferences
406 </td>
407 </tr>
408 <tr>
409 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
410 <td> The default codec preferences for this plugin,
411 this <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> should be freed with <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-list-destroy" title="fs_codec_list_destroy ()"><code class="function">fs_codec_list_destroy()</code></a>
412 </td>
413 </tr>
414 </tbody>
415 </table></div>
416 </div>
417 <hr>
418 <div class="refsect2" title="fs_utils_get_default_element_properties ()">
419 <a name="fs-utils-get-default-element-properties"></a><h3>fs_utils_get_default_element_properties ()</h3>
420 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> * fs_utils_get_default_element_properties
421 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);</pre>
422 <p>
423 This function produces a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> that can be fed to
424 <a class="link" href="FsElementAddedNotifier.html#fs-element-added-notifier-set-properties-from-keyfile" title="fs_element_added_notifier_set_properties_from_keyfile ()"><code class="function">fs_element_added_notifier_set_properties_from_keyfile()</code></a>. If no
425 default properties have been found, it will return <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
426 </p>
427 <div class="variablelist"><table border="0">
428 <col align="left" valign="top">
429 <tbody>
430 <tr>
431 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
432 <td>Element for which to fetch default element properties
433 </td>
434 </tr>
435 <tr>
436 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
437 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> containing the default element properties for this
438 element or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no properties were found. Caller must free
439 the <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> when he is done.
440 </td>
441 </tr>
442 </tbody>
443 </table></div>
444 </div>
445 <hr>
446 <div class="refsect2" title="fs_utils_get_default_rtp_header_extension_preferences ()">
447 <a name="fs-utils-get-default-rtp-header-extension-preferences"></a><h3>fs_utils_get_default_rtp_header_extension_preferences ()</h3>
448 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_utils_get_default_rtp_header_extension_preferences
449 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
450 <em class="parameter"><code><a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> media_type</code></em>);</pre>
451 <p>
452 These default rtp header extension preferences should work with the elements
453 that are available in the main GStreamer element repositories.
454 They should be suitable for standards based protocols like SIP or XMPP.
455 </p>
456 <div class="variablelist"><table border="0">
457 <col align="left" valign="top">
458 <tbody>
459 <tr>
460 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
461 <td>Element for which to fetch default RTP Header Extension preferences
462 </td>
463 </tr>
464 <tr>
465 <td><p><span class="term"><em class="parameter"><code>media_type</code></em> :</span></p></td>
466 <td>The <a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType"><span class="type">FsMediaType</span></a> for which to get default RTP Header Extension
467 preferences
468 </td>
469 </tr>
470 <tr>
471 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
472 <td> The default rtp header extension preferences for this plugin,
473 this <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> should be freed with <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-list-destroy" title="fs_codec_list_destroy ()"><code class="function">fs_codec_list_destroy()</code></a>
474 </td>
475 </tr>
476 </tbody>
477 </table></div>
478 </div>
479 </div>
480 </div>
481 <div class="footer">
482 <hr>
483 Generated by GTK-Doc V1.15</div>
484 </body>
485 </html>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsSession</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="ch02.html" title="Farsight Core Library">
88 <link rel="prev" href="FsParticipant.html" title="FsParticipant">
121121 of type <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMessage.html#GST-MESSAGE-ELEMENT:CAPS"><span class="type">GST_MESSAGE_ELEMENT</span></a> sent over the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBus.html"><span class="type">GstBus</span></a>.
122122 </p>
123123 <div class="refsect2" title='The "farsight-send-codec-changed" message'>
124 <a name="id376154"></a><h3>The "<code class="literal">farsight-send-codec-changed</code>"
124 <a name="id493898"></a><h3>The "<code class="literal">farsight-send-codec-changed</code>"
125125 message</h3>
126126 <div class="informalexample">
127127 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
147147 </div>
148148 <hr>
149149 <div class="refsect2" title='The "farsight-codecs-changed" message'>
150 <a name="id376214"></a><h3>The "<code class="literal">farsight-codecs-changed</code>"
150 <a name="id493958"></a><h3>The "<code class="literal">farsight-codecs-changed</code>"
151151 message</h3>
152152 <div class="informalexample">
153153 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
+0
-114
docs/libs/html/farsight2-libs-fs-utils.html less more
0 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4 <title>fs-utils</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
6 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
7 <link rel="up" href="ch03.html" title="Farsight Utility Functions and Objects">
8 <link rel="prev" href="farsight2-libs-Network-interfaces-discovery.html" title="Network interfaces discovery">
9 <link rel="next" href="pt02.html" title="Part II. Classes used to implement Farsight plugins">
10 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
11 <link rel="stylesheet" href="style.css" type="text/css">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
15 <tr valign="middle">
16 <td><a accesskey="p" href="farsight2-libs-Network-interfaces-discovery.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">Farsight2 Reference Manual</th>
20 <td><a accesskey="n" href="pt02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr>
22 <tr><td colspan="5" class="shortcuts">
23 <a href="#farsight2-libs-fs-utils.synopsis" class="shortcut">Top</a>
24  | 
25 <a href="#farsight2-libs-fs-utils.description" class="shortcut">Description</a>
26 </td></tr>
27 </table>
28 <div class="refentry" title="fs-utils">
29 <a name="farsight2-libs-fs-utils"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="farsight2-libs-fs-utils.top_of_page"></a>fs-utils</span></h2>
33 <p>fs-utils — Miscellaneous useful functions</p>
34 </td>
35 <td valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsynopsisdiv" title="Synopsis">
38 <a name="farsight2-libs-fs-utils.synopsis"></a><h2>Synopsis</h2>
39 <pre class="synopsis">
40 #include &lt;gst/farsight/fs-utils.h&gt;
41
42 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="farsight2-libs-fs-utils.html#fs-utils-get-default-codec-preferences" title="fs_utils_get_default_codec_preferences ()">fs_utils_get_default_codec_preferences</a>
43 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);
44 <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> * <a class="link" href="farsight2-libs-fs-utils.html#fs-utils-get-default-element-properties" title="fs_utils_get_default_element_properties ()">fs_utils_get_default_element_properties</a>
45 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);
46 </pre>
47 </div>
48 <div class="refsect1" title="Description">
49 <a name="farsight2-libs-fs-utils.description"></a><h2>Description</h2>
50 </div>
51 <div class="refsect1" title="Details">
52 <a name="farsight2-libs-fs-utils.details"></a><h2>Details</h2>
53 <div class="refsect2" title="fs_utils_get_default_codec_preferences ()">
54 <a name="fs-utils-get-default-codec-preferences"></a><h3>fs_utils_get_default_codec_preferences ()</h3>
55 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * fs_utils_get_default_codec_preferences
56 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);</pre>
57 <p>
58 These default codec preferences should work with the elements that are
59 available in the main GStreamer element repositories.
60 They should be suitable for standards based protocols like SIP or XMPP.
61 </p>
62 <div class="variablelist"><table border="0">
63 <col align="left" valign="top">
64 <tbody>
65 <tr>
66 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
67 <td>Element for which to fetch default codec preferences
68 </td>
69 </tr>
70 <tr>
71 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
72 <td> The default codec preferences for this plugin,
73 this <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> should be freed with <a class="link" href="farsight2-libs-FsCodec.html#fs-codec-list-destroy" title="fs_codec_list_destroy ()"><code class="function">fs_codec_list_destroy()</code></a>
74 </td>
75 </tr>
76 </tbody>
77 </table></div>
78 </div>
79 <hr>
80 <div class="refsect2" title="fs_utils_get_default_element_properties ()">
81 <a name="fs-utils-get-default-element-properties"></a><h3>fs_utils_get_default_element_properties ()</h3>
82 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="returnvalue">GKeyFile</span></a> * fs_utils_get_default_element_properties
83 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>);</pre>
84 <p>
85 This function produces a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> that can be fed to
86 <a class="link" href="FsElementAddedNotifier.html#fs-element-added-notifier-set-properties-from-keyfile" title="fs_element_added_notifier_set_properties_from_keyfile ()"><code class="function">fs_element_added_notifier_set_properties_from_keyfile()</code></a>. If no
87 default properties have been found, it will return <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
88 </p>
89 <div class="variablelist"><table border="0">
90 <col align="left" valign="top">
91 <tbody>
92 <tr>
93 <td><p><span class="term"><em class="parameter"><code>element</code></em> :</span></p></td>
94 <td>Element for which to fetch default element properties
95 </td>
96 </tr>
97 <tr>
98 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
99 <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> containing the default element properties for this
100 element or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no properties were found. Caller must free
101 the <a href="http://library.gnome.org/devel/glib/unstable/glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> when he is done.
102 </td>
103 </tr>
104 </tbody>
105 </table></div>
106 </div>
107 </div>
108 </div>
109 <div class="footer">
110 <hr>
111 Generated by GTK-Doc V1.15</div>
112 </body>
113 </html>
1212 <sub name="FsCandidate" link="farsight2-libs-FsCandidate.html"/>
1313 <sub name="FsCodec" link="farsight2-libs-FsCodec.html"/>
1414 </sub>
15 <sub name="Farsight Utility Functions and Objects" link="ch03.html">
15 <sub name="Protocol Specific types" link="ch03.html">
16 <sub name="RTP Specific types" link="farsight2-libs-RTP-Specific-types.html"/>
17 </sub>
18 <sub name="Farsight Utility Functions and Objects" link="ch04.html">
1619 <sub name="FsElementAddedNotifier" link="FsElementAddedNotifier.html"/>
1720 <sub name="Network interfaces discovery" link="farsight2-libs-Network-interfaces-discovery.html"/>
18 <sub name="fs-utils" link="farsight2-libs-fs-utils.html"/>
21 <sub name="Utility functions" link="farsight2-libs-Utility-functions.html"/>
1922 </sub>
2023 </sub>
2124 <sub name="Classes used to implement Farsight plugins" link="pt02.html">
22 <sub name="Farsight Classes Base Implementations" link="ch04.html">
25 <sub name="Farsight Classes Base Implementations" link="ch05.html">
2326 <sub name="FsBaseConference" link="FsBaseConference.html"/>
2427 </sub>
25 <sub name="Farsight Transmitter Classes" link="ch05.html">
28 <sub name="Farsight Transmitter Classes" link="ch06.html">
2629 <sub name="FsTransmitter" link="FsTransmitter.html"/>
2730 <sub name="FsStreamTransmitter" link="FsStreamTransmitter.html"/>
2831 </sub>
29 <sub name="Farsight Plugins Infrastructure" link="ch06.html">
32 <sub name="Farsight Plugins Infrastructure" link="ch07.html">
3033 <sub name="FsPlugin" link="farsight2-libs-FsPlugin.html"/>
3134 </sub>
3235 </sub>
3336 </chapters>
3437 <functions>
35 <function name="The &quot;farsight-error&quot; message" link="FsConference.html#id318267"/>
38 <function name="The &quot;farsight-error&quot; message" link="FsConference.html#id415196"/>
3639 <function name="FsConference" link="FsConference.html#FsConference-struct"/>
3740 <function name="fs_conference_new_session ()" link="FsConference.html#fs-conference-new-session"/>
3841 <function name="fs_conference_new_participant ()" link="FsConference.html#fs-conference-new-participant"/>
4548 <function name="FS_PARTICIPANT_DATA_UNLOCK()" link="FsParticipant.html#FS-PARTICIPANT-DATA-UNLOCK:CAPS"/>
4649 <function name="The &quot;cname&quot; property" link="FsParticipant.html#FsParticipant--cname"/>
4750 <function name="The &quot;error&quot; signal" link="FsParticipant.html#FsParticipant-error"/>
48 <function name="The &quot;farsight-send-codec-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id376154"/>
49 <function name="The &quot;farsight-codecs-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id376214"/>
51 <function name="The &quot;farsight-send-codec-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id493898"/>
52 <function name="The &quot;farsight-codecs-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id493958"/>
5053 <function name="enum FsDTMFEvent" link="farsight2-libs-fs-session.html#FsDTMFEvent"/>
5154 <function name="enum FsDTMFMethod" link="farsight2-libs-fs-session.html#FsDTMFMethod"/>
5255 <function name="FsSession" link="farsight2-libs-fs-session.html#FsSession-struct"/>
6972 <function name="The &quot;sink-pad&quot; property" link="farsight2-libs-fs-session.html#FsSession--sink-pad"/>
7073 <function name="The &quot;tos&quot; property" link="farsight2-libs-fs-session.html#FsSession--tos"/>
7174 <function name="The &quot;error&quot; signal" link="farsight2-libs-fs-session.html#FsSession-error"/>
72 <function name="The &quot;farsight-new-local-candidate&quot; message" link="FsStream.html#id398080"/>
73 <function name="The &quot;farsight-local-candidates-prepared&quot; message" link="FsStream.html#id398116"/>
74 <function name="The &quot;farsight-new-active-candidate-pair&quot; message" link="FsStream.html#id398146"/>
75 <function name="The &quot;farsight-recv-codecs-changed&quot; message" link="FsStream.html#id398190"/>
76 <function name="The &quot;farsight-component-state-changed&quot; message" link="FsStream.html#id398254"/>
75 <function name="The &quot;farsight-new-local-candidate&quot; message" link="FsStream.html#id498750"/>
76 <function name="The &quot;farsight-local-candidates-prepared&quot; message" link="FsStream.html#id498786"/>
77 <function name="The &quot;farsight-new-active-candidate-pair&quot; message" link="FsStream.html#id498816"/>
78 <function name="The &quot;farsight-recv-codecs-changed&quot; message" link="FsStream.html#id498860"/>
79 <function name="The &quot;farsight-component-state-changed&quot; message" link="FsStream.html#id498924"/>
7780 <function name="FsStream" link="FsStream.html#FsStream-struct"/>
7881 <function name="FsStreamClass" link="FsStream.html#FsStreamClass"/>
7982 <function name="enum FsStreamDirection" link="FsStream.html#FsStreamDirection"/>
105108 <function name="FsCodec" link="farsight2-libs-FsCodec.html#FsCodec"/>
106109 <function name="enum FsMediaType" link="farsight2-libs-FsCodec.html#FsMediaType"/>
107110 <function name="FsCodecParameter" link="farsight2-libs-FsCodec.html#FsCodecParameter"/>
111 <function name="FsFeedbackParameter" link="farsight2-libs-FsCodec.html#FsFeedbackParameter"/>
108112 <function name="FS_CODEC_ID_ANY" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS"/>
109113 <function name="FS_CODEC_ID_DISABLE" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS"/>
110114 <function name="fs_codec_new ()" link="farsight2-libs-FsCodec.html#fs-codec-new"/>
119123 <function name="fs_codec_add_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter"/>
120124 <function name="fs_codec_remove_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter"/>
121125 <function name="fs_codec_get_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-get-optional-parameter"/>
126 <function name="fs_codec_add_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-feedback-parameter"/>
127 <function name="fs_codec_get_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-get-feedback-parameter"/>
128 <function name="fs_codec_remove_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-feedback-parameter"/>
122129 <function name="FS_CODEC_FORMAT" link="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS"/>
123130 <function name="FS_CODEC_ARGS()" link="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS"/>
124131 <function name="fs_media_type_to_string ()" link="farsight2-libs-FsCodec.html#fs-media-type-to-string"/>
132 <function name="FsRtpHeaderExtension" link="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension"/>
133 <function name="fs_rtp_header_extension_new ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new"/>
134 <function name="fs_rtp_header_extension_copy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-copy"/>
135 <function name="fs_rtp_header_extension_destroy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-destroy"/>
136 <function name="fs_rtp_header_extension_are_equal ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-are-equal"/>
137 <function name="fs_rtp_header_extension_list_copy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-copy"/>
138 <function name="fs_rtp_header_extension_list_destroy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy"/>
139 <function name="fs_rtp_header_extension_list_from_keyfile ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-from-keyfile"/>
140 <function name="FS_RTP_HEADER_EXTENSION_FORMAT" link="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"/>
141 <function name="FS_RTP_HEADER_EXTENSION_ARGS()" link="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS"/>
125142 <function name="FsElementAddedNotifier" link="FsElementAddedNotifier.html#FsElementAddedNotifier-struct"/>
126143 <function name="fs_element_added_notifier_new ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-new"/>
127144 <function name="fs_element_added_notifier_add ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-add"/>
132149 <function name="fs_interfaces_get_ip_for_interface ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-ip-for-interface"/>
133150 <function name="fs_interfaces_get_local_interfaces ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces"/>
134151 <function name="fs_interfaces_get_local_ips ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-ips"/>
135 <function name="fs_utils_get_default_codec_preferences ()" link="farsight2-libs-fs-utils.html#fs-utils-get-default-codec-preferences"/>
136 <function name="fs_utils_get_default_element_properties ()" link="farsight2-libs-fs-utils.html#fs-utils-get-default-element-properties"/>
152 <function name="FsRtpHeaderExtension" link="farsight2-libs-Utility-functions.html#FsRtpHeaderExtension"/>
153 <function name="fs_rtp_header_extension_new ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-new"/>
154 <function name="fs_rtp_header_extension_copy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-copy"/>
155 <function name="fs_rtp_header_extension_destroy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-destroy"/>
156 <function name="fs_rtp_header_extension_are_equal ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-are-equal"/>
157 <function name="fs_rtp_header_extension_list_copy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-copy"/>
158 <function name="fs_rtp_header_extension_list_destroy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-destroy"/>
159 <function name="fs_rtp_header_extension_list_from_keyfile ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-from-keyfile"/>
160 <function name="FS_RTP_HEADER_EXTENSION_FORMAT" link="farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"/>
161 <function name="FS_RTP_HEADER_EXTENSION_ARGS()" link="farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS"/>
162 <function name="fs_utils_set_bitrate ()" link="farsight2-libs-Utility-functions.html#fs-utils-set-bitrate"/>
163 <function name="fs_utils_get_default_codec_preferences ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-codec-preferences"/>
164 <function name="fs_utils_get_default_element_properties ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-element-properties"/>
165 <function name="fs_utils_get_default_rtp_header_extension_preferences ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-rtp-header-extension-preferences"/>
137166 <function name="FsBaseConference" link="FsBaseConference.html#FsBaseConference-struct"/>
138167 <function name="FsBaseConferenceClass" link="FsBaseConference.html#FsBaseConferenceClass"/>
139168 <function name="FsTransmitter" link="FsTransmitter.html#FsTransmitter-struct"/>
1212 <sub name="FsCandidate" link="farsight2-libs-FsCandidate.html"/>
1313 <sub name="FsCodec" link="farsight2-libs-FsCodec.html"/>
1414 </sub>
15 <sub name="Farsight Utility Functions and Objects" link="ch03.html">
15 <sub name="Protocol Specific types" link="ch03.html">
16 <sub name="RTP Specific types" link="farsight2-libs-RTP-Specific-types.html"/>
17 </sub>
18 <sub name="Farsight Utility Functions and Objects" link="ch04.html">
1619 <sub name="FsElementAddedNotifier" link="FsElementAddedNotifier.html"/>
1720 <sub name="Network interfaces discovery" link="farsight2-libs-Network-interfaces-discovery.html"/>
18 <sub name="fs-utils" link="farsight2-libs-fs-utils.html"/>
21 <sub name="Utility functions" link="farsight2-libs-Utility-functions.html"/>
1922 </sub>
2023 </sub>
2124 <sub name="Classes used to implement Farsight plugins" link="pt02.html">
22 <sub name="Farsight Classes Base Implementations" link="ch04.html">
25 <sub name="Farsight Classes Base Implementations" link="ch05.html">
2326 <sub name="FsBaseConference" link="FsBaseConference.html"/>
2427 </sub>
25 <sub name="Farsight Transmitter Classes" link="ch05.html">
28 <sub name="Farsight Transmitter Classes" link="ch06.html">
2629 <sub name="FsTransmitter" link="FsTransmitter.html"/>
2730 <sub name="FsStreamTransmitter" link="FsStreamTransmitter.html"/>
2831 </sub>
29 <sub name="Farsight Plugins Infrastructure" link="ch06.html">
32 <sub name="Farsight Plugins Infrastructure" link="ch07.html">
3033 <sub name="FsPlugin" link="farsight2-libs-FsPlugin.html"/>
3134 </sub>
3235 </sub>
3336 </chapters>
3437 <functions>
35 <keyword type="" name="The &quot;farsight-error&quot; message" link="FsConference.html#id318267"/>
38 <keyword type="" name="The &quot;farsight-error&quot; message" link="FsConference.html#id415196"/>
3639 <keyword type="struct" name="FsConference" link="FsConference.html#FsConference-struct"/>
3740 <keyword type="function" name="fs_conference_new_session ()" link="FsConference.html#fs-conference-new-session"/>
3841 <keyword type="function" name="fs_conference_new_participant ()" link="FsConference.html#fs-conference-new-participant"/>
4548 <keyword type="macro" name="FS_PARTICIPANT_DATA_UNLOCK()" link="FsParticipant.html#FS-PARTICIPANT-DATA-UNLOCK:CAPS"/>
4649 <keyword type="property" name="The &quot;cname&quot; property" link="FsParticipant.html#FsParticipant--cname"/>
4750 <keyword type="signal" name="The &quot;error&quot; signal" link="FsParticipant.html#FsParticipant-error"/>
48 <keyword type="" name="The &quot;farsight-send-codec-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id376154"/>
49 <keyword type="" name="The &quot;farsight-codecs-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id376214"/>
51 <keyword type="" name="The &quot;farsight-send-codec-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id493898"/>
52 <keyword type="" name="The &quot;farsight-codecs-changed&quot;&#10; message" link="farsight2-libs-fs-session.html#id493958"/>
5053 <keyword type="enum" name="enum FsDTMFEvent" link="farsight2-libs-fs-session.html#FsDTMFEvent"/>
5154 <keyword type="enum" name="enum FsDTMFMethod" link="farsight2-libs-fs-session.html#FsDTMFMethod"/>
5255 <keyword type="struct" name="FsSession" link="farsight2-libs-fs-session.html#FsSession-struct"/>
6972 <keyword type="property" name="The &quot;sink-pad&quot; property" link="farsight2-libs-fs-session.html#FsSession--sink-pad"/>
7073 <keyword type="property" name="The &quot;tos&quot; property" link="farsight2-libs-fs-session.html#FsSession--tos"/>
7174 <keyword type="signal" name="The &quot;error&quot; signal" link="farsight2-libs-fs-session.html#FsSession-error"/>
72 <keyword type="" name="The &quot;farsight-new-local-candidate&quot; message" link="FsStream.html#id398080"/>
73 <keyword type="" name="The &quot;farsight-local-candidates-prepared&quot; message" link="FsStream.html#id398116"/>
74 <keyword type="" name="The &quot;farsight-new-active-candidate-pair&quot; message" link="FsStream.html#id398146"/>
75 <keyword type="" name="The &quot;farsight-recv-codecs-changed&quot; message" link="FsStream.html#id398190"/>
76 <keyword type="" name="The &quot;farsight-component-state-changed&quot; message" link="FsStream.html#id398254"/>
75 <keyword type="" name="The &quot;farsight-new-local-candidate&quot; message" link="FsStream.html#id498750"/>
76 <keyword type="" name="The &quot;farsight-local-candidates-prepared&quot; message" link="FsStream.html#id498786"/>
77 <keyword type="" name="The &quot;farsight-new-active-candidate-pair&quot; message" link="FsStream.html#id498816"/>
78 <keyword type="" name="The &quot;farsight-recv-codecs-changed&quot; message" link="FsStream.html#id498860"/>
79 <keyword type="" name="The &quot;farsight-component-state-changed&quot; message" link="FsStream.html#id498924"/>
7780 <keyword type="struct" name="FsStream" link="FsStream.html#FsStream-struct"/>
7881 <keyword type="struct" name="FsStreamClass" link="FsStream.html#FsStreamClass"/>
7982 <keyword type="enum" name="enum FsStreamDirection" link="FsStream.html#FsStreamDirection"/>
105108 <keyword type="struct" name="FsCodec" link="farsight2-libs-FsCodec.html#FsCodec"/>
106109 <keyword type="enum" name="enum FsMediaType" link="farsight2-libs-FsCodec.html#FsMediaType"/>
107110 <keyword type="struct" name="FsCodecParameter" link="farsight2-libs-FsCodec.html#FsCodecParameter"/>
111 <keyword type="struct" name="FsFeedbackParameter" link="farsight2-libs-FsCodec.html#FsFeedbackParameter"/>
108112 <keyword type="macro" name="FS_CODEC_ID_ANY" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS"/>
109113 <keyword type="macro" name="FS_CODEC_ID_DISABLE" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS"/>
110114 <keyword type="function" name="fs_codec_new ()" link="farsight2-libs-FsCodec.html#fs-codec-new"/>
119123 <keyword type="function" name="fs_codec_add_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter"/>
120124 <keyword type="function" name="fs_codec_remove_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter"/>
121125 <keyword type="function" name="fs_codec_get_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-get-optional-parameter"/>
126 <keyword type="function" name="fs_codec_add_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-feedback-parameter"/>
127 <keyword type="function" name="fs_codec_get_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-get-feedback-parameter"/>
128 <keyword type="function" name="fs_codec_remove_feedback_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-feedback-parameter"/>
122129 <keyword type="macro" name="FS_CODEC_FORMAT" link="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS"/>
123130 <keyword type="macro" name="FS_CODEC_ARGS()" link="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS"/>
124131 <keyword type="function" name="fs_media_type_to_string ()" link="farsight2-libs-FsCodec.html#fs-media-type-to-string"/>
132 <keyword type="struct" name="FsRtpHeaderExtension" link="farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension"/>
133 <keyword type="function" name="fs_rtp_header_extension_new ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new"/>
134 <keyword type="function" name="fs_rtp_header_extension_copy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-copy"/>
135 <keyword type="function" name="fs_rtp_header_extension_destroy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-destroy"/>
136 <keyword type="function" name="fs_rtp_header_extension_are_equal ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-are-equal"/>
137 <keyword type="function" name="fs_rtp_header_extension_list_copy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-copy"/>
138 <keyword type="function" name="fs_rtp_header_extension_list_destroy ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy"/>
139 <keyword type="function" name="fs_rtp_header_extension_list_from_keyfile ()" link="farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-from-keyfile"/>
140 <keyword type="macro" name="FS_RTP_HEADER_EXTENSION_FORMAT" link="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"/>
141 <keyword type="macro" name="FS_RTP_HEADER_EXTENSION_ARGS()" link="farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS"/>
125142 <keyword type="struct" name="FsElementAddedNotifier" link="FsElementAddedNotifier.html#FsElementAddedNotifier-struct"/>
126143 <keyword type="function" name="fs_element_added_notifier_new ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-new"/>
127144 <keyword type="function" name="fs_element_added_notifier_add ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-add"/>
132149 <keyword type="function" name="fs_interfaces_get_ip_for_interface ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-ip-for-interface"/>
133150 <keyword type="function" name="fs_interfaces_get_local_interfaces ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces"/>
134151 <keyword type="function" name="fs_interfaces_get_local_ips ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-ips"/>
135 <keyword type="function" name="fs_utils_get_default_codec_preferences ()" link="farsight2-libs-fs-utils.html#fs-utils-get-default-codec-preferences"/>
136 <keyword type="function" name="fs_utils_get_default_element_properties ()" link="farsight2-libs-fs-utils.html#fs-utils-get-default-element-properties"/>
152 <keyword type="struct" name="FsRtpHeaderExtension" link="farsight2-libs-Utility-functions.html#FsRtpHeaderExtension"/>
153 <keyword type="function" name="fs_rtp_header_extension_new ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-new"/>
154 <keyword type="function" name="fs_rtp_header_extension_copy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-copy"/>
155 <keyword type="function" name="fs_rtp_header_extension_destroy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-destroy"/>
156 <keyword type="function" name="fs_rtp_header_extension_are_equal ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-are-equal"/>
157 <keyword type="function" name="fs_rtp_header_extension_list_copy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-copy"/>
158 <keyword type="function" name="fs_rtp_header_extension_list_destroy ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-destroy"/>
159 <keyword type="function" name="fs_rtp_header_extension_list_from_keyfile ()" link="farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-from-keyfile"/>
160 <keyword type="macro" name="FS_RTP_HEADER_EXTENSION_FORMAT" link="farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS"/>
161 <keyword type="macro" name="FS_RTP_HEADER_EXTENSION_ARGS()" link="farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS"/>
162 <keyword type="function" name="fs_utils_set_bitrate ()" link="farsight2-libs-Utility-functions.html#fs-utils-set-bitrate"/>
163 <keyword type="function" name="fs_utils_get_default_codec_preferences ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-codec-preferences"/>
164 <keyword type="function" name="fs_utils_get_default_element_properties ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-element-properties"/>
165 <keyword type="function" name="fs_utils_get_default_rtp_header_extension_preferences ()" link="farsight2-libs-Utility-functions.html#fs-utils-get-default-rtp-header-extension-preferences"/>
137166 <keyword type="struct" name="FsBaseConference" link="FsBaseConference.html#FsBaseConference-struct"/>
138167 <keyword type="struct" name="FsBaseConferenceClass" link="FsBaseConference.html#FsBaseConferenceClass"/>
139168 <keyword type="struct" name="FsTransmitter" link="FsTransmitter.html#FsTransmitter-struct"/>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Farsight2 Reference Manual</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="next" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions">
88 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1414 <div>
1515 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Farsight2 Reference Manual</p></th></tr></table></div>
1616 <div><p class="releaseinfo">
17 for version 0.0.25.1.
17 for version 0.0.28.
1818 The latest version of this documentation can be found on-line at
1919 <a class="ulink" href="http://farsight.freedesktop.org/apidoc/farsight2/" target="_top">http://farsight.freedesktop.org/apidoc/farsight2/</a>.
2020 The bases classes are implemented by multiple plugins described in
4848 <span class="refentrytitle"><a href="farsight2-libs-FsCodec.html">FsCodec</a></span><span class="refpurpose"> — Structure representing a media codec</span>
4949 </dt>
5050 </dl></dd>
51 <dt><span class="chapter"><a href="ch03.html">Farsight Utility Functions and Objects</a></span></dt>
51 <dt><span class="chapter"><a href="ch03.html">Protocol Specific types</a></span></dt>
52 <dd><dl><dt>
53 <span class="refentrytitle"><a href="farsight2-libs-RTP-Specific-types.html">RTP Specific types</a></span><span class="refpurpose"></span>
54 </dt></dl></dd>
55 <dt><span class="chapter"><a href="ch04.html">Farsight Utility Functions and Objects</a></span></dt>
5256 <dd><dl>
5357 <dt>
5458 <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span>
5761 <span class="refentrytitle"><a href="farsight2-libs-Network-interfaces-discovery.html">Network interfaces discovery</a></span><span class="refpurpose"> — Utility functions to discover local network interfaces</span>
5862 </dt>
5963 <dt>
60 <span class="refentrytitle"><a href="farsight2-libs-fs-utils.html">fs-utils</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
64 <span class="refentrytitle"><a href="farsight2-libs-Utility-functions.html">Utility functions</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
6165 </dt>
6266 </dl></dd>
6367 </dl></dd>
6468 <dt><span class="part"><a href="pt02.html">II. Classes used to implement Farsight plugins</a></span></dt>
6569 <dd><dl>
66 <dt><span class="chapter"><a href="ch04.html">Farsight Classes Base Implementations</a></span></dt>
70 <dt><span class="chapter"><a href="ch05.html">Farsight Classes Base Implementations</a></span></dt>
6771 <dd><dl><dt>
6872 <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span>
6973 </dt></dl></dd>
70 <dt><span class="chapter"><a href="ch05.html">Farsight Transmitter Classes</a></span></dt>
74 <dt><span class="chapter"><a href="ch06.html">Farsight Transmitter Classes</a></span></dt>
7175 <dd><dl>
7276 <dt>
7377 <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span>
7781 information to a transmitter.</span>
7882 </dt>
7983 </dl></dd>
80 <dt><span class="chapter"><a href="ch06.html">Farsight Plugins Infrastructure</a></span></dt>
84 <dt><span class="chapter"><a href="ch07.html">Farsight Plugins Infrastructure</a></span></dt>
8185 <dd><dl><dt>
8286 <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span>
8387 </dt></dl></dd>
145145 <ANCHOR id="FS-MEDIA-TYPE-VIDEO:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-MEDIA-TYPE-VIDEO:CAPS">
146146 <ANCHOR id="FS-MEDIA-TYPE-LAST:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-MEDIA-TYPE-LAST:CAPS">
147147 <ANCHOR id="FsCodecParameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FsCodecParameter">
148 <ANCHOR id="FsFeedbackParameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FsFeedbackParameter">
148149 <ANCHOR id="FS-CODEC-ID-ANY:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS">
149150 <ANCHOR id="FS-CODEC-ID-DISABLE:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS">
150151 <ANCHOR id="fs-codec-new" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-new">
159160 <ANCHOR id="fs-codec-add-optional-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter">
160161 <ANCHOR id="fs-codec-remove-optional-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter">
161162 <ANCHOR id="fs-codec-get-optional-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-get-optional-parameter">
163 <ANCHOR id="fs-codec-add-feedback-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-add-feedback-parameter">
164 <ANCHOR id="fs-codec-get-feedback-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-get-feedback-parameter">
165 <ANCHOR id="fs-codec-remove-feedback-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-remove-feedback-parameter">
162166 <ANCHOR id="FS-CODEC-FORMAT:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS">
163167 <ANCHOR id="FS-CODEC-ARGS:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS">
164168 <ANCHOR id="fs-media-type-to-string" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-media-type-to-string">
169 <ANCHOR id="farsight2-libs-RTP-Specific-types" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html">
170 <ANCHOR id="farsight2-libs-RTP-Specific-types.synopsis" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#farsight2-libs-RTP-Specific-types.synopsis">
171 <ANCHOR id="farsight2-libs-RTP-Specific-types.description" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#farsight2-libs-RTP-Specific-types.description">
172 <ANCHOR id="farsight2-libs-RTP-Specific-types.details" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#farsight2-libs-RTP-Specific-types.details">
173 <ANCHOR id="FsRtpHeaderExtension" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#FsRtpHeaderExtension">
174 <ANCHOR id="fs-rtp-header-extension-new" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-new">
175 <ANCHOR id="fs-rtp-header-extension-copy" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-copy">
176 <ANCHOR id="fs-rtp-header-extension-destroy" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-destroy">
177 <ANCHOR id="fs-rtp-header-extension-are-equal" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-are-equal">
178 <ANCHOR id="fs-rtp-header-extension-list-copy" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-copy">
179 <ANCHOR id="fs-rtp-header-extension-list-destroy" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-destroy">
180 <ANCHOR id="fs-rtp-header-extension-list-from-keyfile" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#fs-rtp-header-extension-list-from-keyfile">
181 <ANCHOR id="FS-RTP-HEADER-EXTENSION-FORMAT:CAPS" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS">
182 <ANCHOR id="FS-RTP-HEADER-EXTENSION-ARGS:CAPS" href="farsight2-libs-0.10/farsight2-libs-RTP-Specific-types.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS">
165183 <ANCHOR id="FsElementAddedNotifier" href="farsight2-libs-0.10/FsElementAddedNotifier.html">
166184 <ANCHOR id="FsElementAddedNotifier.synopsis" href="farsight2-libs-0.10/FsElementAddedNotifier.html#FsElementAddedNotifier.synopsis">
167185 <ANCHOR id="FsElementAddedNotifier.object-hierarchy" href="farsight2-libs-0.10/FsElementAddedNotifier.html#FsElementAddedNotifier.object-hierarchy">
183201 <ANCHOR id="fs-interfaces-get-ip-for-interface" href="farsight2-libs-0.10/farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-ip-for-interface">
184202 <ANCHOR id="fs-interfaces-get-local-interfaces" href="farsight2-libs-0.10/farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces">
185203 <ANCHOR id="fs-interfaces-get-local-ips" href="farsight2-libs-0.10/farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-ips">
186 <ANCHOR id="farsight2-libs-fs-utils" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html">
187 <ANCHOR id="farsight2-libs-fs-utils.synopsis" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html#farsight2-libs-fs-utils.synopsis">
188 <ANCHOR id="farsight2-libs-fs-utils.description" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html#farsight2-libs-fs-utils.description">
189 <ANCHOR id="farsight2-libs-fs-utils.details" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html#farsight2-libs-fs-utils.details">
190 <ANCHOR id="fs-utils-get-default-codec-preferences" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html#fs-utils-get-default-codec-preferences">
191 <ANCHOR id="fs-utils-get-default-element-properties" href="farsight2-libs-0.10/farsight2-libs-fs-utils.html#fs-utils-get-default-element-properties">
204 <ANCHOR id="farsight2-libs-Utility-functions" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html">
205 <ANCHOR id="farsight2-libs-Utility-functions.synopsis" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#farsight2-libs-Utility-functions.synopsis">
206 <ANCHOR id="farsight2-libs-Utility-functions.description" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#farsight2-libs-Utility-functions.description">
207 <ANCHOR id="farsight2-libs-Utility-functions.details" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#farsight2-libs-Utility-functions.details">
208 <ANCHOR id="FsRtpHeaderExtension" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#FsRtpHeaderExtension">
209 <ANCHOR id="fs-rtp-header-extension-new" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-new">
210 <ANCHOR id="fs-rtp-header-extension-copy" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-copy">
211 <ANCHOR id="fs-rtp-header-extension-destroy" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-destroy">
212 <ANCHOR id="fs-rtp-header-extension-are-equal" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-are-equal">
213 <ANCHOR id="fs-rtp-header-extension-list-copy" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-copy">
214 <ANCHOR id="fs-rtp-header-extension-list-destroy" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-destroy">
215 <ANCHOR id="fs-rtp-header-extension-list-from-keyfile" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-rtp-header-extension-list-from-keyfile">
216 <ANCHOR id="FS-RTP-HEADER-EXTENSION-FORMAT:CAPS" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-FORMAT:CAPS">
217 <ANCHOR id="FS-RTP-HEADER-EXTENSION-ARGS:CAPS" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#FS-RTP-HEADER-EXTENSION-ARGS:CAPS">
218 <ANCHOR id="fs-utils-set-bitrate" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-utils-set-bitrate">
219 <ANCHOR id="fs-utils-get-default-codec-preferences" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-utils-get-default-codec-preferences">
220 <ANCHOR id="fs-utils-get-default-element-properties" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-utils-get-default-element-properties">
221 <ANCHOR id="fs-utils-get-default-rtp-header-extension-preferences" href="farsight2-libs-0.10/farsight2-libs-Utility-functions.html#fs-utils-get-default-rtp-header-extension-preferences">
192222 <ANCHOR id="FsBaseConference" href="farsight2-libs-0.10/FsBaseConference.html">
193223 <ANCHOR id="FsBaseConference.synopsis" href="farsight2-libs-0.10/FsBaseConference.html#FsBaseConference.synopsis">
194224 <ANCHOR id="FsBaseConference.object-hierarchy" href="farsight2-libs-0.10/FsBaseConference.html#FsBaseConference.object-hierarchy">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Part I. User-oriented classes, interfaces and functions</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="index.html" title="Farsight2 Reference Manual">
88 <link rel="prev" href="index.html" title="Farsight2 Reference Manual">
2020 </tr></table>
2121 <div class="part" title="Part I. User-oriented classes, interfaces and functions">
2222 <div class="titlepage"><div><div><h1 class="title">
23 <a name="id318713"></a>Part I. User-oriented classes, interfaces and functions</h1></div></div></div>
23 <a name="id415793"></a>Part I. User-oriented classes, interfaces and functions</h1></div></div></div>
2424 <div class="toc">
2525 <p><b>Table of Contents</b></p>
2626 <dl>
4646 <span class="refentrytitle"><a href="farsight2-libs-FsCodec.html">FsCodec</a></span><span class="refpurpose"> — Structure representing a media codec</span>
4747 </dt>
4848 </dl></dd>
49 <dt><span class="chapter"><a href="ch03.html">Farsight Utility Functions and Objects</a></span></dt>
49 <dt><span class="chapter"><a href="ch03.html">Protocol Specific types</a></span></dt>
50 <dd><dl><dt>
51 <span class="refentrytitle"><a href="farsight2-libs-RTP-Specific-types.html">RTP Specific types</a></span><span class="refpurpose"></span>
52 </dt></dl></dd>
53 <dt><span class="chapter"><a href="ch04.html">Farsight Utility Functions and Objects</a></span></dt>
5054 <dd><dl>
5155 <dt>
5256 <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span>
5559 <span class="refentrytitle"><a href="farsight2-libs-Network-interfaces-discovery.html">Network interfaces discovery</a></span><span class="refpurpose"> — Utility functions to discover local network interfaces</span>
5660 </dt>
5761 <dt>
58 <span class="refentrytitle"><a href="farsight2-libs-fs-utils.html">fs-utils</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
62 <span class="refentrytitle"><a href="farsight2-libs-Utility-functions.html">Utility functions</a></span><span class="refpurpose"> — Miscellaneous useful functions</span>
5963 </dt>
6064 </dl></dd>
6165 </dl>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Part II. Classes used to implement Farsight plugins</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Reference Manual">
77 <link rel="up" href="index.html" title="Farsight2 Reference Manual">
8 <link rel="prev" href="farsight2-libs-fs-utils.html" title="fs-utils">
9 <link rel="next" href="ch04.html" title="Farsight Classes Base Implementations">
8 <link rel="prev" href="farsight2-libs-Utility-functions.html" title="Utility functions">
9 <link rel="next" href="ch05.html" title="Farsight Classes Base Implementations">
1010 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1111 <link rel="stylesheet" href="style.css" type="text/css">
1212 </head>
1313 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
1414 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
15 <td><a accesskey="p" href="farsight2-libs-fs-utils.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
15 <td><a accesskey="p" href="farsight2-libs-Utility-functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
1616 <td> </td>
1717 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
1818 <th width="100%" align="center">Farsight2 Reference Manual</th>
19 <td><a accesskey="n" href="ch04.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
19 <td><a accesskey="n" href="ch05.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
2020 </tr></table>
2121 <div class="part" title="Part II. Classes used to implement Farsight plugins">
2222 <div class="titlepage"><div><div><h1 class="title">
23 <a name="id323978"></a>Part II. Classes used to implement Farsight plugins</h1></div></div></div>
23 <a name="id445567"></a>Part II. Classes used to implement Farsight plugins</h1></div></div></div>
2424 <div class="toc">
2525 <p><b>Table of Contents</b></p>
2626 <dl>
27 <dt><span class="chapter"><a href="ch04.html">Farsight Classes Base Implementations</a></span></dt>
27 <dt><span class="chapter"><a href="ch05.html">Farsight Classes Base Implementations</a></span></dt>
2828 <dd><dl><dt>
2929 <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span>
3030 </dt></dl></dd>
31 <dt><span class="chapter"><a href="ch05.html">Farsight Transmitter Classes</a></span></dt>
31 <dt><span class="chapter"><a href="ch06.html">Farsight Transmitter Classes</a></span></dt>
3232 <dd><dl>
3333 <dt>
3434 <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span>
3838 information to a transmitter.</span>
3939 </dt>
4040 </dl></dd>
41 <dt><span class="chapter"><a href="ch06.html">Farsight Plugins Infrastructure</a></span></dt>
41 <dt><span class="chapter"><a href="ch07.html">Farsight Plugins Infrastructure</a></span></dt>
4242 <dd><dl><dt>
4343 <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span>
4444 </dt></dl></dd>
167167 <DEFAULT>NULL</DEFAULT>
168168 </ARG>
169169
170 <ARG>
171 <NAME>FsRtpBitrateAdapter::bitrate</NAME>
172 <TYPE>guint</TYPE>
173 <RANGE></RANGE>
174 <FLAGS>w</FLAGS>
175 <NICK>Bitrate to adapt for</NICK>
176 <BLURB>The bitrate to adapt for (0 means no adaption).</BLURB>
177 <DEFAULT>0</DEFAULT>
178 </ARG>
179
180 <ARG>
181 <NAME>FsRtpBitrateAdapter::interval</NAME>
182 <TYPE>guint64</TYPE>
183 <RANGE></RANGE>
184 <FLAGS>w</FLAGS>
185 <NICK>Minimum interval before adaptation</NICK>
186 <BLURB>The minimum interval before adapting after a change.</BLURB>
187 <DEFAULT>30000000000</DEFAULT>
188 </ARG>
189
190 <ARG>
191 <NAME>FsRtpBitrateAdapter::rtp-caps</NAME>
192 <TYPE>gpointer</TYPE>
193 <RANGE></RANGE>
194 <FLAGS>w</FLAGS>
195 <NICK>Current RTP Caps</NICK>
196 <BLURB>The RTP caps currently used.</BLURB>
197 <DEFAULT></DEFAULT>
198 </ARG>
199
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>RTP Plugin</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference">
88 <link rel="prev" href="pt01.html" title="Part I. Plugins implementing FsConference">
2020 </tr></table>
2121 <div class="chapter" title="RTP Plugin">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id522086"></a>RTP Plugin</h2></div></div></div>
23 <a name="id540783"></a>RTP Plugin</h2></div></div></div>
2424 <div class="toc"><dl>
2525 <dt>
2626 <span class="refentrytitle"><a href="farsight2-plugins-FsRtpConference.html">FsRtpConference</a></span><span class="refpurpose"> — Farsight RTP Conference Gstreamer Elements</span>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Raw Plugin</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference">
88 <link rel="prev" href="farsight2-plugins-FsRtpStream.html" title="FsRtpStream">
2020 </tr></table>
2121 <div class="chapter" title="Raw Plugin">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id527311"></a>Raw Plugin</h2></div></div></div>
23 <a name="id570313"></a>Raw Plugin</h2></div></div></div>
2424 <div class="toc"><dl>
2525 <dt>
2626 <span class="refentrytitle"><a href="farsight2-plugins-FsRawConference.html">FsRawConference</a></span><span class="refpurpose"> — Farsight Raw Conference Gstreamer Elements Base class</span>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>MSN Webcam plugin</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference">
88 <link rel="prev" href="farsight2-plugins-FsRawStream.html" title="FsRawStream">
2020 </tr></table>
2121 <div class="chapter" title="MSN Webcam plugin">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id527335"></a>MSN Webcam plugin</h2></div></div></div>
23 <a name="id570337"></a>MSN Webcam plugin</h2></div></div></div>
2424 <div class="toc"><dl>
2525 <dt>
2626 <span class="refentrytitle"><a href="farsight2-plugins-FsMsnCamSendConference.html">FsMsnCamSendConference</a></span><span class="refpurpose"> — Farsight MSN send Conference Gstreamer Element</span>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsFunnel</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt03.html" title="Part III. Utility elements">
88 <link rel="prev" href="pt03.html" title="Part III. Utility elements">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnCamCamRecvConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="farsight2-plugins-FsMsnCamSendConference.html" title="FsMsnCamSendConference">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnCamSendConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="ch03.html" title="MSN Webcam plugin">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="farsight2-plugins-FsMsnCamCamRecvConference.html" title="FsMsnCamCamRecvConference">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnParticipant</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="farsight2-plugins-FsMsnConference.html" title="FsMsnConference">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnSession</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="farsight2-plugins-FsMsnParticipant.html" title="FsMsnParticipant">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMsnStream</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch03.html" title="MSN Webcam plugin">
88 <link rel="prev" href="farsight2-plugins-FsMsnSession.html" title="FsMsnSession">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsMulticastStreamTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt02.html" title="Part II. Transmitters">
88 <link rel="prev" href="farsight2-plugins-FsRawUdpStreamTransmitter.html" title="FsRawUdpStreamTransmitter">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsNiceStreamTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt02.html" title="Part II. Transmitters">
88 <link rel="prev" href="farsight2-plugins-FsMulticastStreamTransmitter.html" title="FsMulticastStreamTransmitter">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRawConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch02.html" title="Raw Plugin">
88 <link rel="prev" href="ch02.html" title="Raw Plugin">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRawParticipant</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch02.html" title="Raw Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRawConference.html" title="FsRawConference">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRawSession</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch02.html" title="Raw Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRawParticipant.html" title="FsRawParticipant">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRawStream</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch02.html" title="Raw Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRawSession.html" title="FsRawSession">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRawUdpStreamTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt02.html" title="Part II. Transmitters">
88 <link rel="prev" href="pt02.html" title="Part II. Transmitters">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRtpConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch01.html" title="RTP Plugin">
88 <link rel="prev" href="ch01.html" title="RTP Plugin">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRtpParticipant</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch01.html" title="RTP Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRtpConference.html" title="FsRtpConference">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRtpSession</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch01.html" title="RTP Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRtpParticipant.html" title="FsRtpParticipant">
6060 SSRC (although if there is a SSRC collision, that SSRC may change).
6161 </p>
6262 <div class="refsect2" title="Codec profiles">
63 <a name="id568368"></a><h3>Codec profiles</h3>
63 <a name="id586353"></a><h3>Codec profiles</h3>
6464 <p>
6565 It is possible to define "codec profiles", that is non-autodetected
6666 encoding and decoding pipelines for codecs. It is even possible to declare
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsRtpStream</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="ch01.html" title="RTP Plugin">
88 <link rel="prev" href="farsight2-plugins-FsRtpSession.html" title="FsRtpSession">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>FsShmStreamTransmitter</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt02.html" title="Part II. Transmitters">
88 <link rel="prev" href="farsight2-plugins-FsNiceStreamTransmitter.html" title="FsNiceStreamTransmitter">
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>GstVideoanyrate</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="pt03.html" title="Part III. Utility elements">
88 <link rel="prev" href="farsight2-plugins-FsFunnel.html" title="FsFunnel">
4646 <function name="The &quot;sdes&quot; property" link="farsight2-plugins-FsRtpConference.html#FsRtpConference--sdes"/>
4747 <function name="FsRtpParticipant" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant"/>
4848 <function name="The &quot;cname&quot; property" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant--cname"/>
49 <function name="Codec profiles" link="farsight2-plugins-FsRtpSession.html#id568368"/>
49 <function name="Codec profiles" link="farsight2-plugins-FsRtpSession.html#id586353"/>
5050 <function name="FsRtpSession" link="farsight2-plugins-FsRtpSession.html#FsRtpSession"/>
5151 <function name="The &quot;no-rtcp-timeout&quot; property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--no-rtcp-timeout"/>
5252 <function name="The &quot;ssrc&quot; property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--ssrc"/>
4646 <keyword type="property" name="The &quot;sdes&quot; property" link="farsight2-plugins-FsRtpConference.html#FsRtpConference--sdes"/>
4747 <keyword type="struct" name="FsRtpParticipant" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant"/>
4848 <keyword type="property" name="The &quot;cname&quot; property" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant--cname"/>
49 <keyword type="" name="Codec profiles" link="farsight2-plugins-FsRtpSession.html#id568368"/>
49 <keyword type="" name="Codec profiles" link="farsight2-plugins-FsRtpSession.html#id586353"/>
5050 <keyword type="struct" name="FsRtpSession" link="farsight2-plugins-FsRtpSession.html#FsRtpSession"/>
5151 <keyword type="property" name="The &quot;no-rtcp-timeout&quot; property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--no-rtcp-timeout"/>
5252 <keyword type="property" name="The &quot;ssrc&quot; property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--ssrc"/>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Farsight2 Plugins Manual</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="next" href="pt01.html" title="Part I. Plugins implementing FsConference">
88 <meta name="generator" content="GTK-Doc V1.15 (XML mode)">
1414 <div>
1515 <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Farsight2 Plugins Manual</p></th></tr></table></div>
1616 <div><p class="releaseinfo">
17 for version 0.0.25.1.
17 for version 0.0.26.1.
1818 The latest version of this documentation can be found on-line at
1919 <a class="ulink" href="http://farsight.freedesktop.org/apidoc/farsight2-plugins/" target="_top">http://farsight.freedesktop.org/apidoc/farsight2-plugins/</a>.
2020 These plugins are to be used with the base classes and other utility
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Part I. Plugins implementing FsConference</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="index.html" title="Farsight2 Plugins Manual">
88 <link rel="prev" href="index.html" title="Farsight2 Plugins Manual">
2020 </tr></table>
2121 <div class="part" title="Part I. Plugins implementing FsConference">
2222 <div class="titlepage"><div><div><h1 class="title">
23 <a name="id522080"></a>Part I. Plugins implementing FsConference</h1></div></div></div>
23 <a name="id540777"></a>Part I. Plugins implementing FsConference</h1></div></div></div>
2424 <div class="toc">
2525 <p><b>Table of Contents</b></p>
2626 <dl>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Part II. Transmitters</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="index.html" title="Farsight2 Plugins Manual">
88 <link rel="prev" href="farsight2-plugins-FsMsnStream.html" title="FsMsnStream">
2020 </tr></table>
2121 <div class="part" title="Part II. Transmitters">
2222 <div class="titlepage"><div><div><h1 class="title">
23 <a name="id527370"></a>Part II. Transmitters</h1></div></div></div>
23 <a name="id570372"></a>Part II. Transmitters</h1></div></div></div>
2424 <div class="toc">
2525 <p><b>Table of Contents</b></p>
2626 <dl>
22 <head>
33 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
44 <title>Part III. Utility elements</title>
5 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
5 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
66 <link rel="home" href="index.html" title="Farsight2 Plugins Manual">
77 <link rel="up" href="index.html" title="Farsight2 Plugins Manual">
88 <link rel="prev" href="farsight2-plugins-FsShmStreamTransmitter.html" title="FsShmStreamTransmitter">
2020 </tr></table>
2121 <div class="part" title="Part III. Utility elements">
2222 <div class="titlepage"><div><div><h1 class="title">
23 <a name="id523058"></a>Part III. Utility elements</h1></div></div></div>
23 <a name="id570396"></a>Part III. Utility elements</h1></div></div></div>
2424 <div class="toc">
2525 <p><b>Table of Contents</b></p>
2626 <dl>
8686 GError *construction_error;
8787
8888 GstPad *media_sink_pad;
89 GstElement *capsfilter;
89 GstElement *send_capsfilter;
9090 GList *codecs;
9191 FsCodec *send_codec;
9292 gboolean transmitter_linked;
9797 GstElement *transform_bin;
9898 GstElement *fakesink;
9999
100 GstElement *valve;
100 GstElement *send_valve;
101
102 GstElement *recv_capsfilter;
103 GstElement *recv_valve;
104 gulong transmitter_recv_probe_id;
105 GstPad *transmitter_src_pad;
106 GstPad *src_ghost_pad;
101107
102108 FsTransmitter *transmitter;
103109
112118
113119 G_DEFINE_TYPE (FsRawSession, fs_raw_session, FS_TYPE_SESSION);
114120
115 #define FS_RAW_SESSION_GET_PRIVATE(o) \
116 (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAW_SESSION, FsRawSessionPrivate))
121 #define FS_RAW_SESSION_GET_PRIVATE(o) \
122 (G_TYPE_INSTANCE_GET_PRIVATE ((o), FS_TYPE_RAW_SESSION, FsRawSessionPrivate))
117123
118124 #ifdef DEBUG_MUTEXES
119125
120 #define FS_RAW_SESSION_LOCK(session) \
121 do { \
122 g_mutex_lock (FS_RAW_SESSION (session)->priv->mutex); \
123 g_assert (FS_RAW_SESSION (session)->priv->count == 0); \
124 FS_RAW_SESSION (session)->priv->count++; \
126 #define FS_RAW_SESSION_LOCK(session) \
127 do { \
128 g_mutex_lock (FS_RAW_SESSION (session)->priv->mutex); \
129 g_assert (FS_RAW_SESSION (session)->priv->count == 0); \
130 FS_RAW_SESSION (session)->priv->count++; \
125131 } while (0);
126 #define FS_RAW_SESSION_UNLOCK(session) \
127 do { \
128 g_assert (FS_RAW_SESSION (session)->priv->count == 1); \
129 FS_RAW_SESSION (session)->priv->count--; \
130 g_mutex_unlock (FS_RAW_SESSION (session)->priv->mutex); \
132 #define FS_RAW_SESSION_UNLOCK(session) \
133 do { \
134 g_assert (FS_RAW_SESSION (session)->priv->count == 1); \
135 FS_RAW_SESSION (session)->priv->count--; \
136 g_mutex_unlock (FS_RAW_SESSION (session)->priv->mutex); \
131137 } while (0);
132 #define FS_RAW_SESSION_GET_LOCK(session) \
138 #define FS_RAW_SESSION_GET_LOCK(session) \
133139 (FS_RAW_SESSION (session)->priv->mutex)
134140 #else
135 #define FS_RAW_SESSION_LOCK(session) \
141 #define FS_RAW_SESSION_LOCK(session) \
136142 g_mutex_lock ((session)->priv->mutex)
137 #define FS_RAW_SESSION_UNLOCK(session) \
143 #define FS_RAW_SESSION_UNLOCK(session) \
138144 g_mutex_unlock ((session)->priv->mutex)
139 #define FS_RAW_SESSION_GET_LOCK(session) \
145 #define FS_RAW_SESSION_GET_LOCK(session) \
140146 ((session)->priv->mutex)
141147 #endif
142148
164170
165171 static gchar **fs_raw_session_list_transmitters (FsSession *session);
166172
167 static GType
168 fs_raw_session_get_stream_transmitter_type (FsSession *session,
173 static GType fs_raw_session_get_stream_transmitter_type (FsSession *session,
169174 const gchar *transmitter);
170175
171 static GstElement *
172 _create_transform_bin (FsRawSession *self, GError **error);
176
177 static GstElement *_create_transform_bin (FsRawSession *self, GError **error);
178
179 static FsStreamTransmitter *_stream_get_stream_transmitter (FsRawStream *stream,
180 const gchar *transmitter_name,
181 FsParticipant *participant,
182 GParameter *parameters,
183 guint n_parameters,
184 GError **error,
185 gpointer user_data);
186
173187
174188 static void
175189 fs_raw_session_class_init (FsRawSessionClass *klass)
187201 session_class->new_stream = fs_raw_session_new_stream;
188202 session_class->list_transmitters = fs_raw_session_list_transmitters;
189203 session_class->get_stream_transmitter_type =
190 fs_raw_session_get_stream_transmitter_type;
204 fs_raw_session_get_stream_transmitter_type;
191205
192206 g_object_class_override_property (gobject_class,
193207 PROP_MEDIA_TYPE, "media-type");
197211 PROP_SINK_PAD, "sink-pad");
198212
199213 g_object_class_override_property (gobject_class,
200 PROP_CODEC_PREFERENCES, "codec-preferences");
214 PROP_CODEC_PREFERENCES, "codec-preferences");
201215 g_object_class_override_property (gobject_class,
202 PROP_CODECS, "codecs");
216 PROP_CODECS, "codecs");
203217 g_object_class_override_property (gobject_class,
204 PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config");
218 PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config");
205219 g_object_class_override_property (gobject_class,
206 PROP_CURRENT_SEND_CODEC, "current-send-codec");
220 PROP_CURRENT_SEND_CODEC, "current-send-codec");
207221 g_object_class_override_property (gobject_class,
208 PROP_CODECS_READY, "codecs-ready");
222 PROP_CODECS_READY, "codecs-ready");
209223 g_object_class_override_property (gobject_class,
210 PROP_TOS, "tos");
224 PROP_TOS, "tos");
211225
212226 g_object_class_install_property (gobject_class,
213227 PROP_CONFERENCE,
260274 FsRawSession *self = FS_RAW_SESSION (object);
261275 GstBin *conferencebin = NULL;
262276 FsRawConference *conference = NULL;
263 GstElement *valve = NULL;
264 GstElement *capsfilter = NULL;
277 GstElement *send_valve = NULL;
278 GstElement *send_capsfilter = NULL;
265279 GstElement *transform = NULL;
266280 GstElement *send_tee = NULL;
267281 GstElement *fakesink = NULL;
284298 goto out;
285299
286300 GST_OBJECT_LOCK (conference);
287 valve = self->priv->valve;
288 self->priv->valve = NULL;
289 GST_OBJECT_UNLOCK (conference);
290
291 if (valve)
292 {
293 gst_element_set_locked_state (valve, TRUE);
294 gst_bin_remove (conferencebin, valve);
295 gst_element_set_state (valve, GST_STATE_NULL);
296 gst_object_unref (valve);
297 }
298
299 GST_OBJECT_LOCK (conference);
300 capsfilter = self->priv->capsfilter;
301 self->priv->capsfilter = capsfilter;
302 GST_OBJECT_UNLOCK (conference);
303
304 if (capsfilter)
305 {
306 gst_element_set_locked_state (capsfilter, TRUE);
307 gst_bin_remove (conferencebin, capsfilter);
308 gst_element_set_state (capsfilter, GST_STATE_NULL);
309 gst_object_unref (capsfilter);
301 send_valve = self->priv->send_valve;
302 self->priv->send_valve = NULL;
303 GST_OBJECT_UNLOCK (conference);
304
305 if (send_valve)
306 {
307 gst_element_set_locked_state (send_valve, TRUE);
308 gst_bin_remove (conferencebin, send_valve);
309 gst_element_set_state (send_valve, GST_STATE_NULL);
310 gst_object_unref (send_valve);
311 }
312
313 GST_OBJECT_LOCK (conference);
314 send_capsfilter = self->priv->send_capsfilter;
315 self->priv->send_capsfilter = NULL;
316 GST_OBJECT_UNLOCK (conference);
317
318 if (send_capsfilter)
319 {
320 gst_element_set_locked_state (send_capsfilter, TRUE);
321 gst_bin_remove (conferencebin, send_capsfilter);
322 gst_element_set_state (send_capsfilter, GST_STATE_NULL);
323 gst_object_unref (send_capsfilter);
310324 }
311325
312326 if (self->priv->stream)
314328 if (handler_id > 0 && self->priv->stream)
315329 g_signal_handler_disconnect (self->priv->stream, handler_id);
316330
317 raw_session_remove_stream(self, FS_STREAM (self->priv->stream));
331 fs_raw_session_remove_stream(self, FS_STREAM (self->priv->stream));
318332 }
319333
320334 GST_OBJECT_LOCK (conference);
387401
388402 gst_object_unref (conference);
389403
390 out:
404 out:
391405
392406 G_OBJECT_CLASS (fs_raw_session_parent_class)->dispose (object);
393407 }
410424
411425 static void
412426 fs_raw_session_get_property (GObject *object,
413 guint prop_id,
414 GValue *value,
415 GParamSpec *pspec)
427 guint prop_id,
428 GValue *value,
429 GParamSpec *pspec)
416430 {
417431 FsRawSession *self = FS_RAW_SESSION (object);
418432 FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
463477
464478 static void
465479 fs_raw_session_set_property (GObject *object,
466 guint prop_id,
467 const GValue *value,
468 GParamSpec *pspec)
480 guint prop_id,
481 const GValue *value,
482 GParamSpec *pspec)
469483 {
470484 FsRawSession *self = FS_RAW_SESSION (object);
471485 FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
514528 if (self->id == 0)
515529 {
516530 g_error ("You can not instantiate this element directly, you MUST"
517 " call fs_raw_session_new ()");
531 " call fs_raw_session_new ()");
518532 return;
519533 }
520534
521535 g_assert (self->priv->conference);
522536
523537 tmp = g_strdup_printf ("send_capsfilter_%u", self->id);
524 self->priv->capsfilter = gst_element_factory_make ("capsfilter", tmp);
538 self->priv->send_capsfilter = gst_element_factory_make ("capsfilter", tmp);
525539 g_free (tmp);
526540
527 if (!self->priv->capsfilter)
541 if (!self->priv->send_capsfilter)
528542 {
529543 self->priv->construction_error = g_error_new (FS_ERROR,
530544 FS_ERROR_CONSTRUCTION,
532546 return;
533547 }
534548
535 gst_object_ref_sink (self->priv->capsfilter);
536
537 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->capsfilter))
549 gst_object_ref_sink (self->priv->send_capsfilter);
550
551 if (!gst_bin_add (GST_BIN (self->priv->conference),
552 self->priv->send_capsfilter))
538553 {
539554 self->priv->construction_error = g_error_new (FS_ERROR,
540555 FS_ERROR_CONSTRUCTION, "Could not add capsfilter to conference");
541 gst_object_unref (self->priv->capsfilter);
542 self->priv->capsfilter = NULL;
543 return;
544 }
545
546 if (!gst_element_sync_state_with_parent (self->priv->capsfilter))
556 gst_object_unref (self->priv->send_capsfilter);
557 self->priv->send_capsfilter = NULL;
558 return;
559 }
560
561 if (!gst_element_sync_state_with_parent (self->priv->send_capsfilter))
547562 {
548563 self->priv->construction_error = g_error_new (FS_ERROR,
549564 FS_ERROR_CONSTRUCTION,
572587 }
573588
574589 if (!gst_element_link_pads (self->priv->transform_bin, "src",
575 self->priv->capsfilter, "sink"))
590 self->priv->send_capsfilter, "sink"))
576591 {
577592 self->priv->construction_error = g_error_new (FS_ERROR,
578593 FS_ERROR_CONSTRUCTION,
649664 return;
650665 }
651666
667 g_object_set (self->priv->fakesink,
668 "sync", FALSE,
669 "async", FALSE,
670 NULL);
671
652672 gst_object_ref_sink (self->priv->fakesink);
653673 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->fakesink))
654674 {
686706 }
687707
688708 tmp = g_strdup_printf ("send_valve_%u", self->id);
689 self->priv->valve = gst_element_factory_make ("valve", tmp);
709 self->priv->send_valve = gst_element_factory_make ("valve", tmp);
690710 g_free (tmp);
691711
692 if (!self->priv->valve)
712 if (!self->priv->send_valve)
693713 {
694714 self->priv->construction_error = g_error_new (FS_ERROR,
695715 FS_ERROR_CONSTRUCTION, "Could not make send valve");
696716 return;
697717 }
698718
699 gst_object_ref_sink (self->priv->valve);
700
701 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->valve))
719 gst_object_ref_sink (self->priv->send_valve);
720
721 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->send_valve))
702722 {
703723 self->priv->construction_error = g_error_new (FS_ERROR,
704724 FS_ERROR_CONSTRUCTION, "Could not add valve to conference");
705 gst_object_unref (self->priv->valve);
706 self->priv->valve = NULL;
707 return;
708 }
709
710 g_object_set (G_OBJECT (self->priv->valve), "drop", TRUE, NULL);
711
712 if (!gst_element_sync_state_with_parent (self->priv->valve))
725 gst_object_unref (self->priv->send_valve);
726 self->priv->send_valve = NULL;
727 return;
728 }
729
730 g_object_set (G_OBJECT (self->priv->send_valve), "drop", TRUE, NULL);
731
732 if (!gst_element_sync_state_with_parent (self->priv->send_valve))
713733 {
714734 self->priv->construction_error = g_error_new (FS_ERROR,
715735 FS_ERROR_CONSTRUCTION,
717737 return;
718738 }
719739
720 if (!gst_element_link_pads (self->priv->valve, "src",
740 if (!gst_element_link_pads (self->priv->send_valve, "src",
721741 self->priv->send_tee, "sink"))
722742 {
723743 self->priv->construction_error = g_error_new (FS_ERROR,
726746 return;
727747 }
728748
729 pad = gst_element_get_static_pad (self->priv->valve, "sink");
749 pad = gst_element_get_static_pad (self->priv->send_valve, "sink");
730750 tmp = g_strdup_printf ("sink_%u", self->id);
731751 self->priv->media_sink_pad = gst_ghost_pad_new (tmp, pad);
732752 g_free (tmp);
799819
800820 if (g_list_length (codecs) == 2)
801821 codec = codecs->next->data;
802 else if (codecs && codecs->data)
822 else
803823 codec = codecs->data;
804824
805825 GST_OBJECT_LOCK (conference);
826846 goto error;
827847
828848 caps = fs_raw_codec_to_gst_caps (codec);
829 if (self->priv->capsfilter)
830 g_object_set (self->priv->capsfilter, "caps", caps, NULL);
849 if (self->priv->send_capsfilter)
850 g_object_set (self->priv->send_capsfilter, "caps", caps, NULL);
831851 gst_caps_unref (caps);
832852
833853 if (!gst_element_link_pads (transform, "src",
834 self->priv->capsfilter, "sink"))
854 self->priv->send_capsfilter, "sink"))
835855 goto error;
836856
837857 if (!gst_element_sync_state_with_parent (transform))
859879 fs_codec_destroy (self->priv->send_codec);
860880
861881 self->priv->send_codec = fs_codec_copy (codec);
882 }
883
884 codec = codecs->data;
885
886 if (self->priv->recv_capsfilter)
887 {
888 GstElement *capsfilter = gst_object_ref (self->priv->recv_capsfilter);
889 GstCaps *recv_caps;
890
891 recv_caps = fs_raw_codec_to_gst_caps (codec);
892 GST_OBJECT_UNLOCK (conference);
893 g_object_set (capsfilter, "caps", recv_caps, NULL);
894 gst_object_unref (capsfilter);
895 GST_OBJECT_LOCK (conference);
896 gst_caps_unref (recv_caps);
862897 }
863898
864899 GST_OBJECT_UNLOCK (conference);
899934 }
900935
901936 void
902 raw_session_remove_stream (FsRawSession *self,
903 FsStream *stream)
937 fs_raw_session_remove_stream (FsRawSession *self,
938 FsStream *stream)
904939 {
905940 FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
906941 FsTransmitter *transmitter = NULL;
910945 if (!conference)
911946 return;
912947
913 g_object_set (G_OBJECT (self->priv->valve), "drop", TRUE, NULL);
948 g_object_set (G_OBJECT (self->priv->send_valve), "drop", TRUE, NULL);
914949
915950 GST_OBJECT_LOCK (conference);
916951 if (self->priv->stream == (FsRawStream *) stream)
917952 {
918953 self->priv->stream = NULL;
919 transmitter = self->priv->transmitter;
920 self->priv->transmitter = NULL;
921 }
922 GST_OBJECT_UNLOCK (conference);
923
954 }
955 transmitter = self->priv->transmitter;
956 self->priv->transmitter = NULL;
957 GST_OBJECT_UNLOCK (conference);
958
959 if (!transmitter)
960 return;
924961 g_object_get (transmitter,
925962 "gst-src", &src,
926963 "gst-sink", &sink,
927964 NULL);
928965
966
967 if (self->priv->transmitter_recv_probe_id)
968 {
969 if (self->priv->transmitter_src_pad)
970 gst_pad_remove_data_probe (self->priv->transmitter_src_pad,
971 self->priv->transmitter_recv_probe_id);
972 self->priv->transmitter_recv_probe_id = 0;
973 }
974
975
929976 gst_element_set_locked_state (src, TRUE);
930977 gst_element_set_state (src, GST_STATE_NULL);
931978 gst_bin_remove (GST_BIN (conference), src);
936983 gst_element_set_state (sink, GST_STATE_NULL);
937984 gst_bin_remove (GST_BIN (conference), sink);
938985 }
986
987 if (self->priv->transmitter_src_pad)
988 {
989 gst_object_unref (self->priv->transmitter_src_pad);
990 self->priv->transmitter_src_pad = NULL;
991 }
992
993 if (self->priv->recv_valve)
994 {
995 gst_element_set_locked_state (self->priv->recv_valve, TRUE);
996 gst_bin_remove (GST_BIN (conference), self->priv->recv_valve);
997 gst_element_set_state (self->priv->recv_valve, GST_STATE_NULL);
998 gst_object_unref (self->priv->recv_valve);
999 self->priv->recv_valve = NULL;
1000 }
1001
1002 if (self->priv->recv_capsfilter)
1003 {
1004 gst_element_set_locked_state (self->priv->recv_capsfilter, TRUE);
1005 gst_bin_remove (GST_BIN (conference), self->priv->recv_capsfilter);
1006 gst_element_set_state (self->priv->recv_capsfilter, GST_STATE_NULL);
1007 gst_object_unref (self->priv->recv_capsfilter);
1008 self->priv->recv_capsfilter = NULL;
1009 }
1010
1011 if (self->priv->src_ghost_pad)
1012 {
1013 gst_element_remove_pad (GST_ELEMENT (conference),
1014 self->priv->src_ghost_pad);
1015 gst_pad_set_active (self->priv->src_ghost_pad, FALSE);
1016 gst_object_unref (self->priv->src_ghost_pad);
1017 self->priv->src_ghost_pad = NULL;
1018 }
1019
9391020
9401021 gst_object_unref (src);
9411022 gst_object_unref (sink);
9451026
9461027 static gboolean
9471028 _add_transmitter_sink (FsRawSession *self,
948 GstElement *transmitter_sink,
949 GError **error)
1029 GstElement *transmitter_sink,
1030 GError **error)
9501031 {
9511032 if (!transmitter_sink)
9521033 {
9731054 goto error;
9741055 }
9751056
976 if (!gst_element_link (self->priv->capsfilter, transmitter_sink))
1057 if (!gst_element_link (self->priv->send_capsfilter, transmitter_sink))
9771058 {
9781059 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
9791060 "Could not link the capsfilter and transmitter's"
9811062 goto error;
9821063 }
9831064
984 self->priv->transmitter_linked = TRUE;
985
9861065 return TRUE;
9871066
9881067 error:
9931072 fs_raw_session_update_direction (FsRawSession *self,
9941073 FsStreamDirection direction)
9951074 {
1075 GError *error = NULL;
1076 FsRawConference *conference;
1077
1078 conference = fs_raw_session_get_conference (self, &error);
1079
1080 if (!conference)
1081 {
1082 fs_session_emit_error (FS_SESSION (self), error->code, error->message,
1083 "Unable to add transmitter sink");
1084 g_clear_error (&error);
1085 return;
1086 }
1087
1088 GST_OBJECT_LOCK (conference);
1089
9961090 /* Don't start sending before we have codecs */
9971091 if (!self->priv->codecs)
998 return;
1092 {
1093 GST_OBJECT_UNLOCK (conference);
1094 goto out;
1095 }
9991096
10001097 if (direction & FS_DIRECTION_SEND && !self->priv->transmitter_linked)
10011098 {
10021099 GstElement *transmitter_sink;
1003 GError *error = NULL;
1004 FsRawConference *conference;
1005
1006 conference = fs_raw_session_get_conference (self, &error);
1007
1008 if (!conference)
1009 {
1010 fs_session_emit_error (FS_SESSION (self), error->code, error->message,
1011 "Unable to add transmitter sink");
1012 g_clear_error (&error);
1013 return;
1014 }
1100
1101 GST_OBJECT_UNLOCK (conference);
10151102
10161103 g_object_get (self->priv->transmitter, "gst-sink", &transmitter_sink, NULL);
10171104
10201107 fs_session_emit_error (FS_SESSION (self), error->code, error->message,
10211108 "Unable to add transmitter sink");
10221109 g_clear_error (&error);
1023 gst_object_unref (conference);
1024 return;
1110 goto out;
10251111 }
10261112
1027 gst_object_unref (conference);
1028 }
1113 GST_OBJECT_LOCK (conference);
1114 self->priv->transmitter_linked = TRUE;
1115 }
1116
1117 if (self->priv->recv_valve)
1118 {
1119 GstElement *valve = g_object_ref (self->priv->recv_valve);
1120
1121 GST_OBJECT_UNLOCK (conference);
1122 g_object_set (valve,
1123 "drop", ! (direction & FS_DIRECTION_RECV), NULL);
1124 g_object_unref (valve);
1125 GST_OBJECT_LOCK (conference);
1126 }
1127
1128 GST_OBJECT_UNLOCK (conference);
10291129
10301130 if (direction & FS_DIRECTION_SEND)
1031 g_object_set (self->priv->valve, "drop", FALSE, NULL);
1131 g_object_set (self->priv->send_valve, "drop", FALSE, NULL);
10321132 else
1033 g_object_set (self->priv->valve, "drop", TRUE, NULL);
1133 g_object_set (self->priv->send_valve, "drop", TRUE, NULL);
1134
1135 out:
1136 gst_object_unref (conference);
10341137 }
10351138
10361139 /**
10491152 */
10501153 static FsStream *
10511154 fs_raw_session_new_stream (FsSession *session,
1052 FsParticipant *participant,
1053 FsStreamDirection direction,
1054 const gchar *transmitter,
1055 guint n_parameters,
1056 GParameter *parameters,
1057 GError **error)
1155 FsParticipant *participant,
1156 FsStreamDirection direction,
1157 const gchar *transmitter,
1158 guint n_parameters,
1159 GParameter *parameters,
1160 GError **error)
10581161 {
10591162 FsRawSession *self = FS_RAW_SESSION (session);
1060 FsRawParticipant *rawparticipant = NULL;
10611163 FsStream *new_stream = NULL;
10621164 FsRawConference *conference;
1063 FsTransmitter *fstransmitter = NULL;
10641165 FsStreamTransmitter *stream_transmitter = NULL;
1065 GstElement *transmitter_sink = NULL;
1066 GstElement *transmitter_src = NULL;
1067 GstPad *transmitter_pad;
10681166
10691167 if (!FS_IS_RAW_PARTICIPANT (participant))
10701168 {
10821180 goto already_have_stream;
10831181 GST_OBJECT_UNLOCK (conference);
10841182
1085 fstransmitter = fs_transmitter_new (transmitter, 1, 0, error);
1086
1087 if (!fstransmitter)
1088 {
1089 goto error;
1090 }
1091
1092 stream_transmitter = fs_transmitter_new_stream_transmitter (fstransmitter,
1093 participant, n_parameters, parameters, error);
1094
1183 stream_transmitter = _stream_get_stream_transmitter (NULL,
1184 transmitter, participant, parameters, n_parameters, error, self);
10951185 if (!stream_transmitter)
1096 {
1097 goto error;
1098 }
1099
1100 g_object_get (fstransmitter, "gst-src", &transmitter_src, NULL);
1101
1102 if (!transmitter_src)
1103 {
1104 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1105 "Unable to get the source element from the FsTransmitter");
1106 goto error;
1107 }
1108
1109 if (!gst_bin_add (GST_BIN (self->priv->conference), transmitter_src))
1110 {
1111 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1112 "Could not add the transmitter's source element"
1113 " for session %d to the conference bin", self->id);
1114 gst_object_unref (transmitter_src);
1115 transmitter_src = NULL;
1116 goto error;
1117 }
1118
1119 transmitter_pad = gst_element_get_static_pad (transmitter_src, "src1");
1120
1121 if (!transmitter_pad)
1122 {
1123 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1124 "Unable to get the srcpad from the FsTransmitter's gst-src");
1125 goto error;
1126 }
1127
1128 rawparticipant = FS_RAW_PARTICIPANT (participant);
1129
1130 new_stream = FS_STREAM_CAST (fs_raw_stream_new (self, rawparticipant,
1131 direction, conference, stream_transmitter, transmitter_pad, error));
1132
1133 /* stream_new takes the reference to this */
1134 stream_transmitter = NULL;
1135
1136 /* stream_new doesn't take the reference to this. Perhaps it should */
1137 g_object_unref (transmitter_pad);
1186 goto error;
1187
1188 new_stream = FS_STREAM_CAST (fs_raw_stream_new (self,
1189 FS_RAW_PARTICIPANT (participant),
1190 direction, conference, stream_transmitter,
1191 _stream_get_stream_transmitter, self, error));
11381192
11391193 if (new_stream)
11401194 {
11411195 g_signal_connect_object (new_stream, "notify::remote-codecs",
11421196 G_CALLBACK (_stream_remote_codecs_changed), self, 0);
1143
1144 if (!gst_element_sync_state_with_parent (transmitter_src))
1145 {
1146 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1147 "Could not sync the transmitter's source element"
1148 " with its parent for session %d", self->id);
1149 goto error;
1150 }
11511197
11521198 GST_OBJECT_LOCK (conference);
11531199 if (self->priv->stream)
11561202 }
11571203 self->priv->stream = (FsRawStream *) new_stream;
11581204
1159 if (self->priv->tos)
1160 g_object_set (fstransmitter, "tos", self->priv->tos, NULL);
1161
1162 self->priv->transmitter = fstransmitter;
1163
11641205 GST_OBJECT_UNLOCK (conference);
1165
1166 goto done;
1167 }
1168
1169 error:
1170 if (transmitter_src != NULL)
1171 gst_bin_remove (GST_BIN (conference), transmitter_src);
1172
1173 if (transmitter_sink != NULL)
1174 gst_bin_remove (GST_BIN (conference), transmitter_sink);
1175
1176 if (stream_transmitter != NULL)
1177 {
1178 fs_stream_transmitter_stop (stream_transmitter);
1179 g_object_unref (stream_transmitter);
1180 }
1181
1182 if (fstransmitter != NULL)
1183 g_object_unref (fstransmitter);
1206 }
11841207
11851208 done:
11861209 gst_object_unref (conference);
11911214 g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS,
11921215 "There already is a stream in this session");
11931216 goto error;
1217
1218 error:
1219 fs_raw_session_remove_stream (self, NULL);
1220
1221 if (stream_transmitter)
1222 {
1223 fs_stream_transmitter_stop (stream_transmitter);
1224 g_object_unref (stream_transmitter);
1225 }
1226 goto done;
11941227 }
11951228
11961229 FsRawSession *
12431276 g_object_unref (fstransmitter);
12441277 return transmitter_type;
12451278 }
1279
1280 static gboolean
1281 _transmitter_pad_have_data_callback (GstPad *pad, GstBuffer *buffer,
1282 gpointer user_data)
1283 {
1284 FsRawSession *self = FS_RAW_SESSION (user_data);
1285 FsRawConference *conference = fs_raw_session_get_conference (self, NULL);
1286 FsRawStream *stream;
1287 GstElement *recv_capsfilter = NULL;
1288 GstPad *ghostpad;
1289 GstPad *srcpad;
1290 gchar *padname;
1291 FsCodec *codec;
1292
1293 if (!conference)
1294 return FALSE;
1295
1296 GST_OBJECT_LOCK (conference);
1297 if (!self->priv->codecs ||
1298 !self->priv->recv_capsfilter ||
1299 !self->priv->transmitter_recv_probe_id)
1300 {
1301 GST_OBJECT_UNLOCK (conference);
1302 gst_object_unref (conference);
1303 return FALSE;
1304 }
1305
1306 recv_capsfilter = gst_object_ref (self->priv->recv_capsfilter);
1307 gst_pad_remove_data_probe (pad, self->priv->transmitter_recv_probe_id);
1308 self->priv->transmitter_recv_probe_id = 0;
1309 codec = fs_codec_copy (self->priv->codecs->data);
1310 GST_OBJECT_UNLOCK (conference);
1311
1312 srcpad = gst_element_get_static_pad (recv_capsfilter, "src");
1313
1314 if (!srcpad)
1315 {
1316 GST_WARNING ("Unable to get recv_capsfilter (%p) srcpad", recv_capsfilter);
1317 goto error;
1318 }
1319
1320 padname = g_strdup_printf ("src_%d", self->id);
1321 ghostpad = gst_ghost_pad_new_from_template (padname, srcpad,
1322 gst_element_class_get_pad_template (
1323 GST_ELEMENT_GET_CLASS (self->priv->conference),
1324 "src_%d"));
1325 g_free (padname);
1326 gst_object_unref (srcpad);
1327
1328 gst_object_ref (ghostpad);
1329
1330 if (!gst_pad_set_active (ghostpad, TRUE))
1331 GST_WARNING ("Unable to set ghost pad active");
1332
1333
1334 if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference), ghostpad))
1335 {
1336 GST_WARNING ("Unable to add ghost pad to conference");
1337
1338 gst_object_unref (ghostpad);
1339 gst_object_unref (ghostpad);
1340 goto error;
1341 }
1342
1343 GST_OBJECT_LOCK (conference);
1344 self->priv->src_ghost_pad = ghostpad;
1345 stream = g_object_ref (self->priv->stream);
1346 GST_OBJECT_UNLOCK (conference);
1347
1348 fs_stream_emit_src_pad_added (FS_STREAM (stream), ghostpad, codec);
1349
1350 fs_codec_destroy (codec);
1351 g_object_unref (stream);
1352 gst_object_unref (conference);
1353 gst_object_unref (recv_capsfilter);
1354
1355 return TRUE;
1356
1357 error:
1358 fs_codec_destroy (codec);
1359 gst_object_unref (conference);
1360 gst_object_unref (recv_capsfilter);
1361
1362 return FALSE;
1363 }
1364
1365
1366
1367
1368 static FsStreamTransmitter *_stream_get_stream_transmitter (FsRawStream *stream,
1369 const gchar *transmitter_name,
1370 FsParticipant *participant,
1371 GParameter *parameters,
1372 guint n_parameters,
1373 GError **error,
1374 gpointer user_data)
1375 {
1376 FsRawSession *self = user_data;
1377 FsTransmitter *fstransmitter = NULL;
1378 FsStreamTransmitter *stream_transmitter = NULL;
1379 GstElement *transmitter_src = NULL;
1380 FsRawConference *conference;
1381 gchar *tmp;
1382 GstElement *capsfilter;
1383 GstElement *valve;
1384 GstPad *transmitter_src_pad;
1385
1386 conference = fs_raw_session_get_conference (self, error);
1387 if (!conference)
1388 return NULL;
1389
1390 fstransmitter = fs_transmitter_new (transmitter_name, 1, 0, error);
1391
1392 if (!fstransmitter)
1393 goto error;
1394
1395 g_object_set (fstransmitter, "tos", self->priv->tos, NULL);
1396
1397 stream_transmitter = fs_transmitter_new_stream_transmitter (fstransmitter,
1398 participant, n_parameters, parameters, error);
1399
1400 if (!stream_transmitter)
1401 goto error;
1402
1403 g_object_get (fstransmitter, "gst-src", &transmitter_src, NULL);
1404 g_assert (transmitter_src);
1405
1406 if (!gst_bin_add (GST_BIN (conference), transmitter_src))
1407 {
1408 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1409 "Could not add the transmitter's source element"
1410 " for session %d to the conference bin", self->id);
1411 gst_object_unref (transmitter_src);
1412 transmitter_src = NULL;
1413 goto error;
1414 }
1415
1416 tmp = g_strdup_printf ("recv_capsfilter_%d", self->id);
1417 capsfilter = gst_element_factory_make ("capsfilter", tmp);
1418 g_free (tmp);
1419
1420 if (!capsfilter)
1421 {
1422 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1423 "Could not create a capsfilter element for session %d", self->id);
1424 g_object_unref (capsfilter);
1425 goto error;
1426 }
1427
1428 gst_object_ref (capsfilter);
1429
1430 if (!gst_bin_add (GST_BIN (conference), capsfilter))
1431 {
1432 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1433 "Could not add the capsfilter element for session %d", self->id);
1434 gst_object_unref (capsfilter);
1435 gst_object_unref (capsfilter);
1436 goto error;
1437 }
1438 self->priv->recv_capsfilter = capsfilter;
1439
1440 if (gst_element_set_state (self->priv->recv_capsfilter, GST_STATE_PLAYING) ==
1441 GST_STATE_CHANGE_FAILURE)
1442 {
1443 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1444 "Could not set the capsfilter element for session %d", self->id);
1445 goto error;
1446 }
1447
1448 tmp = g_strdup_printf ("recv_valve_%d", self->id);
1449 valve = gst_element_factory_make ("valve", tmp);
1450 g_free (tmp);
1451
1452 if (!valve) {
1453 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1454 "Could not create a valve element for session %d", self->id);
1455 goto error;
1456 }
1457
1458 gst_object_ref (valve);
1459
1460 if (!gst_bin_add (GST_BIN (conference), valve))
1461 {
1462 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1463 "Could not add the valve element for session %d"
1464 " to the conference bin", self->id);
1465 gst_object_unref (valve);
1466 goto error;
1467 }
1468
1469 g_object_set (valve, "drop", TRUE, NULL);
1470
1471 self->priv->recv_valve = valve;
1472
1473 if (gst_element_set_state (self->priv->recv_valve, GST_STATE_PLAYING) ==
1474 GST_STATE_CHANGE_FAILURE) {
1475 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1476 "Could not set the valve element for session %d to the playing state",
1477 self->id);
1478 goto error;
1479 }
1480
1481 if (!gst_element_link (self->priv->recv_valve, self->priv->recv_capsfilter))
1482 {
1483 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1484 "Could not link the recv valve and the capsfilter");
1485 goto error;
1486 }
1487
1488 if (!gst_element_link_pads (transmitter_src, "src1",
1489 valve, "sink"))
1490 {
1491 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1492 "Could not link the recv_valve to the codec bin");
1493 goto error;
1494 }
1495
1496 transmitter_src_pad = gst_element_get_static_pad (transmitter_src, "src1");
1497
1498 GST_OBJECT_LOCK (conference);
1499 self->priv->transmitter = fstransmitter;
1500 self->priv->transmitter_src_pad = transmitter_src_pad;
1501 GST_OBJECT_UNLOCK (conference);
1502
1503 self->priv->transmitter_recv_probe_id = gst_pad_add_data_probe (
1504 self->priv->transmitter_src_pad,
1505 G_CALLBACK (_transmitter_pad_have_data_callback), self);
1506
1507 if (!gst_element_sync_state_with_parent (transmitter_src))
1508 {
1509 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
1510 "Could not sync the transmitter's source element"
1511 " with its parent for session %d", self->id);
1512 goto error;
1513 }
1514
1515 gst_object_unref (transmitter_src);
1516 gst_object_unref (conference);
1517
1518 return stream_transmitter;
1519
1520 error:
1521 if (self->priv->recv_valve)
1522 {
1523 gst_bin_remove (GST_BIN (conference), self->priv->recv_valve);
1524 self->priv->recv_valve = NULL;
1525 }
1526
1527 if (self->priv->recv_capsfilter)
1528 {
1529 gst_bin_remove (GST_BIN (conference), self->priv->recv_capsfilter);
1530 self->priv->recv_capsfilter = NULL;
1531 }
1532
1533 if (transmitter_src)
1534 gst_bin_remove (GST_BIN (conference), transmitter_src);
1535
1536 if (stream_transmitter)
1537 {
1538 fs_stream_transmitter_stop (stream_transmitter);
1539 g_object_unref (stream_transmitter);
1540 }
1541
1542 GST_OBJECT_LOCK (conference);
1543 fstransmitter = self->priv->transmitter;
1544 self->priv->transmitter = NULL;
1545 GST_OBJECT_UNLOCK (conference);
1546
1547 if (fstransmitter)
1548 g_object_unref (fstransmitter);
1549
1550 gst_object_unref (conference);
1551
1552 return NULL;
1553
1554 }
8282 guint id,
8383 GError **error);
8484
85 void raw_session_remove_stream (FsRawSession *self,
85 void fs_raw_session_remove_stream (FsRawSession *self,
8686 FsStream *stream);
8787
8888 void fs_raw_session_update_direction (FsRawSession *self,
7575 PROP_CONFERENCE,
7676 PROP_STREAM_TRANSMITTER,
7777 PROP_REMOTE_CODECS,
78 PROP_TRANSMITTER_PAD,
7978 };
8079
8180
8786 FsRawParticipant *participant;
8887 FsStreamDirection direction;
8988 FsStreamTransmitter *stream_transmitter;
90 GstElement *capsfilter;
91 GstElement *recv_valve;
92 GstPad *transmitter_pad;
93 GstPad *src_pad;
9489
9590 GList *remote_codecs;
96
97 gulong blocking_id;
9891
9992 GError *construction_error;
10093
10396 gulong new_local_candidate_handler_id;
10497 gulong error_handler_id;
10598 gulong state_changed_handler_id;
99
100 stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb;
101 gpointer user_data;
106102
107103 GMutex *mutex; /* protects the conference */
108104
229225 FS_TYPE_RAW_CONFERENCE,
230226 G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
231227
232 g_object_class_install_property (gobject_class,
233 PROP_TRANSMITTER_PAD,
234 g_param_spec_object ("transmitter-pad",
235 "The GstPad this stream is linked to",
236 "This is the pad on which this stream will attach itself",
237 GST_TYPE_PAD,
238 G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
239
240228 /**
241229 * FsRawStream:stream-transmitter:
242230 *
306294 if (!conference)
307295 return;
308296
309 if (self->priv->src_pad)
310 {
311 gst_element_remove_pad (GST_ELEMENT (conference), self->priv->src_pad);
312 gst_pad_set_active (self->priv->src_pad, FALSE);
313 gst_object_unref (self->priv->src_pad);
314 self->priv->src_pad = NULL;
315 }
316
317
318 if (self->priv->recv_valve)
319 {
320 gst_element_set_locked_state (self->priv->recv_valve, TRUE);
321 gst_bin_remove (GST_BIN (conference), self->priv->recv_valve);
322 gst_element_set_state (self->priv->recv_valve, GST_STATE_NULL);
323 gst_object_unref (self->priv->recv_valve);
324 self->priv->recv_valve = NULL;
325 }
326
327 if (self->priv->capsfilter)
328 {
329 gst_element_set_locked_state (self->priv->capsfilter, TRUE);
330 gst_bin_remove (GST_BIN (conference), self->priv->capsfilter);
331 gst_element_set_state (self->priv->capsfilter, GST_STATE_NULL);
332 gst_object_unref (self->priv->capsfilter);
333 self->priv->capsfilter = NULL;
334 }
335
336 if (self->priv->blocking_id)
337 {
338 if (self->priv->transmitter_pad)
339 gst_pad_remove_data_probe (self->priv->transmitter_pad,
340 self->priv->blocking_id);
341 self->priv->blocking_id = 0;
342 }
343
344 if (self->priv->transmitter_pad)
345 {
346 gst_object_unref (self->priv->transmitter_pad);
347 self->priv->transmitter_pad = NULL;
348 }
349297
350298 st = self->priv->stream_transmitter;
351299 self->priv->stream_transmitter = NULL;
375323
376324 if (self->priv->session)
377325 {
378 raw_session_remove_stream (self->priv->session, (FsStream *)self);
326 fs_raw_session_remove_stream (self->priv->session, (FsStream *)self);
379327
380328 g_object_unref (self->priv->session);
381329 self->priv->session = NULL;
507455 case PROP_DIRECTION:
508456 if (g_value_get_flags (value) != self->priv->direction)
509457 {
510 GstElement *recv_valve = NULL;
511 FsStreamTransmitter *st = NULL;
512
513 if (!conference ||
514 !self->priv->recv_valve ||
515 !self->priv->session)
458 FsStreamDirection direction = g_value_get_flags (value);
459 FsStreamTransmitter *st;
460
461 self->priv->direction = direction;
462 st = self->priv->stream_transmitter;
463 if (st)
464 g_object_ref (st);
465
466 if (conference)
467 GST_OBJECT_UNLOCK (conference);
468 if (st)
516469 {
517 self->priv->direction = g_value_get_flags (value);
518 break;
470 g_object_set (st, "sending",
471 (direction & FS_DIRECTION_SEND) ? TRUE : FALSE, NULL);
472 g_object_unref (st);
519473 }
520
521 if (self->priv->recv_valve)
522 recv_valve = gst_object_ref (self->priv->recv_valve);
523 if (self->priv->stream_transmitter)
524 st = g_object_ref (self->priv->stream_transmitter);
525
526 self->priv->direction = g_value_get_flags (value);
527
528 GST_OBJECT_UNLOCK (conference);
529 fs_raw_session_update_direction (self->priv->session,
530 self->priv->direction);
531
532 if (recv_valve)
533 g_object_set (recv_valve, "drop",
534 (self->priv->direction & FS_DIRECTION_RECV) ? FALSE : TRUE, NULL);
535 if (st)
536 g_object_set (st, "sending",
537 (self->priv->direction & FS_DIRECTION_SEND) ? TRUE : FALSE, NULL);
538 GST_OBJECT_LOCK (conference);
539
540 if (recv_valve)
541 gst_object_unref (recv_valve);
542 if (st)
543 g_object_unref (st);
474 fs_raw_session_update_direction (self->priv->session, direction);
475 if (conference)
476 GST_OBJECT_LOCK (conference);
544477 }
545478 break;
546479 case PROP_CONFERENCE:
549482 case PROP_STREAM_TRANSMITTER:
550483 self->priv->stream_transmitter = g_value_get_object (value);
551484 break;
552 case PROP_TRANSMITTER_PAD:
553 self->priv->transmitter_pad = GST_PAD (g_value_dup_object (value));
554 break;
555485 default:
556486 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
557487 break;
564494 }
565495 }
566496
567 static gboolean
568 _transmitter_pad_have_data_callback (GstPad *pad, GstMiniObject *miniobj,
569 gpointer user_data)
570 {
571 FsRawStream *self = FS_RAW_STREAM_CAST (user_data);
572 FsRawConference *conference = fs_raw_stream_get_conference (self, NULL);
573 GList *remote_codecs = NULL;
574 GstElement *capsfilter = NULL;
575 gulong blocking_id = 0;
576 gboolean ret = TRUE;
577 gboolean remove = FALSE;
578
579 GST_OBJECT_LOCK (conference);
580 remote_codecs = self->priv->remote_codecs;
581 capsfilter = self->priv->capsfilter;
582 GST_OBJECT_UNLOCK (conference);
583
584 if (!remote_codecs || !capsfilter)
585 {
586 ret = FALSE;
587 }
588 else if (GST_IS_BUFFER (miniobj))
589 {
590 GstCaps *caps;
591 FsCodec *codec = remote_codecs->data;
592 caps = fs_raw_codec_to_gst_caps (codec);
593
594 if (!GST_IS_CAPS (caps))
595 ret = FALSE;
596 else
597 remove = TRUE;
598
599 gst_caps_unref (caps);
600 }
601
602 blocking_id = self->priv->blocking_id;
603
604 if (remove && blocking_id)
605 {
606 GstPad *ghostpad;
607 GstPad *srcpad;
608 gchar *padname;
609
610 gst_pad_remove_data_probe (pad, blocking_id);
611 GST_OBJECT_LOCK (conference);
612 if (self->priv->blocking_id == blocking_id)
613 self->priv->blocking_id = 0;
614 GST_OBJECT_UNLOCK (conference);
615
616 srcpad = gst_element_get_static_pad (capsfilter, "src");
617
618 if (!srcpad)
619 {
620 GST_WARNING ("Unable to get capsfilter (%p) srcpad", capsfilter);
621 return FALSE;
622 }
623
624 padname = g_strdup_printf ("src_%d", self->priv->session->id);
625 ghostpad = gst_ghost_pad_new_from_template (padname, srcpad,
626 gst_element_class_get_pad_template (
627 GST_ELEMENT_GET_CLASS (self->priv->conference),
628 "src_%d"));
629 g_free (padname);
630
631 gst_object_ref_sink (ghostpad);
632
633 /* XXX Should this really be needed? */
634 if (!gst_pad_set_active (ghostpad, TRUE))
635 GST_WARNING ("Unable to set ghost pad active");
636
637
638 if (!gst_element_add_pad (GST_ELEMENT (self->priv->conference), ghostpad))
639 {
640 GST_WARNING ("Unable to add ghost pad to conference");
641 return FALSE;
642 }
643
644 GST_OBJECT_LOCK (conference);
645 if (self->priv->src_pad)
646 {
647 GST_WARNING ("Src pad %p already exists in session %d",
648 self->priv->src_pad, self->priv->session->id);
649 gst_object_unref (self->priv->src_pad);
650 }
651
652 self->priv->src_pad = ghostpad;
653 GST_OBJECT_UNLOCK (conference);
654
655 fs_stream_emit_src_pad_added (FS_STREAM (self), ghostpad,
656 remote_codecs->data);
657 }
658
659 return ret;
660 }
661
662497 static void
663498 fs_raw_stream_constructed (GObject *object)
664499 {
665500 FsRawStream *self = FS_RAW_STREAM_CAST (object);
666 GstPad *valve_sink_pad = NULL;
667 GstPadLinkReturn linkret;
668 gchar *tmp;
669501
670502 if (!self->priv->conference) {
671503 self->priv->construction_error = g_error_new (FS_ERROR,
672504 FS_ERROR_INVALID_ARGUMENTS, "A Stream needs a conference object");
673505 return;
674506 }
675
676 tmp = g_strdup_printf ("recv_capsfilter_%d", self->priv->session->id);
677 self->priv->capsfilter = gst_element_factory_make ("capsfilter", tmp);
678 g_free (tmp);
679
680 if (!self->priv->capsfilter) {
681 self->priv->construction_error = g_error_new (FS_ERROR,
682 FS_ERROR_CONSTRUCTION, "Could not create a capsfilter element for"
683 " session %d", self->priv->session->id);
684 return;
685 }
686
687 gst_object_ref_sink (self->priv->capsfilter);
688
689 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->capsfilter)) {
690 self->priv->construction_error = g_error_new (FS_ERROR,
691 FS_ERROR_CONSTRUCTION, "Could not add the capsfilter element for"
692 " session %d", self->priv->session->id);
693 gst_object_unref (self->priv->capsfilter);
694 return;
695 }
696
697 if (gst_element_set_state (self->priv->capsfilter, GST_STATE_PLAYING) ==
698 GST_STATE_CHANGE_FAILURE) {
699 self->priv->construction_error = g_error_new (FS_ERROR,
700 FS_ERROR_CONSTRUCTION, "Could not set the capsfilter element for"
701 " session %d", self->priv->session->id);
702 return;
703 }
704
705
706 tmp = g_strdup_printf ("recv_valve_%d", self->priv->session->id);
707 self->priv->recv_valve = gst_element_factory_make ("valve", tmp);
708 g_free (tmp);
709
710 if (!self->priv->recv_valve) {
711 self->priv->construction_error = g_error_new (FS_ERROR,
712 FS_ERROR_CONSTRUCTION, "Could not create a valve element for"
713 " session %d", self->priv->session->id);
714 return;
715 }
716
717 gst_object_ref_sink (self->priv->recv_valve);
718
719 if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->recv_valve))
720 {
721 self->priv->construction_error = g_error_new (FS_ERROR,
722 FS_ERROR_CONSTRUCTION, "Could not add the valve element for session"
723 " %d to the conference bin", self->priv->session->id);
724 gst_object_unref (self->priv->recv_valve);
725 return;
726 }
727
728 if (gst_element_set_state (self->priv->recv_valve, GST_STATE_PLAYING) ==
729 GST_STATE_CHANGE_FAILURE) {
730 self->priv->construction_error = g_error_new (FS_ERROR,
731 FS_ERROR_CONSTRUCTION, "Could not set the valve element for session"
732 " %d to the playing state", self->priv->session->id);
733 return;
734 }
735
736 if (!gst_element_link (self->priv->recv_valve, self->priv->capsfilter))
737 {
738 self->priv->construction_error = g_error_new (FS_ERROR,
739 FS_ERROR_CONSTRUCTION, "Could not link the recv valve"
740 " and the capsfilter");
741 return;
742 }
743
744 valve_sink_pad = gst_element_get_static_pad (self->priv->recv_valve, "sink");
745 if (!valve_sink_pad)
746 {
747 self->priv->construction_error = g_error_new (FS_ERROR,
748 FS_ERROR_CONSTRUCTION,
749 "Could not get the valve's sink pad");
750 return;
751 }
752
753 linkret = gst_pad_link (self->priv->transmitter_pad, valve_sink_pad);
754
755 gst_object_unref (valve_sink_pad);
756
757 if (GST_PAD_LINK_FAILED (linkret))
758 {
759 self->priv->construction_error = g_error_new (FS_ERROR,
760 FS_ERROR_CONSTRUCTION,
761 "Could not link the recv_valve to the codec bin (%d)", linkret);
762 return;
763 }
764
765 self->priv->blocking_id = gst_pad_add_data_probe (
766 self->priv->transmitter_pad,
767 G_CALLBACK (_transmitter_pad_have_data_callback), self);
768507
769508 if (!self->priv->stream_transmitter) {
770509 self->priv->construction_error = g_error_new (FS_ERROR,
812551 return;
813552 }
814553
815 if (self->priv->recv_valve)
816 g_object_set (self->priv->recv_valve, "drop",
817 (self->priv->direction & FS_DIRECTION_RECV) ? FALSE : TRUE, NULL);
818
819554 if (G_OBJECT_CLASS (fs_raw_stream_parent_class)->constructed)
820555 G_OBJECT_CLASS (fs_raw_stream_parent_class)->constructed (object);
821556 }
1051786 GST_OBJECT_UNLOCK (conf);
1052787
1053788 if (is_new)
1054 {
1055 FsCodec *codec = remote_codecs->data;
1056 GstCaps *caps;
1057
1058 caps = fs_raw_codec_to_gst_caps (codec);
1059 g_object_set (self->priv->capsfilter, "caps", caps, NULL);
1060 gst_caps_unref (caps);
1061
1062789 g_object_notify (G_OBJECT (stream), "remote-codecs");
1063 }
1064790
1065791 g_object_unref (session);
1066792 g_object_unref (conf);
1092818 FsStreamDirection direction,
1093819 FsRawConference *conference,
1094820 FsStreamTransmitter *stream_transmitter,
1095 GstPad *transmitter_pad,
821 stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb,
822 gpointer user_data,
1096823 GError **error)
1097824 {
1098825 FsRawStream *self;
1107834 "direction", direction,
1108835 "conference", conference,
1109836 "stream-transmitter", stream_transmitter,
1110 "transmitter-pad", transmitter_pad,
1111837 NULL);
1112838
1113839 if (!self)
1123849 return NULL;
1124850 }
1125851
852 self->priv->get_new_stream_transmitter_cb = get_new_stream_transmitter_cb;
853 self->priv->user_data = user_data;
854
1126855 return self;
1127856 }
1128857
7474
7575 GType fs_raw_stream_get_type (void);
7676
77 typedef FsStreamTransmitter* (*stream_get_new_stream_transmitter_cb) (
78 FsRawStream *stream, const gchar *transmitter_name,
79 FsParticipant *participant, GParameter *parameters, guint n_parameters,
80 GError **error, gpointer user_data);
81
7782 FsRawStream *fs_raw_stream_new (FsRawSession *session,
7883 FsRawParticipant *participant,
7984 FsStreamDirection direction,
8085 FsRawConference *conference,
8186 FsStreamTransmitter *stream_transmitter,
82 GstPad *transmitter_pad,
87 stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb,
88 gpointer user_data,
8389 GError **error);
8490
8591
165165 gchar *tmp;
166166 gint tmp_size;
167167 int i;
168
169 codec_blueprint->codec = g_slice_new0 (FsCodec);
170 codec_blueprint->codec->media_type = media_type;
168 gint id;
169 gchar *encoding_name = NULL;
170 guint clock_rate;
171171
172172 READ_CHECK (read_codec_blueprint_int
173 (in, size, &(codec_blueprint->codec->id)));
173 (in, size, &(id)));
174174 READ_CHECK (read_codec_blueprint_string
175 (in, size, &(codec_blueprint->codec->encoding_name)));
175 (in, size, &(encoding_name)));
176176 READ_CHECK (read_codec_blueprint_uint
177 (in, size, &(codec_blueprint->codec->clock_rate)));
177 (in, size, &(clock_rate)));
178 codec_blueprint->codec = fs_codec_new (id, encoding_name, media_type,
179 clock_rate);
180 g_free (encoding_name);
178181 READ_CHECK (read_codec_blueprint_uint
179182 (in, size, &(codec_blueprint->codec->channels)));
180
181183
182184 READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size));
183185 for (i = 0; i < tmp_size; i++) {
2626 #endif
2727
2828 #include "fs-rtp-codec-negotiation.h"
29
30 #include <gst/farsight/fs-rtp.h>
2931
3032 #include <string.h>
3133
798800 }
799801
800802 static void
803 intersect_feedback_params (FsCodec *new_codec, FsCodec *orig_codec)
804 {
805 GList *item = new_codec->ABI.ABI.feedback_params;
806
807 while (item)
808 {
809 GList *nextitem = item->next;
810 FsFeedbackParameter *param = item->data;
811
812 if (!fs_codec_get_feedback_parameter (orig_codec, param->type,
813 param->subtype, param->extra_params))
814 fs_codec_remove_feedback_parameter (new_codec, item);
815
816 item = nextitem;
817 }
818 }
819
820 static void
801821 negotiate_stream_codec (CodecAssociation *old_ca, FsCodec *remote_codec,
802822 gboolean multi_stream, FsCodec **nego_codec, FsCodec **nego_send_codec)
803823 {
825845 {
826846 fs_codec_destroy (*nego_codec);
827847 *nego_codec = NULL;
848 }
849 }
850
851 if (*nego_codec)
852 {
853 intersect_feedback_params (*nego_codec, old_ca->codec);
854 intersect_feedback_params (*nego_send_codec, old_ca->send_codec);
855
856 if (multi_stream)
857 {
858 (*nego_codec)->ABI.ABI.minimum_reporting_interval =
859 old_ca->codec->ABI.ABI.minimum_reporting_interval;
860 (*nego_send_codec)->ABI.ABI.minimum_reporting_interval =
861 old_ca->send_codec->ABI.ABI.minimum_reporting_interval;
828862 }
829863 }
830864 }
13681402
13691403 return NULL;
13701404 }
1405
1406 FsRtpHeaderExtension *
1407 get_extension (GList *hdrexts, const gchar *uri, guint id)
1408 {
1409 GList *item;
1410
1411 for (item = hdrexts; item; item = item->next)
1412 {
1413 FsRtpHeaderExtension *hdrext = item->data;
1414
1415 if ((!uri || !g_ascii_strcasecmp (hdrext->uri, uri)) &&
1416 (id == G_MAXUINT || hdrext->id == id))
1417 return hdrext;
1418 }
1419
1420 return NULL;
1421 }
1422
1423
1424 static inline gboolean
1425 read_bit (guint8 *array, guint8 bit)
1426 {
1427 return array[bit/8] & (1 << (bit%8));
1428 }
1429
1430 static inline void
1431 write_bit (guint8 *array, guint8 bit)
1432 {
1433 array[bit/8] |= 1 << (bit%8);
1434 }
1435
1436 GList *
1437 create_local_header_extensions (GList *hdrexts_old, GList *hdrexts_prefs,
1438 guint8 *used_ids)
1439 {
1440 GList *hdrexts_new = fs_rtp_header_extension_list_copy (hdrexts_prefs);
1441 GList *item;
1442
1443 for (item = hdrexts_new; item; item = item->next)
1444 {
1445 FsRtpHeaderExtension *hdrext = item->data;
1446 FsRtpHeaderExtension *hdrext_existing = get_extension (hdrexts_old,
1447 hdrext->uri, G_MAXUINT);
1448
1449 if (hdrext_existing &&
1450 hdrext_existing->id < 256 &&
1451 !get_extension (hdrexts_prefs, NULL, hdrext->id))
1452 hdrext->id = hdrext_existing->id;
1453 }
1454
1455 for (item = hdrexts_new; item; item = item->next)
1456 {
1457 FsRtpHeaderExtension *hdrext = item->data;
1458 if (hdrext->id < 256)
1459 write_bit (used_ids, hdrext->id);
1460 }
1461
1462 return hdrexts_new;
1463 }
1464
1465 static void
1466 renumber_hdrext (GList *hdrexts, guint old_id, guint new_id)
1467 {
1468 GList *item;
1469
1470 for (item = hdrexts; item; item = item->next)
1471 {
1472 FsRtpHeaderExtension *hdrext = item->data;
1473
1474 if (hdrext->id == old_id)
1475 hdrext->id = new_id;
1476 }
1477 }
1478
1479 GList *
1480 negotiate_stream_header_extensions (GList *hdrexts, GList *hdrexts_stream,
1481 gboolean favor_remote, guint8 *used_ids)
1482 {
1483 GList *item;
1484
1485 if (!hdrexts)
1486 return NULL;
1487
1488 for (item = hdrexts_stream; item; item = item->next)
1489 {
1490 FsRtpHeaderExtension *hdrext_stream = item->data;
1491 if (hdrext_stream->id < 256)
1492 write_bit (used_ids, hdrext_stream->id);
1493 }
1494
1495 for (item = hdrexts; item;)
1496 {
1497 FsRtpHeaderExtension *hdrext = item->data;
1498 FsRtpHeaderExtension *hdrext_stream = get_extension (hdrexts_stream,
1499 hdrext->uri, G_MAXUINT);
1500 GList *next = item->next;
1501
1502 if (hdrext_stream)
1503 {
1504 /* Use the minimum direction */
1505 hdrext->direction &= hdrext_stream->direction;
1506 /* If favor remotes, then we use the remote one for all matching
1507 * extensions, we want to preserve duplicates, modules will pick
1508 * the one they prefer if they have a preference
1509 */
1510 if (favor_remote)
1511 renumber_hdrext (hdrexts, hdrext->id, hdrext_stream->id);
1512 }
1513 else
1514 {
1515 hdrexts = g_list_delete_link (hdrexts, item);
1516 fs_rtp_header_extension_destroy (hdrext);
1517 }
1518
1519 item = next;
1520 }
1521
1522 return hdrexts;
1523 }
1524
1525 static GList *
1526 hdrext_list_remove_by_id (GList *hdrexts, guint id)
1527 {
1528 GList *item;
1529
1530 for (item = hdrexts; item; item = item->next)
1531 {
1532 FsRtpHeaderExtension *hdrext = item->data;
1533
1534 if (hdrext->id == id)
1535 {
1536 GList *next = item->next;
1537
1538 hdrexts = g_list_delete_link (hdrexts, item);
1539 fs_rtp_header_extension_destroy (hdrext);
1540 item = next;
1541 }
1542 }
1543
1544 return hdrexts;
1545 }
1546
1547 GList *
1548 finish_header_extensions_nego (GList *hdrexts, guint8 *used_ids)
1549 {
1550 GList *item;
1551 guint min = 1;
1552
1553 for (item = hdrexts; item;)
1554 {
1555 FsRtpHeaderExtension *hdrext = item->data;
1556
1557 if (hdrext->id >= 256)
1558 {
1559
1560 /* Find the next available ID */
1561 for (; min < 256; min++)
1562 if (!read_bit (used_ids, min))
1563 break;
1564
1565 if (min < 256)
1566 {
1567 /* We have a valid ID, remove any other extension with the same ID */
1568 /* and then use it */
1569 item = hdrext_list_remove_by_id (item->next, hdrext->id);
1570 hdrext->id = min;
1571 write_bit (used_ids, min);
1572 min++;
1573 }
1574 else
1575 {
1576 /* We lost, we used all slots between 1 and 255... forget this extension
1577 */
1578 GList *next = item->next;
1579
1580 hdrexts = g_list_delete_link (hdrexts, item);
1581 fs_rtp_header_extension_destroy (hdrext);
1582 item = next;
1583 }
1584 }
1585 else
1586 {
1587 /* Item already has a valid number, keep as-is */
1588 item = item->next;
1589 }
1590 }
1591
1592 return hdrexts;
1593
1594 }
3030
3131 /**
3232 * CodecAssociation:
33 * @blueprint: Blueprint used to construct this CodecAssociation (or NULL if
34 * this is strictly from profiles)
35 * @codec: The codec this represents.. With the receive-side paremeters
36 * @send_codec: The same codec, but with the send-side parameters
3337 * @reserved: Marks a payload-type reserved at the users request
3438 * @disable: means that its not a real association, just a spot thats disabled,
3539 * its marks the PT of a remote codec that has been refused
123127 guint *src_pad_count, guint *sink_pad_count, GError **error);
124128
125129
130
131 GList *
132 create_local_header_extensions (GList *hdrext_old, GList *hdrext_prefs,
133 guint8 *used_ids);
134 GList *
135 negotiate_stream_header_extensions (GList *hdrext, GList *hdrext_remote,
136 gboolean favor_remote, guint8 *used_ids);
137 GList *
138 finish_header_extensions_nego (GList *hdrexts, guint8 *used_ids);
139
126140 G_END_DECLS
127141
128142 #endif /* __FS_RTP_CODEC_NEGOTIATION_H__ */
356356 static void
357357 rtpbin_get_sdes (FsRtpConference *self, const gchar *prop, GValue *val)
358358 {
359 if (g_object_class_find_property (G_OBJECT_GET_CLASS (self->gstrtpbin),
360 "sdes"))
361 {
362 GstStructure *s;
363 const GValue *sval;
364 g_object_get (self->gstrtpbin, "sdes", &s, NULL);
365 sval = gst_structure_get_value (s, prop);
366 if (sval)
367 g_value_copy (gst_structure_get_value (s, prop), val);
368 gst_structure_free (s);
369 }
370 else
371 {
372 gchar *str = g_strdup_printf ("sdes-%s", prop);
373 g_object_get_property (G_OBJECT (self->gstrtpbin), str, val);
374 g_free (str);
375 }
359 GstStructure *s;
360 const GValue *sval;
361 g_object_get (self->gstrtpbin, "sdes", &s, NULL);
362 sval = gst_structure_get_value (s, prop);
363 if (sval)
364 g_value_copy (gst_structure_get_value (s, prop), val);
365 gst_structure_free (s);
376366 }
377367
378368 static void
418408 static void
419409 rtpbin_set_sdes (FsRtpConference *self, const gchar *prop, const GValue *val)
420410 {
421 if (g_object_class_find_property (G_OBJECT_GET_CLASS (self->gstrtpbin),
422 "sdes"))
423 {
424 GstStructure *s;
425 g_object_get (self->gstrtpbin, "sdes", &s, NULL);
426 gst_structure_set_value (s, prop, val);
427 g_object_set (self->gstrtpbin, "sdes", s, NULL);
428 gst_structure_free (s);
429 }
430 else
431 {
432 gchar *str = g_strdup_printf ("sdes-%s", prop);
433 g_object_set_property (G_OBJECT (self->gstrtpbin), str, val);
434 g_free (str);
435 }
411 GstStructure *s;
412 g_object_get (self->gstrtpbin, "sdes", &s, NULL);
413 gst_structure_set_value (s, prop, val);
414 g_object_set (self->gstrtpbin, "sdes", s, NULL);
415 gst_structure_free (s);
436416 }
437417
438418 static void
906886
907887 for (item = codec->optional_params;
908888 item;
909 item = g_list_next (item)) {
889 item = g_list_next (item))
890 {
910891 FsCodecParameter *param = item->data;
911892 gchar *lower_name = g_ascii_strdown (param->name, -1);
912893
919900 g_free (lower_name);
920901 }
921902
903 for (item = codec->ABI.ABI.feedback_params;
904 item;
905 item = g_list_next (item))
906 {
907 FsFeedbackParameter *param = item->data;
908 gchar *lower_type = g_ascii_strdown (param->type, -1);
909 gchar *rtcpfb_name;
910
911 if (param->subtype[0])
912 {
913 gchar *lower_subt = g_ascii_strdown (param->subtype, -1);
914 rtcpfb_name = g_strdup_printf ("rtcp-fb-%s-%s", lower_type, lower_subt);
915 g_free (lower_subt);
916 }
917 else
918 {
919 rtcpfb_name = g_strdup_printf ("rtcp-fb-%s", lower_type);
920 }
921
922 gst_structure_set (structure,
923 rtcpfb_name, G_TYPE_STRING, param->extra_params, NULL);
924 g_free (lower_type);
925 g_free (rtcpfb_name);
926 }
927
922928 caps = gst_caps_new_full (structure, NULL);
923929
924930 return caps;
546546 {
547547 codec_cap = (CodecCap *)(walk->data);
548548
549 codec = g_slice_new0 (FsCodec);
550 codec->id = FS_CODEC_ID_ANY;
551 codec->clock_rate = 0;
549 codec = fs_codec_new (FS_CODEC_ID_ANY, NULL, media_type, 0);
552550
553551 for (i = 0; i < gst_caps_get_size (codec_cap->rtp_caps); i++)
554552 {
6565 #include <gst/rtp/gstrtcpbuffer.h>
6666
6767 #include <gst/farsight/fs-transmitter.h>
68 #include "gst/farsight/fs-utils.h"
69 #include <gst/farsight/fs-rtp.h>
6870
6971 #include "fs-rtp-stream.h"
7072 #include "fs-rtp-participant.h"
9799 PROP_CONFERENCE,
98100 PROP_NO_RTCP_TIMEOUT,
99101 PROP_SSRC,
100 PROP_TOS
102 PROP_TOS,
103 PROP_SEND_BITRATE,
104 PROP_RTP_HEADER_EXTENSIONS,
105 PROP_RTP_HEADER_EXTENSION_PREFERENCES
101106 };
102107
103108 #define DEFAULT_NO_RTCP_TIMEOUT (7000)
110115 FsRtpConference *conference;
111116
112117 GHashTable *transmitters;
113
114 GList *transmitters_add_sink;
115118
116119 /* We keep references to these elements
117120 */
181184 /* These are protected by the session mutex */
182185 GList *codec_associations;
183186
187 GList *hdrext_negotiated;
188 GList *hdrext_preferences;
189
184190 /* Protected by the session mutex */
185191 gint no_rtcp_timeout;
186192
198204
199205 /* IP Type of Service, protext by session mutex */
200206 guint tos;
207
208 /* Protected by sessioin mutex */
209 guint send_bitrate;
201210
202211 /* Can only be used while using the lock */
203212 GStaticRWLock disposed_lock;
297306 _discovery_pad_blocked_callback (GstPad *pad, gboolean blocked,
298307 gpointer user_data);
299308
309 static void
310 fs_rtp_session_set_send_bitrate (FsRtpSession *self, guint bitrate);
311 static gboolean
312 codecbin_set_bitrate (GstElement *codecbin, guint bitrate);
300313
301314 //static guint signals[LAST_SIGNAL] = { 0 };
302315
370383 " (defaults to a random value)",
371384 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
372385
386 g_object_class_install_property (gobject_class,
387 PROP_SEND_BITRATE,
388 g_param_spec_uint ("send-bitrate",
389 "The bitrate at which data will be sent",
390 "The bitrate that the session will try to send at in bits/sec",
391 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
392
393 g_object_class_install_property (gobject_class,
394 PROP_RTP_HEADER_EXTENSIONS,
395 g_param_spec_boxed ("rtp-header-extensions",
396 "Currently negotiated RTP header extensions",
397 "GList of RTP Header extensions that have been negotiated and will"
398 " be used when sending of receiving RTP packets",
399 FS_TYPE_RTP_HEADER_EXTENSION_LIST,
400 G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
401
402 g_object_class_install_property (gobject_class,
403 PROP_RTP_HEADER_EXTENSION_PREFERENCES,
404 g_param_spec_boxed ("rtp-header-extension-preferences",
405 "Desired RTP header extensions",
406 "GList of RTP Header extensions that are locally supported and"
407 " desired by the application",
408 FS_TYPE_RTP_HEADER_EXTENSION_LIST,
409 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
410
373411 gobject_class->dispose = fs_rtp_session_dispose;
374412 gobject_class->finalize = fs_rtp_session_finalize;
375413
408446 FsRtpSession *self = FS_RTP_SESSION (user_data);
409447 FsTransmitter *transmitter = FS_TRANSMITTER (value);
410448 GstElement *src, *sink;
411 GstObject *parent;
412449
413450 g_object_get (transmitter, "gst-sink", &sink, "gst-src", &src, NULL);
414451
418455
419456 gst_element_set_locked_state (sink, TRUE);
420457 gst_element_set_state (sink, GST_STATE_NULL);
421 if ((parent = gst_object_get_parent (GST_OBJECT (sink))))
422 {
423 gst_object_unref (parent);
424 gst_bin_remove (GST_BIN (self->priv->conference), sink);
425 }
458 gst_bin_remove (GST_BIN (self->priv->conference), sink);
426459
427460 gst_object_unref (src);
428461 gst_object_unref (sink);
663696 self->priv->transmitters = NULL;
664697 }
665698
666 g_list_foreach (self->priv->transmitters_add_sink, (GFunc) g_object_unref,
667 NULL);
668 g_list_free (self->priv->transmitters_add_sink);
669 self->priv->transmitters_add_sink = NULL;
670
671699 if (self->priv->free_substreams)
672700 {
673701 g_list_foreach (self->priv->free_substreams, (GFunc) g_object_unref, NULL);
734762
735763 fs_codec_list_destroy (self->priv->codec_preferences);
736764 codec_association_list_destroy (self->priv->codec_associations);
765
766 fs_rtp_header_extension_list_destroy (self->priv->hdrext_preferences);
767 fs_rtp_header_extension_list_destroy (self->priv->hdrext_negotiated);
737768
738769 if (self->priv->current_send_codec)
739770 fs_codec_destroy (self->priv->current_send_codec);
866897 g_value_set_uint (value, self->priv->tos);
867898 FS_RTP_SESSION_UNLOCK (self);
868899 break;
900 case PROP_RTP_HEADER_EXTENSIONS:
901 FS_RTP_SESSION_LOCK (self);
902 g_value_set_boxed (value, self->priv->hdrext_negotiated);
903 FS_RTP_SESSION_UNLOCK (self);
904 break;
905 case PROP_RTP_HEADER_EXTENSION_PREFERENCES:
906 FS_RTP_SESSION_LOCK (self);
907 g_value_set_boxed (value, self->priv->hdrext_preferences);
908 FS_RTP_SESSION_UNLOCK (self);
909 break;
869910 default:
870911 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
871912 break;
921962 GUINT_TO_POINTER (self->priv->tos));
922963 FS_RTP_SESSION_UNLOCK (self);
923964 break;
965 case PROP_SEND_BITRATE:
966 fs_rtp_session_set_send_bitrate (self, g_value_get_uint (value));
967 break;
968 case PROP_RTP_HEADER_EXTENSION_PREFERENCES:
969 FS_RTP_SESSION_LOCK (self);
970 fs_rtp_header_extension_list_destroy (self->priv->hdrext_preferences);
971 self->priv->hdrext_preferences = g_value_dup_boxed (value);
972 FS_RTP_SESSION_UNLOCK (self);
973 /* This call can't fail because the codecs do NOT change */
974 fs_rtp_session_update_codecs (self, NULL, NULL, NULL);
975 break;
924976 default:
925977 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
926978 break;
11881240
11891241 gst_element_set_state (funnel, GST_STATE_PLAYING);
11901242
1243 g_signal_emit_by_name (self->priv->conference->gstrtpbin,
1244 "get-internal-session", self->id, &self->priv->rtpbin_internal_session);
1245
1246 if (!self->priv->rtpbin_internal_session)
1247 {
1248 self->priv->construction_error = g_error_new (FS_ERROR,
1249 FS_ERROR_CONSTRUCTION,
1250 "Could not get the rtpbin's internal session");
1251 return;
1252 }
1253
1254 g_signal_connect (self->priv->rtpbin_internal_session,
1255 "notify::internal-ssrc",
1256 G_CALLBACK (_rtpbin_internal_session_notify_internal_ssrc), self);
1257
1258 g_object_set (self->priv->rtpbin_internal_session,
1259 "favor-new", TRUE,
1260 "bandwidth", (gdouble) 0,
1261 "rtcp-fraction", (gdouble) 0.05,
1262 NULL);
1263
11911264 /* Lets now create the RTP muxer */
11921265
11931266 tmp = g_strdup_printf ("send_rtp_muxer_%u", self->id);
13791452 }
13801453
13811454 gst_element_set_state (capsfilter, GST_STATE_PLAYING);
1382
1383 g_signal_emit_by_name (self->priv->conference->gstrtpbin,
1384 "get-internal-session", self->id, &self->priv->rtpbin_internal_session);
1385
1386 if (!self->priv->rtpbin_internal_session)
1387 {
1388 self->priv->construction_error = g_error_new (FS_ERROR,
1389 FS_ERROR_CONSTRUCTION,
1390 "Could not get the rtpbin's internal session");
1391 return;
1392 }
1393
1394 g_signal_connect (self->priv->rtpbin_internal_session,
1395 "notify::internal-ssrc",
1396 G_CALLBACK (_rtpbin_internal_session_notify_internal_ssrc), self);
1397
1398 if (g_object_class_find_property (
1399 G_OBJECT_GET_CLASS (self->priv->rtpbin_internal_session),
1400 "favor-new"))
1401 g_object_set (self->priv->rtpbin_internal_session, "favor-new", TRUE,
1402 NULL);
1403
14041455
14051456 if (!fs_rtp_session_update_codecs (self, NULL, NULL,
14061457 &self->priv->construction_error))
16971748 GError **error)
16981749 {
16991750 FsRtpSession *self = FS_RTP_SESSION (session);
1700 gboolean ret = TRUE;
1751 gboolean ret;
17011752
17021753 if (fs_rtp_session_has_disposed_enter (self, error))
17031754 return FALSE;
17191770 {
17201771 g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
17211772 "The passed codec is not part of the list of codecs");
1773 ret = FALSE;
17221774 }
17231775
17241776 FS_RTP_SESSION_UNLOCK (self);
19652017 {
19662018 FsTransmitter *transmitter;
19672019 GstElement *src = NULL;
1968 gboolean sink_add_later = FALSE;
19692020 guint tos;
19702021
19712022 FS_RTP_SESSION_LOCK (self);
19902041 g_signal_connect (transmitter, "get-recvonly-filter",
19912042 G_CALLBACK (_get_recvonly_filter), NULL);
19922043
1993 if (self->priv->send_codecbin)
1994 {
1995 if (!fs_rtp_session_add_transmitter_gst_sink (self, transmitter, error))
1996 goto error;
1997 }
1998 else
1999 {
2000 sink_add_later = TRUE;
2001 }
2044 if (!fs_rtp_session_add_transmitter_gst_sink (self, transmitter, error))
2045 goto error;
20022046
20032047 g_object_get (transmitter, "gst-src", &src, NULL);
20042048
20332077
20342078 g_object_ref (transmitter);
20352079
2036 if (sink_add_later)
2037 self->priv->transmitters_add_sink = g_list_prepend (
2038 self->priv->transmitters_add_sink, g_object_ref (transmitter));
20392080 g_hash_table_insert (self->priv->transmitters, g_strdup (transmitter_name),
20402081 transmitter);
20412082 FS_RTP_SESSION_UNLOCK (self);
22622303 * @remote_codecs: The #GList of remote codecs to use for that stream
22632304 * @has_remotes: Set to %TRUE if at least one stream has remote codecs
22642305 * set to %FALSE otherwise
2306 * @is_new: Set to %TRUE if the codecs associations have changed
22652307 *
22662308 * Negotiates the codecs using the current (stored) codecs
22672309 * and the remote codecs from each stream.
22682310 * If a stream is specified, it will use the specified remote codecs
22692311 * instead of the ones currently in the stream
22702312 *
2271 * Returns: the newly negotiated codec associations or %NULL on error
2313 * Returns: %TRUE if a new list could be negotiated, otherwise %FALSE and sets
2314 * @error
22722315 */
22732316
2274 static GList *
2317 static gboolean
22752318 fs_rtp_session_negotiate_codecs_locked (FsRtpSession *session,
22762319 FsRtpStream *stream,
22772320 GList *remote_codecs,
22782321 gboolean *has_remotes,
2322 gboolean *is_new,
22792323 GError **error)
22802324 {
22812325 gint streams_with_codecs = 0;
22822326 gboolean has_many_streams = FALSE;
22832327 GList *new_negotiated_codec_associations = NULL;
22842328 GList *item;
2329 guint8 hdrext_used_ids[8];
2330 GList *new_hdrexts = NULL;
22852331
22862332 *has_remotes = FALSE;
22872333
23152361 goto error;
23162362 }
23172363
2364 new_hdrexts = create_local_header_extensions (
2365 session->priv->hdrext_negotiated, session->priv->hdrext_preferences,
2366 hdrext_used_ids);
2367
23182368 for (item = g_list_first (session->priv->streams);
23192369 item;
23202370 item = g_list_next (item))
23412391
23422392 if (!new_negotiated_codec_associations)
23432393 break;
2394
2395 new_hdrexts = negotiate_stream_header_extensions (new_hdrexts,
2396 mystream->hdrext, !has_many_streams, hdrext_used_ids);
23442397 }
23452398 }
23462399
23602413 fs_rtp_special_sources_negotiation_filter (
23612414 new_negotiated_codec_associations);
23622415
2363 return new_negotiated_codec_associations;
2416 if (session->priv->codec_associations)
2417 *is_new = ! codec_associations_list_are_equal (
2418 session->priv->codec_associations, new_negotiated_codec_associations);
2419
2420 codec_association_list_destroy (session->priv->codec_associations);
2421 session->priv->codec_associations = new_negotiated_codec_associations;
2422
2423 new_hdrexts = finish_header_extensions_nego (new_hdrexts, hdrext_used_ids);
2424
2425 fs_rtp_header_extension_list_destroy (session->priv->hdrext_negotiated);
2426 session->priv->hdrext_negotiated = new_hdrexts;
2427
2428 return TRUE;
23642429
23652430 error:
23662431
2367 return NULL;
2432 fs_rtp_header_extension_list_destroy (new_hdrexts);
2433
2434 return FALSE;
23682435 }
23692436
23702437
23912458 GList *remote_codecs,
23922459 GError **error)
23932460 {
2394 GList *new_negotiated_codec_associations = NULL;
23952461 gboolean is_new = TRUE;
2396 GList *old_negotiated_codec_associations;
23972462 gboolean has_remotes = FALSE;
23982463
23992464 FS_RTP_SESSION_LOCK (session);
24002465
2401 old_negotiated_codec_associations =
2402 session->priv->codec_associations;
2403
2404 new_negotiated_codec_associations = fs_rtp_session_negotiate_codecs_locked (
2405 session, stream, remote_codecs, &has_remotes, error);
2406
2407 if (!new_negotiated_codec_associations)
2466 if (!fs_rtp_session_negotiate_codecs_locked (
2467 session, stream, remote_codecs, &has_remotes, &is_new, error))
24082468 {
24092469 FS_RTP_SESSION_UNLOCK (session);
24102470 return FALSE;
2411 }
2412
2413 session->priv->codec_associations = new_negotiated_codec_associations;
2414
2415 if (old_negotiated_codec_associations)
2416 {
2417 is_new = ! codec_associations_list_are_equal (
2418 old_negotiated_codec_associations,
2419 new_negotiated_codec_associations);
2420
2421 codec_association_list_destroy (old_negotiated_codec_associations);
24222471 }
24232472
24242473 fs_rtp_session_distribute_recv_codecs_locked (session, stream, remote_codecs);
24832532 }
24842533
24852534 static void
2535 fs_rtp_session_update_minimum_rtcp_interval (FsRtpSession *self,
2536 FsRtpSubStream *skip_substream)
2537 {
2538 guint min_interval = 5000;
2539 GList *item, *item2;
2540
2541 FS_RTP_SESSION_LOCK (self);
2542
2543 if (self->priv->current_send_codec)
2544 min_interval = MIN (min_interval,
2545 self->priv->current_send_codec->ABI.ABI.minimum_reporting_interval);
2546
2547 for (item = self->priv->free_substreams; item; item = item->next)
2548 {
2549 FsRtpSubStream *substream = item->data;
2550
2551 if (substream == skip_substream)
2552 continue;
2553
2554 if (substream->codec)
2555 min_interval = MIN (min_interval,
2556 substream->codec->ABI.ABI.minimum_reporting_interval);
2557 }
2558
2559 for (item2 = self->priv->streams; item2; item2 = item2->next)
2560 {
2561 FsRtpStream *stream = item2->data;
2562
2563 for (item = stream->substreams; item; item = item->next)
2564 {
2565 FsRtpSubStream *substream = item->data;
2566
2567 if (substream == skip_substream)
2568 continue;
2569
2570 if (substream->codec)
2571 min_interval = MIN (min_interval,
2572 substream->codec->ABI.ABI.minimum_reporting_interval);
2573 }
2574 }
2575
2576 FS_RTP_SESSION_UNLOCK (self);
2577
2578 g_object_set (self->priv->rtpbin_internal_session,
2579 "rtcp-min-interval", (guint64) min_interval * GST_MSECOND, NULL);
2580
2581 }
2582
2583 static void
24862584 _substream_unlinked (FsRtpSubStream *substream, gpointer user_data)
24872585 {
24882586 FsRtpSession *self = FS_RTP_SESSION (user_data);
24892587
2490
24912588 if (fs_rtp_session_has_disposed_enter (self, NULL))
24922589 return;
2590
2591 fs_rtp_session_update_minimum_rtcp_interval (self, substream);
24932592
24942593 FS_RTP_SESSION_LOCK (self);
24952594
25062605 {
25072606 FS_RTP_SESSION_UNLOCK (self);
25082607 }
2608
2609 fs_rtp_session_has_disposed_exit (self);
2610 }
2611
2612 static void
2613 _substream_codec_changed (FsRtpSubStream *substream, FsRtpSession *self)
2614 {
2615 if (fs_rtp_session_has_disposed_enter (self, NULL))
2616 return;
2617
2618 fs_rtp_session_update_minimum_rtcp_interval (self, NULL);
25092619
25102620 fs_rtp_session_has_disposed_exit (self);
25112621 }
25632673
25642674 g_signal_connect_object (substream, "unlinked",
25652675 G_CALLBACK (_substream_unlinked), session, 0);
2676
2677 g_signal_connect_object (substream, "codec-changed",
2678 G_CALLBACK (_substream_codec_changed), session, 0);
25662679
25672680 /* Lets find the FsRtpStream for this substream, if no Stream claims it
25682681 * then we just store it
30813194 return FALSE;
30823195 }
30833196
3197 /**
3198 * @codec: The currently selected codec for sending (but not the send_codec)
3199 */
30843200
30853201 static gboolean
30863202 fs_rtp_session_remove_send_codec_bin (FsRtpSession *self,
3087 FsCodec *send_codec,
3203 FsCodec *codec,
30883204 GstElement *send_codecbin,
30893205 gboolean error_emit)
30903206 {
31493265 self->priv->extra_send_capsfilters);
31503266 }
31513267
3152 if (send_codec)
3268 if (codec)
31533269 fs_rtp_special_sources_remove (
31543270 &self->priv->extra_sources,
31553271 &self->priv->codec_associations,
31563272 FS_RTP_SESSION_GET_LOCK (self),
3157 send_codec);
3273 codec);
31583274
31593275 return TRUE;
31603276 }
31863302 GstIterator *iter;
31873303 GValue link_rv = {0};
31883304 struct link_data data;
3189 GList *item;
31903305 FsCodec *send_codec_copy = fs_codec_copy (ca->send_codec);
31913306 FsCodec *codec_copy = fs_codec_copy (ca->codec);
31923307
32003315 g_free (name);
32013316
32023317 sendcaps = fs_codec_to_gst_caps (ca->send_codec);
3318
3319 if (codecbin)
3320 codecbin_set_bitrate (codecbin, session->priv->send_bitrate);
32033321
32043322 FS_RTP_SESSION_UNLOCK (session);
32053323
33023420
33033421
33043422 FS_RTP_SESSION_LOCK (session);
3305 while ((item = session->priv->transmitters_add_sink) != NULL)
3306 {
3307 FsTransmitter *transmitter = item->data;
3308
3309 session->priv->transmitters_add_sink = g_list_delete_link (
3310 session->priv->transmitters_add_sink, item);
3311
3312 FS_RTP_SESSION_UNLOCK (session);
3313
3314 if (!fs_rtp_session_add_transmitter_gst_sink (session, transmitter, error))
3315 {
3316 FS_RTP_SESSION_LOCK (session);
3317 g_object_unref (transmitter);
3318 g_list_foreach (session->priv->transmitters_add_sink,
3319 (GFunc) g_object_unref, NULL);
3320 g_list_free (session->priv->transmitters_add_sink);
3321 session->priv->transmitters_add_sink = NULL;
3322 goto error_locked;
3323 }
3324
3325 g_object_unref (transmitter);
3326 FS_RTP_SESSION_LOCK (session);
3327 }
3423
3424 /* Re-set it here in case in changed while we were unlocked */
3425 codecbin_set_bitrate (codecbin, session->priv->send_bitrate);
33283426
33293427 if (session->priv->streams_sending)
33303428 g_object_set (session->priv->media_sink_valve, "drop", FALSE, NULL);
33613459 fs_codec_destroy (codec_copy);
33623460 fs_codec_destroy (send_codec_copy);
33633461 return NULL;
3364
3365 error_locked:
3366
3367 FS_RTP_SESSION_UNLOCK (session);
3368 goto error;
33693462 }
33703463
33713464 static void
34273520 &self->priv->extra_sources,
34283521 &self->priv->codec_associations,
34293522 FS_RTP_SESSION_GET_LOCK (self),
3430 send_codec_copy);
3523 codec_copy);
34313524 goto skip_main_codec;
34323525 }
34333526
34723565 &self->priv->extra_sources,
34733566 &self->priv->codec_associations,
34743567 FS_RTP_SESSION_GET_LOCK (self),
3475 send_codec_copy,
3568 codec_copy,
34763569 GST_ELEMENT (self->priv->conference),
34773570 self->priv->rtpmuxer);
34783571
44074500
44084501 gst_element_send_event (session->priv->rtpmuxer,
44094502 gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
4410 gst_structure_new ("GstForceKeyUnit", NULL)));
4503 gst_structure_new ("GstForceKeyUnit",
4504 "all-headers", G_TYPE_BOOLEAN, TRUE,
4505 NULL)));
44114506
44124507 fs_rtp_session_has_disposed_exit (session);
44134508 }
4509
4510 struct CodecBinSetBitrateData
4511 {
4512 guint bitrate;
4513 gboolean ret;
4514 };
4515
4516 static void
4517 codecbin_set_bitrate_func (gpointer e, gpointer user_data)
4518 {
4519 GstElement *elem = e;
4520 struct CodecBinSetBitrateData *data = user_data;
4521
4522 if (g_object_class_find_property (G_OBJECT_GET_CLASS (elem), "bitrate"))
4523 {
4524 fs_utils_set_bitrate (elem, data->bitrate);
4525 data->ret = TRUE;
4526 }
4527
4528 gst_object_unref (elem);
4529 }
4530
4531 static gboolean
4532 codecbin_set_bitrate (GstElement *codecbin, guint bitrate)
4533 {
4534 GstIterator *it;
4535 struct CodecBinSetBitrateData data;
4536
4537 if (bitrate == 0)
4538 return FALSE;
4539
4540 data.bitrate = bitrate;
4541 data.ret = FALSE;
4542
4543 it = gst_bin_iterate_recurse (GST_BIN (codecbin));
4544 gst_iterator_foreach (it, codecbin_set_bitrate_func, &data);
4545 gst_iterator_free (it);
4546
4547 return data.ret;
4548 }
4549
4550 static void
4551 fs_rtp_session_set_send_bitrate (FsRtpSession *self, guint bitrate)
4552 {
4553 FS_RTP_SESSION_LOCK (self);
4554
4555 if (bitrate)
4556 self->priv->send_bitrate = bitrate;
4557
4558 if (self->priv->send_codecbin)
4559 codecbin_set_bitrate (self->priv->send_codecbin, bitrate);
4560
4561 FS_RTP_SESSION_UNLOCK (self);
4562 }
357357 * @negotiated_codec_associations: A pointer to the #GList of current negotiated
358358 * #CodecAssociation
359359 * @mutex: the mutex protecting the last two things
360 * @send_codec: A pointer to the currently selected send codec
360 * @selected_codec: A pointer to the currently selected codec for sending,
361 * but not send_codec
361362 *
362363 * This function removes any special source that are not compatible with the
363364 * currently selected send codec.
369370 GList **extra_sources,
370371 GList **negotiated_codec_associations,
371372 GMutex *mutex,
372 FsCodec *send_codec)
373 FsCodec *selected_codec)
373374 {
374375 GList *klass_item = NULL;
375376 gboolean changed = FALSE;
400401 if (obj_item)
401402 {
402403 FsCodec *telephony_codec = fs_rtp_special_source_class_get_codec (klass,
403 *negotiated_codec_associations, send_codec);
404 *negotiated_codec_associations, selected_codec);
404405
405406 if (!telephony_codec || !fs_codec_are_equal (telephony_codec, obj->codec))
406407 {
434435 * @negotiated_codec_associations: A pointer to the #GList of current negotiated
435436 * #CodecAssociation
436437 * @mutex: the mutex protecting the last two things
437 * @send_codec: The currently selected send codec
438 * @selected_codec: The currently selected codec for sending (but not
439 * send_codec)
438440 * @bin: The #GstBin to add the stuff to
439441 * @rtpmuxer: The rtpmux element
440442 *
447449 GList **extra_sources,
448450 GList **negotiated_codec_associations,
449451 GMutex *mutex,
450 FsCodec *send_codec,
452 FsCodec *selected_codec,
451453 GstElement *bin,
452454 GstElement *rtpmuxer)
453455 {
478480
479481 if (!obj_item &&
480482 fs_rtp_special_source_class_get_codec (klass,
481 *negotiated_codec_associations, send_codec))
483 *negotiated_codec_associations, selected_codec))
482484 {
483485 g_mutex_unlock (mutex);
484486 obj = fs_rtp_special_source_new (klass, negotiated_codec_associations,
485 mutex, send_codec, bin, rtpmuxer);
487 mutex, selected_codec, bin, rtpmuxer);
486488 if (!obj)
487489 {
488490 GST_WARNING ("Failed to make new special source");
118118 GList **current_extra_sources,
119119 GList **negotiated_codec_associations,
120120 GMutex *mutex,
121 FsCodec *send_codec);
121 FsCodec *selected_codec);
122122
123123 gboolean
124124 fs_rtp_special_sources_create (
125125 GList **extra_sources,
126126 GList **negotiated_codec_associations,
127127 GMutex *mutex,
128 FsCodec *send_codec,
128 FsCodec *selected_codec,
129129 GstElement *bin,
130130 GstElement *rtpmuxer);
131131
3737 #include "fs-rtp-stream.h"
3838
3939 #include <gst/gst.h>
40
41 #include <gst/farsight/fs-rtp.h>
4042
4143 #include "fs-rtp-marshal.h"
4244
6062 PROP_DIRECTION,
6163 PROP_PARTICIPANT,
6264 PROP_SESSION,
63 PROP_STREAM_TRANSMITTER
65 PROP_STREAM_TRANSMITTER,
66 PROP_RTP_HEADER_EXTENSIONS
6467 };
6568
6669 struct _FsRtpStreamPrivate
207210 FS_TYPE_STREAM_TRANSMITTER,
208211 G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
209212
213 g_object_class_install_property (gobject_class,
214 PROP_RTP_HEADER_EXTENSIONS,
215 g_param_spec_boxed ("rtp-header-extensions",
216 "RTP Header extension desired by participant in this stream",
217 "GList of RTP Header extensions that the participant for this stream"
218 " would like to use",
219 FS_TYPE_RTP_HEADER_EXTENSION_LIST,
220 G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
221
210222 }
211223
212224 static void
417429 FS_RTP_SESSION_UNLOCK (session);
418430 }
419431 break;
432 case PROP_RTP_HEADER_EXTENSIONS:
433 FS_RTP_SESSION_LOCK (session);
434 g_value_set_boxed (value, self->hdrext);
435 FS_RTP_SESSION_UNLOCK (session);
436 break;
420437 default:
421438 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
422439 break;
488505 g_list_foreach (copy, (GFunc) g_object_unref, NULL);
489506 g_list_free (copy);
490507 g_object_unref (session);
508 }
509 break;
510 case PROP_RTP_HEADER_EXTENSIONS:
511 {
512 FsRtpSession *session = fs_rtp_stream_get_session (self, NULL);
513 if (session)
514 {
515 FS_RTP_SESSION_LOCK (session);
516 fs_rtp_header_extension_list_destroy (self->hdrext);
517 self->hdrext = g_value_dup_boxed (value);
518 FS_RTP_SESSION_UNLOCK (session);
519 /* The callbadck can not fail because it does not change
520 * the codecs
521 */
522 self->priv->new_remote_codecs_cb (NULL, NULL, NULL,
523 self->priv->user_data_for_cb);
524 g_object_unref (session);
525 }
491526 }
492527 break;
493528 default:
7373 GList *remote_codecs;
7474 GList *negotiated_codecs;
7575
76 /* Same as codecs, hold FsRtpSession lock and modify by
77 * setting the property
78 */
79 GList *hdrext;
80
7681 /* Dont modify, call add_substream() */
7782 GList *substreams;
7883
1212 fs-plugin.h \
1313 fs-element-added-notifier.h \
1414 fs-interfaces.h \
15 fs-utils.h
15 fs-utils.h \
16 fs-rtp.h
1617
1718 nodist_libgstfarsightinclude_HEADERS = \
1819 fs-enum-types.h
4344 fs-element-added-notifier.c \
4445 fs-interfaces.c \
4546 fs-utils.c \
47 fs-rtp.c \
4648 fs-private.h
4749
4850 nodist_libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = \
114114 libgstfarsight_@GST_MAJORMINOR@_la-fs-plugin.lo \
115115 libgstfarsight_@GST_MAJORMINOR@_la-fs-element-added-notifier.lo \
116116 libgstfarsight_@GST_MAJORMINOR@_la-fs-interfaces.lo \
117 libgstfarsight_@GST_MAJORMINOR@_la-fs-utils.lo
117 libgstfarsight_@GST_MAJORMINOR@_la-fs-utils.lo \
118 libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo
118119 nodist_libgstfarsight_@GST_MAJORMINOR@_la_OBJECTS = \
119120 libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo \
120121 libgstfarsight_@GST_MAJORMINOR@_la-fs-enumtypes.lo
375376 fs-plugin.h \
376377 fs-element-added-notifier.h \
377378 fs-interfaces.h \
378 fs-utils.h
379 fs-utils.h \
380 fs-rtp.h
379381
380382 nodist_libgstfarsightinclude_HEADERS = \
381383 fs-enum-types.h
400402 fs-element-added-notifier.c \
401403 fs-interfaces.c \
402404 fs-utils.c \
405 fs-rtp.c \
403406 fs-private.h
404407
405408 nodist_libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = \
520523 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.Plo@am__quote@
521524 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-participant.Plo@am__quote@
522525 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-plugin.Plo@am__quote@
526 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.Plo@am__quote@
523527 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-session.Plo@am__quote@
524528 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-stream-transmitter.Plo@am__quote@
525529 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-stream.Plo@am__quote@
653657 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs-utils.c' object='libgstfarsight_@GST_MAJORMINOR@_la-fs-utils.lo' libtool=yes @AMDEPBACKSLASH@
654658 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
655659 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstfarsight_@GST_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libgstfarsight_@GST_MAJORMINOR@_la-fs-utils.lo `test -f 'fs-utils.c' || echo '$(srcdir)/'`fs-utils.c
660
661 libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo: fs-rtp.c
662 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstfarsight_@GST_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo -MD -MP -MF $(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.Tpo -c -o libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo `test -f 'fs-rtp.c' || echo '$(srcdir)/'`fs-rtp.c
663 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.Tpo $(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.Plo
664 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
665 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs-rtp.c' object='libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo' libtool=yes @AMDEPBACKSLASH@
666 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
667 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstfarsight_@GST_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -c -o libgstfarsight_@GST_MAJORMINOR@_la-fs-rtp.lo `test -f 'fs-rtp.c' || echo '$(srcdir)/'`fs-rtp.c
656668
657669 libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo: fs-marshal.c
658670 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstfarsight_@GST_MAJORMINOR@_la_CFLAGS) $(CFLAGS) -MT libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo -MD -MP -MF $(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.Tpo -c -o libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo `test -f 'fs-marshal.c' || echo '$(srcdir)/'`fs-marshal.c
9999 codec->encoding_name = g_strdup (encoding_name);
100100 codec->media_type = media_type;
101101 codec->clock_rate = clock_rate;
102 codec->ABI.ABI.minimum_reporting_interval = G_MAXUINT;
102103
103104 return codec;
105 }
106
107 static void
108 free_optional_parameter (FsCodecParameter *param)
109 {
110 g_free (param->name);
111 g_free (param->value);
112 g_slice_free (FsCodecParameter, param);
113 }
114
115
116 static void
117 free_feedback_parameter (FsFeedbackParameter *param)
118 {
119 g_free (param->type);
120 g_free (param->subtype);
121 g_free (param->extra_params);
122 g_slice_free (FsFeedbackParameter, param);
104123 }
105124
106125 /**
116135 return;
117136
118137 g_free (codec->encoding_name);
119 if (codec->optional_params) {
120 GList *lp;
121 FsCodecParameter *param;
122
123 for (lp = codec->optional_params; lp; lp = g_list_next (lp)) {
124 param = (FsCodecParameter *) lp->data;
125 g_free (param->name);
126 g_free (param->value);
127 g_slice_free (FsCodecParameter, param);
128 }
129 g_list_free (codec->optional_params);
130 }
138
139 g_list_foreach (codec->optional_params, (GFunc) free_optional_parameter,
140 NULL);
141 g_list_free (codec->optional_params);
142
143 g_list_foreach (codec->ABI.ABI.feedback_params,
144 (GFunc) free_feedback_parameter, NULL);
145 g_list_free (codec->ABI.ABI.feedback_params);
131146
132147 g_slice_free (FsCodec, codec);
133148 }
145160 {
146161 FsCodec *copy = NULL;
147162 GList *lp;
148 FsCodecParameter *param;
149 FsCodecParameter *param_copy;
150163
151164 if (codec == NULL)
152165 return NULL;
153166
154 copy = g_slice_new0 (FsCodec);
155
156 copy->id = codec->id;
157 copy->media_type = codec->media_type;
158 copy->clock_rate = codec->clock_rate;
167 copy = fs_codec_new (codec->id, codec->encoding_name, codec->media_type,
168 codec->clock_rate);
169
159170 copy->channels = codec->channels;
160171 copy->ABI.ABI.maxptime = codec->ABI.ABI.maxptime;
161172 copy->ABI.ABI.ptime = codec->ABI.ABI.ptime;
173 copy->ABI.ABI.minimum_reporting_interval =
174 codec->ABI.ABI.minimum_reporting_interval;
162175
163176 copy->encoding_name = g_strdup (codec->encoding_name);
164177
165178 for (lp = codec->optional_params; lp; lp = g_list_next (lp))
166179 {
180 FsCodecParameter *param_copy;
181 FsCodecParameter *param = lp->data;;
182
167183 param_copy = g_slice_new (FsCodecParameter);
168 param = (FsCodecParameter *) lp->data;
169184 param_copy->name = g_strdup (param->name);
170185 param_copy->value = g_strdup (param->value);
171186 /* prepend then reverse the list for efficiency */
174189 }
175190 copy->optional_params = g_list_reverse (copy->optional_params);
176191
192 for (lp = codec->ABI.ABI.feedback_params; lp; lp = g_list_next (lp))
193 {
194 FsFeedbackParameter *param_copy;
195 FsFeedbackParameter *param = lp->data;;
196
197 param_copy = g_slice_new (FsFeedbackParameter);
198 param_copy->type = g_strdup (param->type);
199 param_copy->subtype = g_strdup (param->subtype);
200 param_copy->extra_params = g_strdup (param->extra_params);
201 /* prepend then reverse the list for efficiency */
202 copy->ABI.ABI.feedback_params = g_list_prepend (copy->ABI.ABI.feedback_params,
203 param_copy);
204 }
205 copy->ABI.ABI.feedback_params =
206 g_list_reverse (copy->ABI.ABI.feedback_params);
207
177208 return copy;
178209 }
179210
242273 * [audio/codec2]
243274 * one_param=QCIF
244275 * another_param=WOW
276 *
277 * [video/codec3]
278 * wierd_param=42
279 * feedback:nack/pli=1
280 * feedback:tfrc=
245281 * ]|
246282 *
247283 * Return value: The #GList of #FsCodec or %NULL if the keyfile was empty
257293 gsize groups_count = 0;
258294 int i;
259295
260 g_assert (filename);
296 g_return_val_if_fail (filename, NULL);
297 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
261298
262299 keyfile = g_key_file_new ();
263300
272309 goto out;
273310
274311 for (i=0; i < groups_count && groups[i]; i++) {
275 FsCodec *codec = g_slice_new0 (FsCodec);
312 FsCodec *codec;
276313 gchar **keys = NULL;
277314 gsize keys_count;
278315 int j;
279316 gchar *encoding_name = NULL;
280317 gchar *next_tok = NULL;
281
282 codec->id = FS_CODEC_ID_ANY;
318 FsMediaType media_type;
283319
284320 keys = g_key_file_get_keys (keyfile, groups[i], &keys_count, &gerror);
285321
286322 if (!keys || gerror) {
287 if (gerror) {
323 if (gerror)
288324 GST_WARNING ("Unable to read parameters for %s: %s\n",
289325 groups[i], gerror->message);
290
291 } else {
326 else
292327 GST_WARNING ("Unknown errors while reading parameters for %s",
293328 groups[i]);
294 }
329
295330 g_clear_error (&gerror);
296331
297332 goto next_codec;
298333 }
299334
300335 next_tok = strchr (groups[i], '/');
301 if (!next_tok) {
336 if (!next_tok)
337 {
302338 GST_WARNING ("Invalid codec name: %s", groups[i]);
303339 goto next_codec;
304340 }
305341
306342 if ((next_tok - groups[i]) == 5 /* strlen ("audio") */ &&
307343 !g_ascii_strncasecmp ("audio", groups[i], 5))
308 codec->media_type = FS_MEDIA_TYPE_AUDIO;
344 {
345 media_type = FS_MEDIA_TYPE_AUDIO;
346 }
309347 else if ((next_tok - groups[i]) == 5 /* strlen ("video") */ &&
310348 !g_ascii_strncasecmp ("video", groups[i], 5))
311 codec->media_type = FS_MEDIA_TYPE_VIDEO;
312 else {
349 {
350 media_type = FS_MEDIA_TYPE_VIDEO;
351 }
352 else
353 {
313354 GST_WARNING ("Invalid media type in codec name name %s", groups[i]);
314355 goto next_codec;
315356 }
316357
317 encoding_name = next_tok+1;
318
319 next_tok = strchr (groups[i], ':');
320
321 if (next_tok) {
322 codec->encoding_name = g_strndup (encoding_name,
358 encoding_name = next_tok + 1;
359
360 next_tok = strchr (encoding_name, ':');
361
362 if (encoding_name[0] == 0 || next_tok - encoding_name == 1)
363 goto next_codec;
364
365 if (next_tok)
366 encoding_name = g_strndup (encoding_name,
323367 next_tok - encoding_name);
324 } else {
325 codec->encoding_name = g_strdup (encoding_name);
326 }
327
328 if (!codec->encoding_name || codec->encoding_name[0] == 0) {
329 goto next_codec;
330 }
368 else
369 encoding_name = g_strdup (encoding_name);
370
371 codec = fs_codec_new (FS_CODEC_ID_ANY, encoding_name, media_type, 0);
372
373 g_free (encoding_name);
331374
332375 for (j = 0; j < keys_count && keys[j]; j++) {
333376 if (!g_ascii_strcasecmp ("clock-rate", keys[j])) {
371414 codec->ABI.ABI.ptime = 0;
372415 goto keyerror;
373416 }
417 } else if (!g_ascii_strcasecmp ("trr-int", keys[j])) {
418 codec->ABI.ABI.minimum_reporting_interval =
419 g_key_file_get_integer (keyfile, groups[i], keys[j], &gerror);
420 if (gerror) {
421 codec->ABI.ABI.minimum_reporting_interval = G_MAXUINT;
422 goto keyerror;
423 }
424 } else if (g_str_has_prefix (keys[j], "feedback:")) {
425 gchar *type = keys[j] + strlen ("feedback:");
426 gchar *subtype = strchr (type, '/');
427 gchar *extra_params;
428
429 extra_params = g_key_file_get_string (keyfile, groups[i], keys[j],
430 &gerror);
431 if (gerror)
432 goto keyerror;
433
434 /* Replace / with \0 and point to name (the next char) */
435 if (subtype)
436 {
437 *subtype=0;
438 subtype++;
439 }
440 else
441 {
442 subtype = "";
443 }
444
445 fs_codec_add_feedback_parameter (codec, type, subtype,
446 extra_params);
447 g_free (extra_params);
374448 } else {
375449 FsCodecParameter *param = g_slice_new (FsCodecParameter);
376450
378452 param->value = g_key_file_get_string (keyfile, groups[i], keys[j],
379453 &gerror);
380454 if (gerror) {
381 g_free (param->name);
382 g_free (param->value);
383 g_slice_free (FsCodecParameter, param);
455 free_optional_parameter (param);
384456 goto keyerror;
385457 }
386458
387 if (!param->name || !param->value) {
388 g_free (param->name);
389 g_free (param->value);
390 g_slice_free (FsCodecParameter, param);
391 } else {
459 if (!param->name || !param->value)
460 free_optional_parameter (param);
461 else
392462 codec->optional_params = g_list_append (codec->optional_params,
393463 param);
394 }
395464 }
396465 continue;
397466 keyerror:
403472
404473 codecs = g_list_append (codecs, codec);
405474
475 next_codec:
406476 g_strfreev (keys);
407 continue;
408 next_codec:
409 fs_codec_destroy (codec);
410 g_strfreev (keys);
411
412477 }
413478
414479
471536 if (codec->ABI.ABI.ptime)
472537 g_string_append_printf (string, " ptime=%u", codec->ABI.ABI.ptime);
473538
539 if (codec->ABI.ABI.minimum_reporting_interval != G_MAXUINT)
540 g_string_append_printf (string, " trr-int=%u",
541 codec->ABI.ABI.minimum_reporting_interval);
542
474543 for (item = codec->optional_params;
475544 item;
476545 item = g_list_next (item)) {
478547 g_string_append_printf (string, " %s=%s", param->name, param->value);
479548 }
480549
550 for (item = codec->ABI.ABI.feedback_params;
551 item;
552 item = g_list_next (item)) {
553 FsFeedbackParameter *param = item->data;
554 g_string_append_printf (string, " %s/%s=%s", param->type, param->subtype,
555 param->extra_params);
556 }
557
481558 charstring = string->str;
482559 g_string_free (string, FALSE);
483560
485562 }
486563
487564
565 static gboolean
566 compare_optional_params (const gpointer p1, const gpointer p2)
567 {
568 const FsCodecParameter *param1 = p1;
569 const FsCodecParameter *param2 = p2;
570
571 if (!g_ascii_strcasecmp (param1->name, param2->name) &&
572 !strcmp (param1->value, param2->value))
573 return TRUE;
574 else
575 return FALSE;
576 }
577
578 static gboolean
579 compare_feedback_params (const gpointer p1, const gpointer p2)
580 {
581 const FsFeedbackParameter *param1 = p1;
582 const FsFeedbackParameter *param2 = p2;
583
584 if (!g_ascii_strcasecmp (param1->subtype, param2->subtype) &&
585 !g_ascii_strcasecmp (param1->type, param2->type) &&
586 !g_strcmp0 (param1->extra_params, param2->extra_params))
587 return TRUE;
588 else
589 return FALSE;
590 }
488591
489592 /*
490593 * Check if all of the elements of list1 are in list2
491 * It compares GLists of FarsightCodecParameter
594 * It compares GLists of X using the comparison function
492595 */
493596 static gboolean
494 compare_lists (GList *list1, GList *list2)
597 compare_lists (GList *list1, GList *list2,
598 gboolean (*compare_params) (const gpointer p1, const gpointer p2))
495599 {
496600 GList *item1;
497601
506610 item2 = g_list_next (item2)) {
507611 FsCodecParameter *param2 = item2->data;
508612
509 if (!g_ascii_strcasecmp (param1->name, param2->name) &&
510 !strcmp (param1->value, param2->value))
613 if (compare_params (param1, param2))
511614 break;
512615 }
513616 if (!item2)
545648 codec1->channels != codec2->channels ||
546649 codec1->ABI.ABI.maxptime != codec2->ABI.ABI.maxptime ||
547650 codec1->ABI.ABI.ptime != codec2->ABI.ABI.ptime ||
651 codec1->ABI.ABI.minimum_reporting_interval !=
652 codec2->ABI.ABI.minimum_reporting_interval ||
548653 codec1->encoding_name == NULL ||
549654 codec2->encoding_name == NULL ||
550655 g_ascii_strcasecmp (codec1->encoding_name, codec2->encoding_name))
554659 /* Is there a smarter way to compare to un-ordered linked lists
555660 * to make sure they contain exactly the same elements??
556661 */
557 if (!compare_lists (codec1->optional_params, codec2->optional_params) ||
558 !compare_lists (codec2->optional_params, codec1->optional_params))
662 if (!compare_lists (codec1->optional_params, codec2->optional_params,
663 compare_optional_params) ||
664 !compare_lists (codec2->optional_params, codec1->optional_params,
665 compare_optional_params))
666 return FALSE;
667
668 if (!compare_lists (codec1->ABI.ABI.feedback_params,
669 codec2->ABI.ABI.feedback_params, compare_feedback_params) ||
670 !compare_lists (codec2->ABI.ABI.feedback_params,
671 codec1->ABI.ABI.feedback_params, compare_feedback_params))
559672 return FALSE;
560673
561674 return TRUE;
593706 * fs_codec_add_optional_parameter:
594707 * @codec: The #FsCodec to add the parameter to
595708 * @name: The name of the optional parameter
596 * @value: The value of the optional parameter
709 * @extra_params: The extra_params of the optional parameter
597710 *
598711 * This function adds an new optional parameter to a #FsCodec
599712 */
634747 if (!param)
635748 return;
636749
637 g_free (param->name);
638 g_free (param->value);
639 g_slice_free (FsCodecParameter, param);
750 free_optional_parameter (param);
640751 codec->optional_params = g_list_remove (codec->optional_params, param);
641752 }
642753
673784
674785 return NULL;
675786 }
787
788 /**
789 * fs_codec_add_feedback_parameter:
790 * @codec: The #FsCodec to add the parameter to
791 * @type: The type of the feedback parameter
792 * @subtype: The subtype of the feedback parameter
793 * @extra_params: The extra_params of the feeback parameter
794 *
795 * This function adds an new feedback parameter to a #FsCodec
796 */
797
798 void
799 fs_codec_add_feedback_parameter (FsCodec *codec, const gchar *type,
800 const gchar *subtype, const gchar *extra_params)
801 {
802 FsFeedbackParameter *param;
803
804 g_return_if_fail (type != NULL);
805 g_return_if_fail (subtype != NULL);
806 g_return_if_fail (extra_params != NULL);
807
808 param = g_slice_new (FsFeedbackParameter);
809
810 param->type = g_strdup (type);
811 param->subtype = g_strdup (subtype);
812 param->extra_params = g_strdup (extra_params);
813
814 codec->ABI.ABI.feedback_params =
815 g_list_append (codec->ABI.ABI.feedback_params, param);
816 }
817
818
819 /**
820 * fs_codec_get_feedback_parameter:
821 * @codec: a #FsCodec
822 * @type: The subtype of the parameter to search for or %NULL for any type
823 * @subtype: The subtype of the parameter to search for or %NULL for any subtype
824 * @extra_params: The extra_params of the parameter to search for or %NULL for
825 * any extra_params
826 *
827 * Finds the #FsFeedbackParameter in the #FsCodec that has the requested
828 * subtype, type and extra_params. One of which must be non-NULL;
829 *
830 * Returns: the #FsFeedbackParameter from the #FsCodec or %NULL
831 */
832
833 FsFeedbackParameter *
834 fs_codec_get_feedback_parameter (FsCodec *codec,
835 const gchar *type, const gchar *subtype, const gchar *extra_params)
836 {
837 GList *item = NULL;
838
839 g_return_val_if_fail (codec != NULL, NULL);
840 g_return_val_if_fail (type != NULL || subtype != NULL, NULL);
841
842 for (item = g_list_first (codec->ABI.ABI.feedback_params);
843 item;
844 item = g_list_next (item))
845 {
846 FsFeedbackParameter *param = item->data;
847 if (!g_ascii_strcasecmp (param->type, type) &&
848 (subtype == NULL || !g_ascii_strcasecmp (param->subtype, subtype)) &&
849 (extra_params == NULL || !g_ascii_strcasecmp (param->extra_params,
850 extra_params)))
851 return param;
852 }
853
854 return NULL;
855 }
856
857
858
859 /**
860 * fs_codec_remove_optional_parameter:
861 * @codec: a #FsCodec
862 * @item: a pointer to the #GList element to remove that contains a
863 * #FsFeedbackParameter
864 *
865 * Removes an optional parameter from a codec.
866 *
867 * NULL param will do nothing.
868 */
869
870 void
871 fs_codec_remove_feedback_parameter (FsCodec *codec, GList *item)
872 {
873 g_return_if_fail (codec);
874
875 if (!item)
876 return;
877
878 free_feedback_parameter (item->data);
879 codec->ABI.ABI.feedback_params =
880 g_list_delete_link (codec->ABI.ABI.feedback_params, item);
881 }
3333
3434 typedef struct _FsCodec FsCodec;
3535 typedef struct _FsCodecParameter FsCodecParameter;
36 typedef struct _FsFeedbackParameter FsFeedbackParameter;
3637
3738 #define FS_TYPE_CODEC \
3839 (fs_codec_get_type ())
8283 * @optional_params: key pairs of param name to param data
8384 * @ptime: The preferred duration (in ms) of a packet
8485 * @maxptime: The maximum duration (in ms) of a packet
86 * @minimum_reporting_interval: The minimum interval between two RTCP reports,
87 * If it is not specified (G_MAXUINT), it is up to the protocol to decide
88 * (it is 5 seconds for RTP).
8589 *
8690 * This structure reprensents one codec that can be offered or received
8791 */
99103 struct {
100104 guint ptime;
101105 guint maxptime;
106 guint minimum_reporting_interval;
107 GList *feedback_params;
102108 } ABI;
103109 gpointer _padding[4]; /* padding for binary-compatible
104110 expansion*/
115121 struct _FsCodecParameter {
116122 gchar *name;
117123 gchar *value;
124 };
125
126 /**
127 * FsFeedbackParameter:
128 * @type: the type of feedback, like "ack", "name", "ccm"
129 * @subtype: the subtype of feedback (can be an empty string)
130 * @extra_params: a string containing extra parameters (can be empty)
131 *
132 * Use to store feedback parameters
133 */
134 struct _FsFeedbackParameter {
135 gchar *type;
136 gchar *subtype;
137 gchar *extra_params;
118138 };
119139
120140
154174
155175 GList *fs_codec_list_from_keyfile (const gchar *filename, GError **error);
156176 gchar *fs_codec_to_string (const FsCodec *codec);
177 const gchar *fs_media_type_to_string (FsMediaType media_type);
157178
158179 gboolean fs_codec_are_equal (const FsCodec *codec1, const FsCodec *codec2);
159
160180 gboolean fs_codec_list_are_equal (GList *list1, GList *list2);
161
162 const gchar *fs_media_type_to_string (FsMediaType media_type);
163181
164182 void fs_codec_add_optional_parameter (FsCodec *codec, const gchar *name,
165183 const gchar *value);
166
167184 void fs_codec_remove_optional_parameter (FsCodec *codec,
168185 FsCodecParameter *param);
169
170186 FsCodecParameter *fs_codec_get_optional_parameter (FsCodec *codec,
171187 const gchar *name, const gchar *value);
188
189
190 void fs_codec_add_feedback_parameter (FsCodec *codec, const gchar *type,
191 const gchar *subtype, const gchar *extra_params);
192 FsFeedbackParameter *fs_codec_get_feedback_parameter (FsCodec *codec,
193 const gchar *type, const gchar *subtype, const gchar *extra_params);
194 void fs_codec_remove_feedback_parameter (FsCodec *codec, GList *item);
172195
173196 G_END_DECLS
174197
2626 #endif
2727
2828 #include "fs-interfaces.h"
29
30 #include <gst/gst.h>
31
32 /**
33 * SECTION:fs-interfaces
34 * @short_description: Utility functions to discover local network interfaces
35 *
36 * These utility functions allow the discovery of local network interfaces
37 * in a portable manner, they also allow finding the local ip addresses or
38 * the address allocated to a network interface.
39 */
40
41 GST_DEBUG_CATEGORY_EXTERN (fs_base_conference_debug);
42 #define GST_CAT_DEFAULT fs_base_conference_debug
2943
3044 #ifdef G_OS_UNIX
3145
4357 #include <sys/socket.h>
4458 #include <ifaddrs.h>
4559 #endif
46
47 #include <gst/gst.h>
48
49 /**
50 * SECTION:fs-interfaces
51 * @short_description: Utility functions to discover local network interfaces
52 *
53 * These utility functions allow the discovery of local network interfaces
54 * in a portable manner, they also allow finding the local ip addresses or
55 * the address allocated to a network interface.
56 */
57
58 GST_DEBUG_CATEGORY_EXTERN (fs_base_conference_debug);
59 #define GST_CAT_DEFAULT fs_base_conference_debug
60
6160
6261 /**
6362 * fs_interfaces_get_local_interfaces:
0 /*
1 * Farsight2 - Farsight RTP specific types
2 *
3 * Copyright 2011 Collabora Ltd.
4 * @author: Olivier Crete <olivier.crete@collabora.co.uk>
5 * Copyright 2011 Nokia Corp.
6 *
7 * fs-rtp.c - Farsight RTP specific types
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24
25 #ifdef HAVE_CONFIG_H
26 #include "config.h"
27 #endif
28
29 #include "fs-rtp.h"
30
31 #include <string.h>
32
33 typedef GList FsRtpHeaderExtensionGList;
34
35 G_DEFINE_BOXED_TYPE (FsRtpHeaderExtension, fs_rtp_header_extension,
36 fs_rtp_header_extension_copy, fs_rtp_header_extension_destroy)
37 G_DEFINE_BOXED_TYPE (FsRtpHeaderExtensionGList, fs_rtp_header_extension_list,
38 fs_rtp_header_extension_list_copy, fs_rtp_header_extension_list_destroy)
39
40
41 /**
42 * fs_rtp_header_extension_new:
43 * @id: The identifier of the RTP header extension
44 * @direction: the direction in which this extension can be used
45 * @uri: The URI that defines this extension
46 *
47 * Creates a new #FsRtpHeaderExtension
48 *
49 * Returns: a new #FsRtpHeaderExtension
50 */
51
52 FsRtpHeaderExtension *
53 fs_rtp_header_extension_new (guint id, FsStreamDirection direction,
54 const gchar *uri)
55 {
56 FsRtpHeaderExtension *extension;
57
58 extension = g_slice_new (FsRtpHeaderExtension);
59
60 extension->id = id;
61 extension->direction = direction;
62 extension->uri = g_strdup (uri);
63
64 return extension;
65 }
66
67 /**
68 * fs_rtp_header_extension_copy:
69 * @extension: The RTP header extension definition to copy
70 *
71 * Copies a #FsRtpHeaderExtension
72 *
73 * Returns: a new #FsRtpHeaderExtension
74 */
75
76 FsRtpHeaderExtension *
77 fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension)
78 {
79 if (extension)
80 return fs_rtp_header_extension_new (extension->id, extension->direction,
81 extension->uri);
82 else
83 return NULL;
84 }
85
86 /**
87 * fs_rtp_header_extension_are_equal:
88 * @extension1: The first #FsRtpHeaderExtension
89 * @extension2: The second #FsRtpHeaderExtension
90 *
91 * Compares two #FsRtpHeaderExtension structures
92 *
93 * Returns: %TRUE if they are identical, %FALSE otherwise
94 */
95
96 gboolean
97 fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1,
98 FsRtpHeaderExtension *extension2)
99 {
100 if (extension1 == extension2)
101 return TRUE;
102
103 if (!extension2 || !extension2)
104 return FALSE;
105
106 if (extension1->id == extension2->id &&
107 extension1->direction == extension2->direction &&
108 (extension1->uri == extension2->uri ||
109 (extension1->uri && extension2->uri &&
110 !strcmp (extension1->uri, extension2->uri))))
111 return TRUE;
112 else
113 return FALSE;
114 }
115
116 /**
117 * fs_rtp_header_extension_destroy:
118 * @extension: A RTP header extension to free
119 *
120 * Frees the passed #FsRtpHeaderExtension
121 */
122
123 void
124 fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension)
125 {
126 if (extension)
127 {
128 g_free (extension->uri);
129 g_slice_free (FsRtpHeaderExtension, extension);
130 }
131 }
132
133 /**
134 * fs_rtp_header_extension_list_copy:
135 * @extensions: a #GList of #FsRtpHeaderExtension
136 *
137 * Does a deep copy of a #GList of #FsRtpHeaderExtension
138 *
139 * Returns: a new #GList of #FsRtpHeaderExtension
140 */
141
142 GList *
143 fs_rtp_header_extension_list_copy (GList *extensions)
144 {
145 GList *copy = NULL;
146 const GList *lp;
147 FsRtpHeaderExtension *ext;
148
149 for (lp = extensions; lp; lp = g_list_next (lp)) {
150 ext = (FsRtpHeaderExtension *) lp->data;
151 /* prepend then reverse the list for efficiency */
152 copy = g_list_prepend (copy, fs_rtp_header_extension_copy (ext));
153 }
154 copy = g_list_reverse (copy);
155 return copy;
156 }
157
158 /**
159 * fs_rtp_header_extension_list_destroy:
160 * @extensions: a #GList of #FsRtpHeaderExtension
161 *
162 * Frees the passed #GList of #FsRtpHeaderExtension
163 */
164
165 void
166 fs_rtp_header_extension_list_destroy (GList *extensions)
167 {
168 g_list_foreach (extensions, (GFunc) fs_rtp_header_extension_destroy, NULL);
169 g_list_free (extensions);
170 }
171
172 #define RTP_HDREXT_PREFIX "rtp-hdrext:"
173 #define RTP_HDREXT_AUDIO_PREFIX "audio:"
174 #define RTP_HDREXT_VIDEO_PREFIX "video:"
175
176 /**
177 * fs_rtp_header_extension_list_from_keyfile:
178 * @filename: Name of the #GKeyFile to read the RTP Header Extensions from
179 * @media_type: The media type for which to get header extensions
180 * @error: location of a #GError, or NULL if no error occured
181 *
182 * Reads the content of a #GKeyFile of the following format into a
183 * #GList of #FsRtpHeaderExtension structures.
184 *
185 * The groups have a format "rtp-hdrext:audio:XXX" or
186 * "rtp-hdrext:video:XXX" where XXX is a unique string (per media type).
187 *
188 * The valid keys are:
189 * <itemizedlist>
190 * <listitem>id: a int between in the 1-255 and 4096-4351 ranges</listitem>
191 * <listitem>uri: a URI describing the RTP Header Extension</listitem>
192 * <listitem>direction (optional): To only send or receive a RTP Header
193 * Extension, possible values are "send", "receive", "none" or "both".
194 * Defaults to "both"</listitem>
195 * </itemizedlist>
196 *
197 * Example:
198 * |[
199 * [rtp-hdrext:audio:a]
200 * id=1
201 * uri=urn:ietf:params:rtp-hdrext:toffset
202 *
203 * [rtp-hdrext:audio:abc]
204 * id=3
205 * uri=urn:ietf:params:rtp-hdrext:ntp-64
206 * direction=receive
207 * ]|
208 *
209 * Returns: a #GList of #FsRtpHeaderExtension that must be freed with
210 * fs_rtp_header_extension_list_destroy()
211 */
212
213 GList *
214 fs_rtp_header_extension_list_from_keyfile (const gchar *filename,
215 FsMediaType media_type,
216 GError **error)
217 {
218 GKeyFile *keyfile = NULL;
219 GList *extensions = NULL;
220 gchar **groups = NULL;
221 gsize groups_count = 0;
222 int i;
223
224 g_return_val_if_fail (filename, NULL);
225 g_return_val_if_fail (media_type <= FS_MEDIA_TYPE_LAST, NULL);
226 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
227
228 keyfile = g_key_file_new ();
229
230 if (!g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, error))
231 goto out;
232
233 groups = g_key_file_get_groups (keyfile, &groups_count);
234
235 if (!groups)
236 goto out;
237
238 for (i=0; i < groups_count && groups[i]; i++)
239 {
240 FsStreamDirection direction = FS_DIRECTION_BOTH;
241 gint id;
242 gchar *uri;
243 GError *gerror = NULL;
244 gchar *str;
245
246 if (g_ascii_strncasecmp (RTP_HDREXT_PREFIX, groups[i],
247 strlen (RTP_HDREXT_PREFIX)))
248 continue;
249
250 if (!g_ascii_strncasecmp (RTP_HDREXT_AUDIO_PREFIX,
251 groups[i] + strlen (RTP_HDREXT_PREFIX),
252 strlen (RTP_HDREXT_AUDIO_PREFIX)))
253 {
254 if (media_type != FS_MEDIA_TYPE_AUDIO)
255 continue;
256 }
257 else if (!g_ascii_strncasecmp (RTP_HDREXT_VIDEO_PREFIX,
258 groups[i] + strlen (RTP_HDREXT_PREFIX),
259 strlen (RTP_HDREXT_VIDEO_PREFIX)))
260 {
261 if (media_type != FS_MEDIA_TYPE_VIDEO)
262 continue;
263 }
264 else
265 {
266 continue;
267 }
268
269 id = g_key_file_get_integer (keyfile, groups[i], "id", &gerror);
270 if (gerror)
271 {
272 g_clear_error (&gerror);
273 continue;
274 }
275
276 str = g_key_file_get_string (keyfile, groups[i], "direction", &gerror);
277 if (gerror)
278 {
279 GQuark domain = gerror->domain;
280 gint code = gerror->code;
281
282 g_clear_error (&gerror);
283 if (domain != G_KEY_FILE_ERROR || code != G_KEY_FILE_ERROR_KEY_NOT_FOUND)
284 continue;
285 }
286 else
287 {
288 if (!g_ascii_strcasecmp (str, "none"))
289 direction = FS_DIRECTION_NONE;
290 else if (!g_ascii_strcasecmp (str, "send"))
291 direction = FS_DIRECTION_SEND;
292 else if (!g_ascii_strcasecmp (str, "recv") ||
293 !g_ascii_strcasecmp (str, "receive"))
294 direction = FS_DIRECTION_RECV;
295 g_free (str);
296 }
297
298 uri = g_key_file_get_string (keyfile, groups[i], "uri", &gerror);
299 if (gerror)
300 {
301 g_clear_error (&gerror);
302 continue;
303 }
304
305 extensions = g_list_append (extensions, fs_rtp_header_extension_new (id,
306 direction, uri));
307 g_free (uri);
308 }
309
310 out:
311
312 g_strfreev (groups);
313 g_key_file_free (keyfile);
314
315 return extensions;
316 }
0 /*
1 * Farsight2 - Farsight RTP specific types
2 *
3 * Copyright 2011 Collabora Ltd.
4 * @author: Olivier Crete <olivier.crete@collabora.co.uk>
5 * Copyright 2011 Nokia Corp.
6 *
7 * fs-rtp.h - Farsight RTP specific types
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24 #ifndef __FS_RTP_H__
25 #define __FS_RTP_H__
26
27 #include <gst/gst.h>
28 #include <gst/farsight/fs-stream.h>
29
30 G_BEGIN_DECLS
31
32 /**
33 * FsRtpHeaderExtension:
34 * @id: The identifier of the RTP header extension
35 * @direction: the direction in which this extension can be used
36 * @uri: The URI that defines this extension
37 *
38 * Defines a RTP header extension with its negotiated identifier, direction
39 * and URI. They should only be created with fs_rtp_header_extension_new().
40 */
41
42 typedef struct _FsRtpHeaderExtension {
43 guint id;
44 FsStreamDirection direction;
45 gchar *uri;
46 } FsRtpHeaderExtension;
47
48 /**
49 * FS_TYPE_RTP_HEADER_EXTENSION:
50 *
51 * Boxed type for #FsRtpHeaderExtension
52 */
53
54 /**
55 * FS_TYPE_RTP_HEADER_EXTENSION_LIST:
56 *
57 * Boxed type for a #GList of #FsRtpHeaderExtension
58 */
59
60 #define FS_TYPE_RTP_HEADER_EXTENSION \
61 fs_rtp_header_extension_get_type ()
62 #define FS_TYPE_RTP_HEADER_EXTENSION_LIST \
63 fs_rtp_header_extension_list_get_type ()
64
65 GType fs_rtp_header_extension_get_type (void);
66 GType fs_rtp_header_extension_list_get_type (void);
67
68
69 FsRtpHeaderExtension *
70 fs_rtp_header_extension_new (guint id, FsStreamDirection direction,
71 const gchar *uri);
72
73 FsRtpHeaderExtension *
74 fs_rtp_header_extension_copy (FsRtpHeaderExtension *extension);
75 void
76 fs_rtp_header_extension_destroy (FsRtpHeaderExtension *extension);
77
78 gboolean
79 fs_rtp_header_extension_are_equal (FsRtpHeaderExtension *extension1,
80 FsRtpHeaderExtension *extension2);
81
82 GList *
83 fs_rtp_header_extension_list_copy (GList *extensions);
84 void
85 fs_rtp_header_extension_list_destroy (GList *extensions);
86
87 GList *
88 fs_rtp_header_extension_list_from_keyfile (const gchar *filename,
89 FsMediaType media_type,
90 GError **error);
91
92 /**
93 * FS_RTP_HEADER_EXTENSION_FORMAT:
94 *
95 * A format that can be used in printf like format strings to format a
96 * FsRtpHeaderExtension
97 */
98
99 /**
100 * FS_RTP_HEADER_EXTENSION_ARGS:
101 * @hdrext: a #FsRtpHeaderExtension
102 *
103 * Formats the codec in args for FS_RTP_HEADER_EXTENSION_ARGS
104 */
105
106 #define FS_RTP_HEADER_EXTENSION_FORMAT "%d: (%s) %s"
107 #define FS_RTP_HEADER_EXTENSION_ARGS(hdrext) \
108 (hdrext)->id, \
109 (hdrext)->direction == FS_DIRECTION_BOTH ? "both" : \
110 ((hdrext)->direction == FS_DIRECTION_RECV? "recv" : \
111 ((hdrext)->direction == FS_DIRECTION_SEND ? "send" : "none")), \
112 (hdrext)->uri
113
114 G_END_DECLS
115
116 #endif /* __FS_RTP_H__ */
2626 #include "fs-utils.h"
2727
2828 #include <string.h>
29
30 #include "fs-rtp.h"
2931
3032 /**
3133 * SECTION:fs-utils
133135 return NULL;
134136 }
135137 }
138
139 /**
140 * fs_utils_set_bitrate:
141 * @element: The #GstElement
142 * @bitrate: The bitrate in bits/sec
143 *
144 * This allows setting the bitrate on all elements that have a "bitrate"
145 * property without having to know the type or of the unit used by that element.
146 *
147 * This will be obsolete in 0.11 (when all elements use bit/sec for the
148 * "bitrate" property.
149 */
150
151 void
152 fs_utils_set_bitrate (GstElement *element, glong bitrate)
153 {
154 GParamSpec *spec;
155 const char *elements_in_kbps[] = { "lamemp3enc", "lame", "x264enc", "twolame",
156 "mpeg2enc", NULL
157 };
158 int i;
159 GstElementFactory *factory;
160 const gchar *factory_name = NULL;
161
162 g_return_if_fail (GST_IS_ELEMENT (element));
163
164 spec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), "bitrate");
165 g_return_if_fail (spec != NULL);
166
167 factory = gst_element_get_factory (element);
168 if (factory)
169 factory_name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory));
170
171 /* divide by 1000 for elements that are known to use kbs */
172 for (i = 0; elements_in_kbps[i]; i++)
173 if (factory_name && !strcmp (factory_name, elements_in_kbps[i]))
174 {
175 bitrate /= 1000;
176 break;
177 }
178
179 if (G_PARAM_SPEC_TYPE (spec) == G_TYPE_LONG)
180 {
181 g_object_set (element, "bitrate", (glong) CLAMP (bitrate,
182 G_PARAM_SPEC_LONG (spec)->minimum,
183 G_PARAM_SPEC_LONG (spec)->maximum), NULL);
184 }
185 else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_ULONG)
186 {
187 g_object_set (element, "bitrate", (gulong) CLAMP (bitrate,
188 G_PARAM_SPEC_ULONG (spec)->minimum,
189 G_PARAM_SPEC_ULONG (spec)->maximum), NULL);
190 }
191 else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_INT)
192 {
193 gint tmp = MIN (bitrate, G_MAXINT);
194
195 g_object_set (element, "bitrate", (gint) CLAMP (tmp,
196 G_PARAM_SPEC_INT (spec)->minimum,
197 G_PARAM_SPEC_INT (spec)->maximum), NULL);
198 }
199 else if (G_PARAM_SPEC_VALUE_TYPE (spec) == G_TYPE_UINT)
200 {
201 guint tmp = MIN (bitrate, G_MAXUINT);
202
203 g_object_set (element, "bitrate", (guint) CLAMP (tmp,
204 G_PARAM_SPEC_UINT (spec)->minimum,
205 G_PARAM_SPEC_UINT (spec)->maximum), NULL);
206 }
207 else
208 {
209 g_warning ("bitrate parameter of unknown type");
210 }
211 }
212
213 static GList *
214 load_default_rtp_hdrext_preferences_from_path (const gchar *element_name,
215 const gchar *path, FsMediaType media_type)
216 {
217 GList *rtp_hdrext_prefs = NULL;
218 gchar *filename;
219
220 filename = g_build_filename (path, PACKAGE, FS2_MAJORMINOR, element_name,
221 "default-codec-preferences", NULL);
222 rtp_hdrext_prefs = fs_rtp_header_extension_list_from_keyfile (filename,
223 media_type, NULL);
224 g_free (filename);
225
226 return rtp_hdrext_prefs;
227 }
228
229 /**
230 * fs_utils_get_default_rtp_header_extension_preferences
231 * @element: Element for which to fetch default RTP Header Extension preferences
232 * @media_type: The #FsMediaType for which to get default RTP Header Extension
233 * preferences
234 *
235 * These default rtp header extension preferences should work with the elements
236 * that are available in the main GStreamer element repositories.
237 * They should be suitable for standards based protocols like SIP or XMPP.
238 *
239 * Returns: The default rtp header extension preferences for this plugin,
240 * this #GList should be freed with fs_codec_list_destroy()
241 */
242 GList *
243 fs_utils_get_default_rtp_header_extension_preferences (GstElement *element,
244 FsMediaType media_type)
245 {
246 const gchar * const * system_data_dirs = g_get_system_data_dirs ();
247 GList *rtp_hdrext_prefs = NULL;
248 guint i;
249 const gchar *factory_name = factory_name_from_element (element);
250
251 if (!factory_name)
252 return NULL;
253
254 rtp_hdrext_prefs = load_default_rtp_hdrext_preferences_from_path (
255 factory_name, g_get_user_data_dir (), media_type);
256 if (rtp_hdrext_prefs)
257 return rtp_hdrext_prefs;
258
259 for (i = 0; system_data_dirs[i]; i++)
260 {
261 rtp_hdrext_prefs = load_default_rtp_hdrext_preferences_from_path (
262 factory_name, system_data_dirs[i], media_type);
263 if (rtp_hdrext_prefs)
264 return rtp_hdrext_prefs;
265 }
266
267 return NULL;
268 }
2525 #define __FS_UTILS_H__
2626
2727 #include <gst/gst.h>
28
2829 #include <gst/farsight/fs-codec.h>
2930
3031 G_BEGIN_DECLS
3334
3435 GKeyFile *fs_utils_get_default_element_properties (GstElement *element);
3536
37 void fs_utils_set_bitrate (GstElement *element, glong bitrate);
38
39 GList *fs_utils_get_default_rtp_header_extension_preferences (
40 GstElement *element, FsMediaType media_type);
41
3642 G_END_DECLS
3743
3844 #endif /* __FS_UTILS_H__ */
2525 $(PYFARSIGHT_LIBS) \
2626 $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-@GST_MAJORMINOR@.la
2727
28 farsight_la_LDFLAGS = \
29 `python-config --libs` \
30 -module -avoid-version
28 farsight_la_LDFLAGS = -module -avoid-version
3129
3230 pyfarsight.c: pyfarsight.override pyfarsight.defs
3331 $(PYCODEGEN) \
353353 $(PYFARSIGHT_LIBS) \
354354 $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-@GST_MAJORMINOR@.la
355355
356 farsight_la_LDFLAGS = \
357 `python-config --libs` \
358 -module -avoid-version
359
356 farsight_la_LDFLAGS = -module -avoid-version
360357 EXTRA_DIST = \
361358 pyfarsight.override \
362359 pyfarsight.defs \
614614 )
615615 )
616616
617 (define-method get_src_pads_iterator
618 (of-object "FsStream")
619 (unblock-threads t)
620 (c-name "fs_stream_get_src_pads_iterator")
621 (return-type "GstIterator*")
622 )
623
617624
618625 ;; -*- scheme -*-
619626 ; object definitions ...
8282 $(NICE_LIBS)
8383 transmitter_rawudp_SOURCES = \
8484 check-threadsafe.h \
85 testutils.c \
86 testutils.h \
8587 transmitter/generic.c \
8688 transmitter/generic.h \
8789 transmitter/rawudp.c \
191191 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
192192 $(transmitter_nice_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
193193 -o $@
194 am_transmitter_rawudp_OBJECTS = transmitter_rawudp-generic.$(OBJEXT) \
194 am_transmitter_rawudp_OBJECTS = \
195 transmitter_rawudp-testutils.$(OBJEXT) \
196 transmitter_rawudp-generic.$(OBJEXT) \
195197 transmitter_rawudp-rawudp.$(OBJEXT) \
196198 transmitter_rawudp-rawudp-upnp.$(OBJEXT) \
197199 transmitter_rawudp-stunalternd.$(OBJEXT)
524526
525527 transmitter_rawudp_SOURCES = \
526528 check-threadsafe.h \
529 testutils.c \
530 testutils.h \
527531 transmitter/generic.c \
528532 transmitter/generic.h \
529533 transmitter/rawudp.c \
750754 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Po@am__quote@
751755 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-rawudp.Po@am__quote@
752756 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-stunalternd.Po@am__quote@
757 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-testutils.Po@am__quote@
753758 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_shm-generic.Po@am__quote@
754759 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_shm-shm.Po@am__quote@
755760 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_binadded-binadded.Po@am__quote@
11301135 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transmitter/nice.c' object='transmitter_nice-nice.obj' libtool=no @AMDEPBACKSLASH@
11311136 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
11321137 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_nice_CFLAGS) $(CFLAGS) -c -o transmitter_nice-nice.obj `if test -f 'transmitter/nice.c'; then $(CYGPATH_W) 'transmitter/nice.c'; else $(CYGPATH_W) '$(srcdir)/transmitter/nice.c'; fi`
1138
1139 transmitter_rawudp-testutils.o: testutils.c
1140 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter_rawudp-testutils.o -MD -MP -MF $(DEPDIR)/transmitter_rawudp-testutils.Tpo -c -o transmitter_rawudp-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
1141 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_rawudp-testutils.Tpo $(DEPDIR)/transmitter_rawudp-testutils.Po
1142 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
1143 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutils.c' object='transmitter_rawudp-testutils.o' libtool=no @AMDEPBACKSLASH@
1144 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1145 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter_rawudp-testutils.o `test -f 'testutils.c' || echo '$(srcdir)/'`testutils.c
1146
1147 transmitter_rawudp-testutils.obj: testutils.c
1148 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter_rawudp-testutils.obj -MD -MP -MF $(DEPDIR)/transmitter_rawudp-testutils.Tpo -c -o transmitter_rawudp-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
1149 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/transmitter_rawudp-testutils.Tpo $(DEPDIR)/transmitter_rawudp-testutils.Po
1150 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
1151 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testutils.c' object='transmitter_rawudp-testutils.obj' libtool=no @AMDEPBACKSLASH@
1152 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1153 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -c -o transmitter_rawudp-testutils.obj `if test -f 'testutils.c'; then $(CYGPATH_W) 'testutils.c'; else $(CYGPATH_W) '$(srcdir)/testutils.c'; fi`
11331154
11341155 transmitter_rawudp-generic.o: transmitter/generic.c
11351156 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(transmitter_rawudp_CFLAGS) $(CFLAGS) -MT transmitter_rawudp-generic.o -MD -MP -MF $(DEPDIR)/transmitter_rawudp-generic.Tpo -c -o transmitter_rawudp-generic.o `test -f 'transmitter/generic.c' || echo '$(srcdir)/'`transmitter/generic.c
2222 #endif
2323
2424 #include <gst/check/gstcheck.h>
25 #include <gst/farsight/fs-codec.h>
25 #include "gst/farsight/fs-codec.h"
26 #include "gst/farsight/fs-rtp.h"
2627
2728 #include "testutils.h"
2829
9495 fs_codec_add_optional_parameter (codec, "aa2", "bb2");
9596 fs_codec_add_optional_parameter (codec, "aa3", "bb3");
9697
98 fs_codec_add_feedback_parameter (codec, "aa1", "bb1", "cc1");
99 fs_codec_add_feedback_parameter (codec, "aa2", "bb2", "cc2");
100 fs_codec_add_feedback_parameter (codec, "aa3", "bb3", "cc3");
101
97102 codec->ABI.ABI.ptime = 12;
98103 codec->ABI.ABI.maxptime = 12;
99104
100105 return codec;
101106 }
102107
103 static void
104 _free_codec_param (gpointer param)
105 {
106 FsCodecParameter *p = param;
107 g_free (p->name);
108 g_free (p->value);
109 g_slice_free (FsCodecParameter, p);
110 }
111
112108 GST_START_TEST (test_fscodec_are_equal_opt_params)
113109 {
114110 FsCodec *codec1;
120116 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
121117 "Identical codecs (with params) not recognized");
122118
123 _free_codec_param (g_list_first (codec1->optional_params)->data);
124 codec1->optional_params = g_list_remove (codec1->optional_params,
119 fs_codec_remove_optional_parameter (codec1,
125120 g_list_first (codec1->optional_params)->data);
126
127121 fs_codec_add_optional_parameter (codec1, "aa1", "bb1");
128122
129123 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
130124 "Identical codecs (with params in different order 1) not recognized");
131125
132 _free_codec_param (g_list_first (codec1->optional_params)->data);
133 codec1->optional_params = g_list_remove (codec1->optional_params,
126 fs_codec_remove_optional_parameter (codec1,
134127 g_list_first (codec1->optional_params)->data);
135
136128 fs_codec_add_optional_parameter (codec1, "aa2", "bb2");
137129
138130 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
142134
143135 codec1 = init_codec_with_three_params ();
144136
145 _free_codec_param (g_list_first (codec1->optional_params)->data);
146 codec1->optional_params = g_list_remove (codec1->optional_params,
137 fs_codec_remove_optional_parameter (codec1,
147138 g_list_first (codec1->optional_params)->data);
148139
149140 fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
154145 fs_codec_destroy (codec1);
155146
156147 codec1 = init_codec_with_three_params ();
157 _free_codec_param (g_list_last (codec1->optional_params)->data);
158 codec1->optional_params = g_list_remove (codec1->optional_params,
148 fs_codec_remove_optional_parameter (codec1,
159149 g_list_last (codec1->optional_params)->data);
150
151 fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
152 "Did not detect removal of last parameter of first codec");
153 fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
154 "Did not detect removal of last parameter of second codec");
155
156 fs_codec_destroy (codec1);
157 fs_codec_destroy (codec2);
158 }
159 GST_END_TEST;
160
161
162 GST_START_TEST (test_fscodec_are_equal_feedback_params)
163 {
164 FsCodec *codec1;
165 FsCodec *codec2;
166
167 codec1 = init_codec_with_three_params ();
168 codec2 = init_codec_with_three_params ();
169
170 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
171 "Identical codecs (with params) not recognized");
172
173 fs_codec_remove_feedback_parameter (codec1,
174 g_list_first (codec1->ABI.ABI.feedback_params));
175 fs_codec_add_feedback_parameter (codec1, "aa1", "bb1", "cc1");
176
177 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
178 "Identical codecs (with params in different order 1) not recognized");
179
180 fs_codec_remove_feedback_parameter (codec1,
181 g_list_first (codec1->ABI.ABI.feedback_params));
182 fs_codec_add_feedback_parameter (codec1, "aa2", "bb2", "cc2");
183
184 fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
185 "Identical codecs (with params in different order 2) not recognized");
186
187 fs_codec_destroy (codec1);
188
189 codec1 = init_codec_with_three_params ();
190
191 fs_codec_remove_feedback_parameter (codec1,
192 g_list_first (codec1->ABI.ABI.feedback_params));
193
194 fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
195 "Did not detect removal of first parameter of first codec");
196 fail_unless (fs_codec_are_equal (codec2, codec1) == FALSE,
197 "Did not detect removal of first parameter of second codec");
198
199 fs_codec_destroy (codec1);
200
201 codec1 = init_codec_with_three_params ();
202 fs_codec_remove_feedback_parameter (codec1,
203 g_list_last (codec1->ABI.ABI.feedback_params));
160204
161205 fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
162206 "Did not detect removal of last parameter of first codec");
225269 GList *item;
226270 for(item = codecs; item ; item= item->next)
227271 {
228 GST_DEBUG ("%s", fs_codec_to_string (item->data));
272 g_debug("%s", fs_codec_to_string (item->data));
229273 }
230274 }
231275 #endif
233277 codec = fs_codec_new (122, "TEST1", FS_MEDIA_TYPE_AUDIO, 8001);
234278 codec->channels = 5;
235279 fs_codec_add_optional_parameter (codec, "test3", "test4");
280 fs_codec_add_feedback_parameter (codec, "aa", "bb", "cc");
281 fs_codec_add_feedback_parameter (codec, "dd", "ee", "");
282 fs_codec_add_feedback_parameter (codec, "ff", "", "");
236283 comparison = g_list_append (comparison, codec);
237284
238285 codec = fs_codec_new (123, "TEST2", FS_MEDIA_TYPE_VIDEO, 8002);
262309 }
263310 GST_END_TEST;
264311
312 GST_START_TEST (test_fscodec_rtp_hdrext)
313 {
314 FsRtpHeaderExtension *hdrext, *hdrext2;
315
316 hdrext = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH, "uri");
317 hdrext2 = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH, "uri");
318
319 fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext));
320 fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));
321
322 hdrext2->id = 2;
323 fail_unless (!fs_rtp_header_extension_are_equal (hdrext, hdrext2));
324
325 hdrext2->id = 1;
326 fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));
327
328 hdrext2->direction = FS_DIRECTION_NONE;
329 fail_unless (!fs_rtp_header_extension_are_equal (hdrext, hdrext2));
330 fs_rtp_header_extension_destroy (hdrext2);
331
332 hdrext2 = fs_rtp_header_extension_copy (hdrext);
333
334 fail_unless (fs_rtp_header_extension_are_equal (hdrext, hdrext2));
335
336 fs_rtp_header_extension_destroy (hdrext2);
337 fs_rtp_header_extension_destroy (hdrext);
338 }
339 GST_END_TEST;
340
341
342 GST_START_TEST (test_fscodec_rtp_hdrext_keyfile)
343 {
344 GList *extensions = NULL;
345 GError *error = NULL;
346 gchar *filename = NULL;
347 FsRtpHeaderExtension *comparison;
348
349 fail_if (fs_rtp_header_extension_list_from_keyfile ("invalid-filename",
350 FS_MEDIA_TYPE_AUDIO, &error));
351 fail_if (error == NULL);
352 fail_unless (error->domain == G_FILE_ERROR);
353 g_clear_error (&error);
354
355 filename = get_fullpath ("base/test1.conf");
356 extensions = fs_rtp_header_extension_list_from_keyfile (filename,
357 FS_MEDIA_TYPE_AUDIO, &error);
358 g_free (filename);
359 fail_unless (error == NULL);
360 fail_if (extensions == NULL);
361
362 comparison = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH,
363 "http://example.com/rtp-hdrext1");
364 fail_unless (fs_rtp_header_extension_are_equal (extensions->data,
365 comparison));
366 fs_rtp_header_extension_destroy (comparison);
367
368 comparison = fs_rtp_header_extension_new (2, FS_DIRECTION_RECV,
369 "http://example.com/rtp-hdrext2");
370 fail_unless (fs_rtp_header_extension_are_equal (extensions->next->data,
371 comparison));
372 fs_rtp_header_extension_destroy (comparison);
373
374 fail_unless (extensions->next->next == NULL);
375
376 fs_rtp_header_extension_list_destroy (extensions);
377
378
379
380 filename = get_fullpath ("base/test1.conf");
381 extensions = fs_rtp_header_extension_list_from_keyfile (filename,
382 FS_MEDIA_TYPE_VIDEO, &error);
383 g_free (filename);
384 fail_unless (error == NULL);
385 fail_if (extensions == NULL);
386
387 comparison = fs_rtp_header_extension_new (1, FS_DIRECTION_BOTH,
388 "http://example.com/rtp-hdrext1");
389 fail_unless (fs_rtp_header_extension_are_equal (extensions->data,
390 comparison));
391 fs_rtp_header_extension_destroy (comparison);
392
393 fail_unless (extensions->next == NULL);
394 fs_rtp_header_extension_list_destroy (extensions);
395 }
396 GST_END_TEST;
397
265398 static Suite *
266399 fscodec_suite (void)
267400 {
273406 tcase_add_test (tc_chain, test_fscodec_new);
274407 tcase_add_test (tc_chain, test_fscodec_are_equal);
275408 tcase_add_test (tc_chain, test_fscodec_are_equal_opt_params);
409 tcase_add_test (tc_chain, test_fscodec_are_equal_feedback_params);
276410 tcase_add_test (tc_chain, test_fscodec_copy);
277411 tcase_add_test (tc_chain, test_fscodec_null);
278412 tcase_add_test (tc_chain, test_fscodec_keyfile);
413 tcase_add_test (tc_chain, test_fscodec_rtp_hdrext);
414 tcase_add_test (tc_chain, test_fscodec_rtp_hdrext_keyfile);
279415
280416 return s;
281417 }
22 clock-rate=8001
33 channels=5
44 test3=test4
5 feedback:aa/bb=cc
6 feedback:dd/ee=
7 feedback:ff=
58
69 [video/TEST2]
710 id=123
3033 adsas=11
3134 clock-rate=dsa
3235
36 [asass/]
37 adsas=1as
38 clock-rate=dsa
39
40 [asass/:1]
41 adsas=135
42 clock-rate=dsa
43
3344 [daasd/asdsa]
3445 asdasd=11
3546 channels=1das
3647 maxptime=532
3748 ptime=42
49
50 [rtp-hdrext:audio:1]
51 id=1
52 uri=http://example.com/rtp-hdrext1
53
54 [rtp-hdrext:invalid:1]
55 id=3
56 uri=http://example.com/rtp-hdrext3
57
58 [rtp-hdrext:audio:2]
59 id=2
60 uri=http://example.com/rtp-hdrext2
61 direction=receive
62
63 [rtp-hdrext:video:1]
64 id=1
65 uri=http://example.com/rtp-hdrext1
2424 #include <gst/check/gstcheck.h>
2525 #include <gst/farsight/fs-conference-iface.h>
2626 #include <gst/farsight/fs-stream-transmitter.h>
27 #include <gst/farsight/fs-rtp.h>
2728
2829 #include "generic.h"
2930
11251126 codecs = g_list_append (NULL, fs_codec_copy (prefcodec));
11261127 fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error));
11271128 fail_unless (error == NULL);
1129 fs_codec_list_destroy (codecs);
11281130
11291131 g_object_get (dat->session, "codecs", &codecs, NULL);
11301132 fail_unless (g_list_length (codecs) == 1);
11711173 codecs = g_list_append (NULL, codec);
11721174 fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error));
11731175 fail_unless (error == NULL);
1176 fs_codec_list_destroy (codecs);
11741177
11751178 fail_if (gst_element_set_state (dat->pipeline, GST_STATE_NULL) !=
11761179 GST_STATE_CHANGE_SUCCESS);
11771180
1181 fs_codec_destroy (prefcodec);
11781182 g_object_unref (stream);
11791183 g_object_unref (participant);
11801184 cleanup_simple_conference (dat);
18831887 }
18841888 GST_END_TEST;
18851889
1886
1887
18881890 GST_START_TEST (test_rtpcodecs_nego_h263_2000)
18891891 {
18901892 struct SimpleTestConference *dat = NULL;
19771979 FsCodec *outcodec = NULL;
19781980 FsCodec *prefcodec = NULL;
19791981 FsCodec *outprefcodec = NULL;
1982 FsCodec *tmp_prefcodec, *tmp_outprefcodec;
19801983 FsParticipant *participant;
19811984
19821985 setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);
20652068 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
20662069 codec, outcodec);
20672070
2071 /* Now test the minimum_reporting_interval property */
2072
2073 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2074 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2075 codec->ABI.ABI.minimum_reporting_interval = 3;
2076 outcodec->ABI.ABI.minimum_reporting_interval = 3;
2077 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2078 codec, outcodec);
2079
2080 tmp_prefcodec = fs_codec_copy (prefcodec);
2081 tmp_outprefcodec = fs_codec_copy (outprefcodec);
2082 tmp_prefcodec->ABI.ABI.minimum_reporting_interval = 3;
2083 tmp_outprefcodec->ABI.ABI.minimum_reporting_interval = 3;
2084
2085 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2086 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2087 test_one_codec (dat->session, participant, tmp_prefcodec, tmp_outprefcodec,
2088 codec, outcodec);
2089
2090
2091 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2092 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2093 codec->ABI.ABI.minimum_reporting_interval = 3;
2094 outcodec->ABI.ABI.minimum_reporting_interval = 3;
2095 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2096 codec, outcodec);
2097
2098 fs_codec_destroy (tmp_prefcodec);
2099 fs_codec_destroy (tmp_outprefcodec);
2100
20682101 fs_codec_destroy (outprefcodec);
20692102 fs_codec_destroy (prefcodec);
20702103 cleanup_codec_tests (dat, participant);
20712104 }
20722105 GST_END_TEST;
20732106
2107
2108 GST_START_TEST (test_rtpcodecs_nego_feedback)
2109 {
2110 struct SimpleTestConference *dat = NULL;
2111 FsCodec *codec = NULL;
2112 FsCodec *outcodec = NULL;
2113 FsCodec *prefcodec = NULL;
2114 FsCodec *outprefcodec = NULL;
2115 FsParticipant *participant;
2116 setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO);
2117
2118
2119 outprefcodec = fs_codec_new (FS_CODEC_ID_ANY, "H264",
2120 FS_MEDIA_TYPE_VIDEO, 90000);
2121 prefcodec = fs_codec_copy (outprefcodec);
2122 fs_codec_add_optional_parameter (prefcodec, "farsight-recv-profile",
2123 "identity");
2124 fs_codec_add_optional_parameter (prefcodec, "farsight-send-profile",
2125 "identity");
2126
2127 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2128 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2129 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2130 codec, outcodec);
2131
2132
2133 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2134 codec->ABI.ABI.minimum_reporting_interval = 0;
2135 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2136 outcodec->ABI.ABI.minimum_reporting_interval = 0;
2137 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2138 codec, outcodec);
2139
2140 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2141 codec->ABI.ABI.minimum_reporting_interval = 3;
2142 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2143 outcodec->ABI.ABI.minimum_reporting_interval = 3;
2144 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2145 codec, outcodec);
2146
2147 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2148 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2149 fs_codec_add_feedback_parameter (codec, "nack", "pli", "");
2150 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2151 codec, outcodec);
2152
2153 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2154 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2155 fs_codec_add_feedback_parameter (prefcodec, "nack", "pli", "");
2156 fs_codec_add_feedback_parameter (outprefcodec, "nack", "pli", "");
2157 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2158 codec, outcodec);
2159
2160 codec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2161 outcodec = fs_codec_new (96, "H264", FS_MEDIA_TYPE_VIDEO, 90000);
2162 fs_codec_add_feedback_parameter (codec, "nack", "pli", "");
2163 fs_codec_add_feedback_parameter (outcodec, "nack", "pli", "");
2164 test_one_codec (dat->session, participant, prefcodec, outprefcodec,
2165 codec, outcodec);
2166
2167 fs_codec_destroy (outprefcodec);
2168 fs_codec_destroy (prefcodec);
2169 cleanup_codec_tests (dat, participant);
2170 }
2171 GST_END_TEST;
2172
2173 static gboolean
2174 compare_extensions (FsRtpHeaderExtension *ext1, FsRtpHeaderExtension *ext2)
2175 {
2176 if (ext1->id == ext2->id &&
2177 ext1->direction == ext2->direction &&
2178 !strcmp (ext1->uri, ext2->uri))
2179 return TRUE;
2180 else
2181 return FALSE;
2182 }
2183
2184 static gboolean
2185 compare_extensions_list (GList *list1, GList *list2)
2186 {
2187 for (;
2188 list1 && list2;
2189 list1 = g_list_next (list1), list2 = g_list_next (list2))
2190 if (!compare_extensions (list1->data, list2->data))
2191 return FALSE;
2192
2193 if (list1 == NULL && list2 == NULL)
2194 return TRUE;
2195 else
2196 return FALSE;
2197 }
2198
2199 GST_START_TEST (test_rtpcodecs_nego_hdrext)
2200 {
2201 GstBus *bus;
2202 struct SimpleTestConference *dat;
2203 FsParticipant *participant;
2204 FsStream *stream;
2205 GList *hdrexts_prefs;
2206 GList *hdrexts;
2207 GList *hdrexts2;
2208 GList *codecs;
2209
2210 dat = setup_simple_conference_full (1, "fsrtpconference", "bob@127.0.0.1",
2211 FS_MEDIA_TYPE_AUDIO);
2212
2213 participant = fs_conference_new_participant (
2214 FS_CONFERENCE (dat->conference), "name", NULL);
2215 fail_if (participant == NULL, "Could not add participant to conference");
2216
2217 bus = gst_pipeline_get_bus (GST_PIPELINE (dat->pipeline));
2218 fail_if (bus == NULL);
2219 gst_bus_set_sync_handler (bus, NULL, NULL);
2220 gst_bus_set_sync_handler (bus, drop_all_sync_handler, dat);
2221 gst_object_unref (bus);
2222
2223
2224 stream = fs_session_new_stream (dat->session, participant,
2225 FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL);
2226 fail_if (stream == NULL, "Could not add stream to session");
2227
2228 hdrexts_prefs = g_list_prepend (NULL, fs_rtp_header_extension_new (1,
2229 FS_DIRECTION_BOTH, "URI"));
2230
2231 g_object_get (dat->session, "rtp-header-extension-preferences", &hdrexts,
2232 NULL);
2233 fail_unless (hdrexts == NULL);
2234 g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
2235 fail_unless (hdrexts == NULL);
2236
2237 g_object_set (dat->session, "rtp-header-extension-preferences",
2238 hdrexts_prefs, NULL);
2239 g_object_get (dat->session, "rtp-header-extension-preferences", &hdrexts,
2240 NULL);
2241 fs_rtp_header_extension_list_destroy (hdrexts);
2242
2243 g_object_get (dat->session, "codecs", &codecs, NULL);
2244 fail_unless (codecs != NULL);
2245 fail_unless (fs_stream_set_remote_codecs (stream, codecs, NULL));
2246 fs_codec_list_destroy (codecs);
2247
2248 hdrexts2 = g_list_prepend (NULL, fs_rtp_header_extension_new (2,
2249 FS_DIRECTION_SEND, "URI"));
2250 g_object_set (stream, "rtp-header-extensions", hdrexts2, NULL);
2251 g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
2252 fail_unless (compare_extensions_list (hdrexts, hdrexts2));
2253 fs_rtp_header_extension_list_destroy (hdrexts);
2254
2255 g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
2256 fail_unless (compare_extensions_list (hdrexts, hdrexts2));
2257 fs_rtp_header_extension_list_destroy (hdrexts);
2258 fs_rtp_header_extension_list_destroy (hdrexts2);
2259
2260 g_object_set (stream, "rtp-header-extensions", hdrexts_prefs, NULL);
2261 g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
2262 fail_unless (compare_extensions_list (hdrexts, hdrexts_prefs));
2263 fs_rtp_header_extension_list_destroy (hdrexts);
2264
2265 g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
2266 fail_unless (compare_extensions_list (hdrexts, hdrexts_prefs));
2267 fs_rtp_header_extension_list_destroy (hdrexts);
2268
2269
2270 hdrexts2 = g_list_prepend (NULL, fs_rtp_header_extension_new (1,
2271 FS_DIRECTION_BOTH, "URI2"));
2272 g_object_set (stream, "rtp-header-extensions", hdrexts2, NULL);
2273 g_object_get (stream, "rtp-header-extensions", &hdrexts, NULL);
2274 fail_unless (compare_extensions_list (hdrexts, hdrexts2));
2275 fs_rtp_header_extension_list_destroy (hdrexts);
2276 fs_rtp_header_extension_list_destroy (hdrexts2);
2277 g_object_get (dat->session, "rtp-header-extensions", &hdrexts, NULL);
2278 fail_unless (hdrexts == NULL);
2279
2280 fs_rtp_header_extension_list_destroy (hdrexts_prefs);
2281 g_object_unref (stream);
2282 g_object_unref (participant);
2283 cleanup_simple_conference (dat);
2284 }
2285 GST_END_TEST;
2286
20742287 static Suite *
20752288 fsrtpcodecs_suite (void)
20762289 {
20782291 TCase *tc_chain;
20792292 GLogLevelFlags fatal_mask;
20802293
2081
20822294 fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
20832295 fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
20842296 g_log_set_always_fatal (fatal_mask);
21522364 tcase_add_test (tc_chain, test_rtpcodecs_nego_h264);
21532365 suite_add_tcase (s, tc_chain);
21542366
2367 tc_chain = tcase_create ("fsrtpcodecs_nego_feedback");
2368 tcase_add_test (tc_chain, test_rtpcodecs_nego_feedback);
2369 suite_add_tcase (s, tc_chain);
2370
2371 tc_chain = tcase_create ("fsrtpcodecs_nego_hdrext");
2372 tcase_add_test (tc_chain, test_rtpcodecs_nego_hdrext);
2373 suite_add_tcase (s, tc_chain);
2374
21552375 return s;
21562376 }
21572377
168168 other_st->dat->id,
169169 other_st->target->id,
170170 candidate->component_id);
171
172 if (other_st->stream == NULL)
173 {
174 TEST_UNLOCK ();
175 return;
176 }
171177
172178 candidates = g_list_prepend (NULL, candidate);
173179 ret = fs_stream_set_remote_candidates (other_st->stream, candidates, &error);
13681374 return;
13691375 g_free (mcast_addr);
13701376
1371 max_src_pads = 3;
1377 max_src_pads = 3 * 2; /* x2 because of loopbacks causing fake conflicts */
13721378 nway_test (3, NULL, multicast_ssrc_init, "multicast", 0, NULL);
13731379 max_src_pads = 1;
13741380 }
3333 #include "check-threadsafe.h"
3434 #include "generic.h"
3535 #include "transmitter/rawudp-upnp.h"
36 #include "testutils.h"
3637
3738 #include "stunalternd.h"
3839
966967 suite_add_tcase (s, tc_chain);
967968
968969 #ifdef HAVE_GUPNP
969 tc_chain = tcase_create ("rawudptransmitter-upnp-discovery");
970 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_discovery);
971 suite_add_tcase (s, tc_chain);
972
973 tc_chain = tcase_create ("rawudptransmitter-upnp-fallback");
974 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_fallback);
975 suite_add_tcase (s, tc_chain);
976
977 tc_chain = tcase_create ("rawudptransmitter-upnp-ignored");
978 tcase_add_checked_fixture (tc_chain, setup_stund, teardown_stund);
979 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_ignored);
980 suite_add_tcase (s, tc_chain);
970 {
971 gchar *multicast_addr;
972
973 multicast_addr = find_multicast_capable_address ();
974 g_free (multicast_addr);
975
976 if (multicast_addr)
977 {
978 tc_chain = tcase_create ("rawudptransmitter-upnp-discovery");
979 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_discovery);
980 suite_add_tcase (s, tc_chain);
981
982 tc_chain = tcase_create ("rawudptransmitter-upnp-fallback");
983 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_fallback);
984 suite_add_tcase (s, tc_chain);
985
986 tc_chain = tcase_create ("rawudptransmitter-upnp-ignored");
987 tcase_add_checked_fixture (tc_chain, setup_stund, teardown_stund);
988 tcase_add_test (tc_chain, test_rawudptransmitter_run_upnp_ignored);
989 suite_add_tcase (s, tc_chain);
990 }
991 }
981992 #endif
982993
983994 tc_chain = tcase_create ("rawudptransmitter-with-filter");
706706 g_object_set (elem,
707707 "closefd", FALSE,
708708 "sockfd", fd,
709 "auto-multicast", FALSE,
709710 NULL);
710
711 if (g_object_class_find_property (G_OBJECT_GET_CLASS (elem),
712 "auto-multicast"))
713 g_object_set (elem, "auto-multicast", FALSE, NULL);
714711
715712 if (!gst_bin_add (bin, elem)) {
716713 g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
11331130
11341131 gst_element_send_event (udpsock->udpsink,
11351132 gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
1136 gst_structure_new ("GstForceKeyUnit", NULL)));
1133 gst_structure_new ("GstForceKeyUnit",
1134 "all-headers", G_TYPE_BOOLEAN, TRUE,
1135 NULL)));
11371136 }
11381137 }
11391138
423423 gststream = self->priv->gststream;
424424 self->priv->gststream = NULL;
425425 stream_id = self->priv->stream_id;
426 self->priv->stream_id = 0;
426 /* We can't unset the stream id because it gets messy fast, just leave it as
427 * is, all calls should fail anyway
428 */
427429 FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
428430
429431 if (gststream)
528530 case PROP_SENDING:
529531 FS_NICE_STREAM_TRANSMITTER_LOCK (self);
530532 self->priv->sending = g_value_get_boolean (value);
533 if (self->priv->gststream)
534 fs_nice_transmitter_set_sending (self->priv->transmitter,
535 self->priv->gststream, g_value_get_boolean (value));
531536 FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
532 fs_nice_transmitter_set_sending (self->priv->transmitter,
533 self->priv->gststream, g_value_get_boolean (value));
534537 break;
535538 case PROP_PREFERRED_LOCAL_CANDIDATES:
536539 self->priv->preferred_local_candidates = g_value_dup_boxed (value);
15071510 fs_nice_agent_add_idle (self->priv->agent, state_changed_signal_idle,
15081511 data, free_state_changed_signal_data);
15091512
1510 if (state == NICE_COMPONENT_STATE_READY)
1511 fs_nice_transmitter_request_keyunit (self->priv->transmitter,
1512 self->priv->gststream, component_id);
1513 if (fs_state >= FS_STREAM_STATE_CONNECTED)
1514 {
1515 FS_NICE_STREAM_TRANSMITTER_LOCK (self);
1516 if (self->priv->gststream)
1517 fs_nice_transmitter_request_keyunit (self->priv->transmitter,
1518 self->priv->gststream, component_id);
1519 FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
1520 }
15131521 }
15141522
15151523
938938
939939 gst_element_send_event (ns->nicesinks[component],
940940 gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
941 gst_structure_new ("GstForceKeyUnit", NULL)));
942 }
941 gst_structure_new ("GstForceKeyUnit",
942 "all-headers", G_TYPE_BOOLEAN, TRUE,
943 NULL)));
944 }
13051305 self->priv->stun_buffer,
13061306 sizeof(self->priv->stun_buffer));
13071307
1308 if (self->priv->stun_timeout_thread == NULL) {
1309 /* only create a new thread if the old one was stopped. Otherwise we can
1310 * just reuse the currently running one. */
1308
1309 /* only create a new thread if the old one was stopped. Otherwise we can
1310 * just reuse the currently running one. */
1311 if (self->priv->stun_timeout_thread == NULL)
1312 {
1313 if (!fs_rawudp_component_send_stun_locked (self, error))
1314 {
1315 FS_RAWUDP_COMPONENT_UNLOCK (self);
1316 return FALSE;
1317 }
1318
13111319 self->priv->stun_timeout_thread =
13121320 g_thread_create (stun_timeout_func, self, TRUE, error);
13131321 }
14641472 GError *error = NULL;
14651473 guint timeout_accum_ms = 0;
14661474 guint remainder;
1467 StunUsageTimerReturn timer_ret = STUN_USAGE_TIMER_RETURN_RETRANSMIT;
1475 StunUsageTimerReturn timer_ret = STUN_USAGE_TIMER_RETURN_SUCCESS;
14681476 StunTransactionId stunid;
14691477 StunTimer stun_timer;
14701478
654654 }
655655
656656 g_object_set (elem,
657 "auto-multicast", FALSE,
657658 "closefd", FALSE,
658659 "sockfd", fd,
659660 NULL);
660
661 if (g_object_class_find_property (G_OBJECT_GET_CLASS (elem),
662 "auto-multicast"))
663 g_object_set (elem, "auto-multicast", FALSE, NULL);
664
665661
666662 if (!gst_bin_add (bin, elem))
667663 {
10301026 g_signal_emit_by_name (udpport->udpsink, "add", ip, port);
10311027 gst_element_send_event (udpport->udpsink,
10321028 gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
1033 gst_structure_new ("GstForceKeyUnit", NULL)));
1029 gst_structure_new ("GstForceKeyUnit",
1030 "all-headers", G_TYPE_BOOLEAN, TRUE,
1031 NULL)));
10341032 }
10351033
10361034
562562 c, path, ready_cb, connected_cb, self, error);
563563 g_free (path);
564564
565 fs_shm_transmitter_sink_set_sending (self->priv->transmitter,
566 self->priv->shm_sink[c], self->priv->sending);
567
568565 if (self->priv->shm_sink[c] == NULL)
569566 return FALSE;
567
568 fs_shm_transmitter_sink_set_sending (self->priv->transmitter,
569 self->priv->shm_sink[c], self->priv->sending);
570570 }
571571
572572 return TRUE;