Imported Upstream version 0.0.28
Sjoerd Simons
13 years ago
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 | ||
0 | 435 | commit 72ef2c35a48538b6c26ef9900a227611dc9c6cdc |
1 | 436 | Author: Olivier Crête <olivier.crete@collabora.co.uk> |
2 | 437 | Date: Wed Feb 23 16:04:46 2011 -0500 |
14 | 14 | ============ |
15 | 15 | |
16 | 16 | 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 | |
20 | 20 | - Python 2.4 |
21 | 21 | - libnice 0.1.0 |
22 | 22 | |
29 | 29 | |
30 | 30 | Run time for the RTP plugin: |
31 | 31 | All of the build time requirements (except gtk-doc) plus |
32 | - gst-plugins-good 0.10.17 | |
32 | - gst-plugins-good 0.10.29 | |
33 | 33 | - gst-plugins-bad 0.10.20 |
34 | 34 | |
35 | 35 | Run time for the MSN plugin: |
0 | 0 | #! /bin/sh |
1 | 1 | # 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. | |
3 | 3 | # |
4 | 4 | # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight>. |
5 | 5 | # |
562 | 562 | # Identity of this package. |
563 | 563 | PACKAGE_NAME='Farsight2' |
564 | 564 | 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' | |
567 | 567 | PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight' |
568 | 568 | PACKAGE_URL='' |
569 | 569 | |
1450 | 1450 | # Omit some internal or obsolete options to make the list less imposing. |
1451 | 1451 | # This message is too long to be a string in the A/UX 3.1 sh. |
1452 | 1452 | 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. | |
1454 | 1454 | |
1455 | 1455 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1456 | 1456 | |
1520 | 1520 | |
1521 | 1521 | if test -n "$ac_init_help"; then |
1522 | 1522 | 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:";; | |
1524 | 1524 | esac |
1525 | 1525 | cat <<\_ACEOF |
1526 | 1526 | |
1691 | 1691 | test -n "$ac_init_help" && exit $ac_status |
1692 | 1692 | if $ac_init_version; then |
1693 | 1693 | cat <<\_ACEOF |
1694 | Farsight2 configure 0.0.26 | |
1694 | Farsight2 configure 0.0.28 | |
1695 | 1695 | generated by GNU Autoconf 2.66 |
1696 | 1696 | |
1697 | 1697 | Copyright (C) 2010 Free Software Foundation, Inc. |
2163 | 2163 | This file contains any messages produced by compilers while |
2164 | 2164 | running configure, to aid debugging if configure makes a mistake. |
2165 | 2165 | |
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 | |
2167 | 2167 | generated by GNU Autoconf 2.66. Invocation command line was |
2168 | 2168 | |
2169 | 2169 | $ $0 $@ |
2983 | 2983 | |
2984 | 2984 | # Define the identity of the package. |
2985 | 2985 | PACKAGE='farsight2' |
2986 | VERSION='0.0.26' | |
2986 | VERSION='0.0.28' | |
2987 | 2987 | |
2988 | 2988 | |
2989 | 2989 | cat >>confdefs.h <<_ACEOF |
3025 | 3025 | |
3026 | 3026 | |
3027 | 3027 | |
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) | |
3031 | 3031 | |
3032 | 3032 | |
3033 | 3033 | |
3038 | 3038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 |
3039 | 3039 | $as_echo_n "checking nano version... " >&6; } |
3040 | 3040 | |
3041 | NANO=$(echo 0.0.26 | cut -d'.' -f4) | |
3041 | NANO=$(echo 0.0.28 | cut -d'.' -f4) | |
3042 | 3042 | |
3043 | 3043 | if test x"$NANO" = x || test "x$NANO" = "x0" ; then |
3044 | 3044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 |
3169 | 3169 | |
3170 | 3170 | |
3171 | 3171 | |
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 | |
3176 | 3176 | |
3177 | 3177 | |
3178 | 3178 | |
10986 | 10986 | |
10987 | 10987 | |
10988 | 10988 | |
10989 | GST_REQ=0.10.26 | |
10990 | GSTPB_REQ=0.10.26 | |
10989 | GST_REQ=0.10.33 | |
10990 | GSTPB_REQ=0.10.33 | |
10991 | 10991 | |
10992 | 10992 | |
10993 | 10993 | |
13747 | 13747 | |
13748 | 13748 | |
13749 | 13749 | |
13750 | GLIB_REQ=2.16 | |
13750 | GLIB_REQ=2.26 | |
13751 | 13751 | if test "x$GLIB_REQ" = "x" |
13752 | 13752 | then |
13753 | 13753 | as_fn_error $? "Please specify a required version for GLib 2.0" "$LINENO" 5 |
15944 | 15944 | # report actual input values of CONFIG_FILES etc. instead of their |
15945 | 15945 | # values after options handling. |
15946 | 15946 | 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 | |
15948 | 15948 | generated by GNU Autoconf 2.66. Invocation command line was |
15949 | 15949 | |
15950 | 15950 | CONFIG_FILES = $CONFIG_FILES |
16010 | 16010 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
16011 | 16011 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
16012 | 16012 | ac_cs_version="\\ |
16013 | Farsight2 config.status 0.0.26 | |
16013 | Farsight2 config.status 0.0.28 | |
16014 | 16014 | configured by $0, generated by GNU Autoconf 2.66, |
16015 | 16015 | with options \\"\$ac_cs_config\\" |
16016 | 16016 |
4 | 4 | dnl initialize autoconf |
5 | 5 | dnl releases only do -Wall, cvs and prerelease does -Werror too |
6 | 6 | 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, | |
8 | 8 | https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight, |
9 | 9 | farsight2) |
10 | 10 | |
51 | 51 | dnl - interfaces added -> increment AGE |
52 | 52 | dnl - interfaces removed -> AGE = 0 |
53 | 53 | dnl sets FS2_LT_LDFLAGS |
54 | AS_LIBTOOL(FS2, 6, 1, 6) | |
54 | AS_LIBTOOL(FS2, 8, 0, 8) | |
55 | 55 | |
56 | 56 | dnl FIXME: this macro doesn't actually work; |
57 | 57 | dnl the generated libtool script has no support for the listed tags. |
61 | 61 | AM_PROG_LIBTOOL |
62 | 62 | |
63 | 63 | 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 | |
66 | 66 | |
67 | 67 | dnl *** autotools stuff **** |
68 | 68 | |
237 | 237 | dnl *** checks for dependency libraries *** |
238 | 238 | |
239 | 239 | dnl GLib is required |
240 | AG_GST_GLIB_CHECK([2.16]) | |
240 | AG_GST_GLIB_CHECK([2.26]) | |
241 | 241 | |
242 | 242 | PKG_CHECK_MODULES(GIO_UNIX, gio-unix-2.0 >= 2.16) |
243 | 243 | AC_SUBST(GIO_UNIX_CFLAGS) |
30 | 30 | <xi:include href="xml/fs-codec.xml"/> |
31 | 31 | </chapter> |
32 | 32 | <chapter> |
33 | <title>Protocol Specific types</title> | |
34 | <xi:include href="xml/fs-rtp.xml"/> | |
35 | </chapter> | |
36 | <chapter> | |
33 | 37 | <title>Farsight Utility Functions and Objects</title> |
34 | 38 | <xi:include href="xml/fs-element-added-notifier.xml"/> |
35 | 39 | <xi:include href="xml/fs-interfaces.xml"/> |
119 | 119 | FsCodec |
120 | 120 | FsMediaType |
121 | 121 | FsCodecParameter |
122 | FsFeedbackParameter | |
122 | 123 | FS_CODEC_ID_ANY |
123 | 124 | FS_CODEC_ID_DISABLE |
124 | 125 | fs_codec_new |
133 | 134 | fs_codec_add_optional_parameter |
134 | 135 | fs_codec_remove_optional_parameter |
135 | 136 | fs_codec_get_optional_parameter |
137 | fs_codec_add_feedback_parameter | |
138 | fs_codec_get_feedback_parameter | |
139 | fs_codec_remove_feedback_parameter | |
136 | 140 | FS_CODEC_FORMAT |
137 | 141 | FS_CODEC_ARGS |
138 | 142 | fs_media_type_to_string |
261 | 265 | </SECTION> |
262 | 266 | |
263 | 267 | <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 | ||
264 | 288 | <FILE>fs-utils</FILE> |
289 | <TITLE>Utility functions</TITLE> | |
265 | 290 | <INCLUDE>gst/farsight/fs-utils.h</INCLUDE> |
291 | fs_utils_set_bitrate | |
266 | 292 | fs_utils_get_default_codec_preferences |
267 | 293 | fs_utils_get_default_element_properties |
268 | </SECTION> | |
294 | fs_utils_get_default_rtp_header_extension_preferences | |
295 | </SECTION> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
15 | 15 | <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> | |
18 | 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
19 | 19 | <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> | |
21 | 21 | </tr> |
22 | 22 | <tr><td colspan="5" class="shortcuts"> |
23 | 23 | <a href="#FsBaseConference.synopsis" class="shortcut">Top</a> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="Farsight GStreamer Interfaces"> |
8 | 8 | <link rel="prev" href="ch01.html" title="Farsight GStreamer Interfaces"> |
91 | 91 | 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>. |
92 | 92 | </p> |
93 | 93 | <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> | |
95 | 95 | <div class="informalexample"> |
96 | 96 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
97 | 97 | <tbody> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 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="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"> | |
9 | 9 | <link rel="next" href="farsight2-libs-Network-interfaces-discovery.html" title="Network interfaces discovery"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
15 | 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> | |
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> | |
18 | 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
19 | 19 | <th width="100%" align="center">Farsight2 Reference Manual</th> |
20 | 20 | <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> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Farsight Core Library"> |
8 | 8 | <link rel="prev" href="ch02.html" title="Farsight Core Library"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Farsight Core Library"> |
8 | 8 | <link rel="prev" href="farsight2-libs-fs-session.html" title="FsSession"> |
110 | 110 | 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>. |
111 | 111 | </p> |
112 | 112 | <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> | |
114 | 114 | <div class="informalexample"> |
115 | 115 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
116 | 116 | <tbody> |
130 | 130 | </div> |
131 | 131 | <hr> |
132 | 132 | <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> | |
134 | 134 | <div class="informalexample"> |
135 | 135 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
136 | 136 | <tbody> |
149 | 149 | </div> |
150 | 150 | <hr> |
151 | 151 | <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> | |
153 | 153 | <div class="informalexample"> |
154 | 154 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
155 | 155 | <tbody> |
175 | 175 | </div> |
176 | 176 | <hr> |
177 | 177 | <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> | |
179 | 179 | <div class="informalexample"> |
180 | 180 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
181 | 181 | <tbody> |
200 | 200 | </div> |
201 | 201 | <hr> |
202 | 202 | <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> | |
204 | 204 | <div class="informalexample"> |
205 | 205 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
206 | 206 | <tbody> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <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"> | |
8 | 8 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
14 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
15 | 15 | <tr valign="middle"> |
16 | 16 | <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> | |
18 | 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
19 | 19 | <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> | |
21 | 21 | </tr> |
22 | 22 | <tr><td colspan="5" class="shortcuts"> |
23 | 23 | <a href="#FsStreamTransmitter.synopsis" class="shortcut">Top</a> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <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"> | |
9 | 9 | <link rel="next" href="FsStreamTransmitter.html" title="FsStreamTransmitter"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
15 | 15 | <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> | |
18 | 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
19 | 19 | <th width="100%" align="center">Farsight2 Reference Manual</th> |
20 | 20 | <td><a accesskey="n" href="FsStreamTransmitter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions"> |
8 | 8 | <link rel="prev" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter" title="Farsight GStreamer Interfaces"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"><dl><dt> |
25 | 25 | <span class="refentrytitle"><a href="FsConference.html">FsConference</a></span><span class="refpurpose"> — Interface for farsight conference elements</span> |
26 | 26 | </dt></dl></div> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions"> |
8 | 8 | <link rel="prev" href="FsConference.html" title="FsConference"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter" title="Farsight Core Library"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"><dl> |
25 | 25 | <dt> |
26 | 26 | <span class="refentrytitle"><a href="FsParticipant.html">FsParticipant</a></span><span class="refpurpose"> — A participant in a conference</span> |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions"> |
8 | 8 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
16 | 16 | <td><a accesskey="u" href="pt01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 18 | <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> | |
20 | 20 | </tr></table> |
21 | <div class="chapter" title="Farsight Utility Functions and Objects"> | |
21 | <div class="chapter" title="Protocol Specific types"> | |
22 | 22 | <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> | |
35 | 27 | </div> |
36 | 28 | <div class="footer"> |
37 | 29 | <hr> |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <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"> | |
6 | 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="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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <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> | |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 18 | <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> | |
20 | 20 | </tr></table> |
21 | <div class="chapter" title="Farsight Classes Base Implementations"> | |
21 | <div class="chapter" title="Farsight Utility Functions and Objects"> | |
22 | 22 | <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> | |
27 | 35 | </div> |
28 | 36 | <div class="footer"> |
29 | 37 | <hr> |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <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> | |
16 | 16 | <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 18 | <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> | |
20 | 20 | </tr></table> |
21 | <div class="chapter" title="Farsight Transmitter Classes"> | |
21 | <div class="chapter" title="Farsight Classes Base Implementations"> | |
22 | 22 | <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> | |
33 | 27 | </div> |
34 | 28 | <div class="footer"> |
35 | 29 | <hr> |
1 | 1 | <html> |
2 | 2 | <head> |
3 | 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.75.2"> | |
4 | <title>Farsight Transmitter Classes</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 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"> | |
8 | <link rel="prev" href="FsBaseConference.html" title="FsBaseConference"> | |
9 | <link rel="next" href="FsTransmitter.html" title="FsTransmitter"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 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> | |
15 | <td><a accesskey="p" href="FsBaseConference.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> | |
16 | 16 | <td><a accesskey="u" href="pt02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 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> | |
19 | <td><a accesskey="n" href="FsTransmitter.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> | |
20 | 20 | </tr></table> |
21 | <div class="chapter" title="Farsight Plugins Infrastructure"> | |
21 | <div class="chapter" title="Farsight Transmitter Classes"> | |
22 | 22 | <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> | |
27 | 33 | </div> |
28 | 34 | <div class="footer"> |
29 | 35 | <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>⏎ |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Farsight Core Library"> |
8 | 8 | <link rel="prev" href="FsStream.html" title="FsStream"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Farsight Core Library"> |
8 | 8 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
42 | 42 | <a class="link" href="farsight2-libs-FsCodec.html#FsCodec" title="FsCodec">FsCodec</a>; |
43 | 43 | enum <a class="link" href="farsight2-libs-FsCodec.html#FsMediaType" title="enum FsMediaType">FsMediaType</a>; |
44 | 44 | <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>; | |
45 | 46 | #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS" title="FS_CODEC_ID_ANY">FS_CODEC_ID_ANY</a> |
46 | 47 | #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS" title="FS_CODEC_ID_DISABLE">FS_CODEC_ID_DISABLE</a> |
47 | 48 | <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>, |
67 | 68 | <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>, |
68 | 69 | <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>, |
69 | 70 | <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>); | |
70 | 81 | #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS" title="FS_CODEC_FORMAT">FS_CODEC_FORMAT</a> |
71 | 82 | #define <a class="link" href="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS" title="FS_CODEC_ARGS()">FS_CODEC_ARGS</a> (codec) |
72 | 83 | 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>); |
194 | 205 | </table></div> |
195 | 206 | </div> |
196 | 207 | <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> | |
197 | 241 | <div class="refsect2" title="FS_CODEC_ID_ANY"> |
198 | 242 | <a name="FS-CODEC-ID-ANY:CAPS"></a><h3>FS_CODEC_ID_ANY</h3> |
199 | 243 | <pre class="programlisting">#define FS_CODEC_ID_ANY (-1) |
350 | 394 | 6 |
351 | 395 | 7 |
352 | 396 | 8 |
353 | 9</pre></td> | |
397 | 9 | |
398 | 10 | |
399 | 11 | |
400 | 12 | |
401 | 13 | |
402 | 14</pre></td> | |
354 | 403 | <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> |
355 | 404 | <span class="normal">clock</span><span class="symbol">-</span><span class="normal">rate</span><span class="symbol">=</span><span class="number">8000</span> |
356 | 405 | |
359 | 408 | |
360 | 409 | <span class="symbol">[</span><span class="normal">audio</span><span class="symbol">/</span><span class="normal">codec2</span><span class="symbol">]</span> |
361 | 410 | <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> | |
363 | 417 | </tr> |
364 | 418 | </tbody> |
365 | 419 | </table> |
505 | 559 | </tr> |
506 | 560 | <tr> |
507 | 561 | <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> | |
509 | 563 | </td> |
510 | 564 | </tr> |
511 | 565 | </tbody> |
532 | 586 | </tr> |
533 | 587 | <tr> |
534 | 588 | <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> | |
536 | 590 | </td> |
537 | 591 | </tr> |
538 | 592 | </tbody> |
575 | 629 | </table></div> |
576 | 630 | </div> |
577 | 631 | <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> | |
578 | 734 | <div class="refsect2" title="FS_CODEC_FORMAT"> |
579 | 735 | <a name="FS-CODEC-FORMAT:CAPS"></a><h3>FS_CODEC_FORMAT</h3> |
580 | 736 | <pre class="programlisting">#define FS_CODEC_FORMAT "%d: %s %s clock:%d channels:%d params:%p" |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <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"> | |
9 | 9 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
10 | 10 | <link rel="stylesheet" href="style.css" type="text/css"> |
11 | 11 | </head> |
12 | 12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
13 | 13 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
14 | 14 | <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> | |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 18 | <th width="100%" align="center">Farsight2 Reference Manual</th> |
19 | 19 | <td> </td> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <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"> | |
8 | 8 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
14 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
15 | 15 | <tr valign="middle"> |
16 | 16 | <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> | |
18 | 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
19 | 19 | <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> | |
21 | 21 | </tr> |
22 | 22 | <tr><td colspan="5" class="shortcuts"> |
23 | 23 | <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 <gst/farsight/fs-rtp.h> | |
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 <gst/farsight/fs-utils.h> | |
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>⏎ |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Farsight Core Library"> |
8 | 8 | <link rel="prev" href="FsParticipant.html" title="FsParticipant"> |
121 | 121 | 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>. |
122 | 122 | </p> |
123 | 123 | <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>" | |
125 | 125 | message</h3> |
126 | 126 | <div class="informalexample"> |
127 | 127 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
147 | 147 | </div> |
148 | 148 | <hr> |
149 | 149 | <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>" | |
151 | 151 | message</h3> |
152 | 152 | <div class="informalexample"> |
153 | 153 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
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 <gst/farsight/fs-utils.h> | |
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>⏎ |
12 | 12 | <sub name="FsCandidate" link="farsight2-libs-FsCandidate.html"/> |
13 | 13 | <sub name="FsCodec" link="farsight2-libs-FsCodec.html"/> |
14 | 14 | </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"> | |
16 | 19 | <sub name="FsElementAddedNotifier" link="FsElementAddedNotifier.html"/> |
17 | 20 | <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"/> | |
19 | 22 | </sub> |
20 | 23 | </sub> |
21 | 24 | <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"> | |
23 | 26 | <sub name="FsBaseConference" link="FsBaseConference.html"/> |
24 | 27 | </sub> |
25 | <sub name="Farsight Transmitter Classes" link="ch05.html"> | |
28 | <sub name="Farsight Transmitter Classes" link="ch06.html"> | |
26 | 29 | <sub name="FsTransmitter" link="FsTransmitter.html"/> |
27 | 30 | <sub name="FsStreamTransmitter" link="FsStreamTransmitter.html"/> |
28 | 31 | </sub> |
29 | <sub name="Farsight Plugins Infrastructure" link="ch06.html"> | |
32 | <sub name="Farsight Plugins Infrastructure" link="ch07.html"> | |
30 | 33 | <sub name="FsPlugin" link="farsight2-libs-FsPlugin.html"/> |
31 | 34 | </sub> |
32 | 35 | </sub> |
33 | 36 | </chapters> |
34 | 37 | <functions> |
35 | <function name="The "farsight-error" message" link="FsConference.html#id318267"/> | |
38 | <function name="The "farsight-error" message" link="FsConference.html#id415196"/> | |
36 | 39 | <function name="FsConference" link="FsConference.html#FsConference-struct"/> |
37 | 40 | <function name="fs_conference_new_session ()" link="FsConference.html#fs-conference-new-session"/> |
38 | 41 | <function name="fs_conference_new_participant ()" link="FsConference.html#fs-conference-new-participant"/> |
45 | 48 | <function name="FS_PARTICIPANT_DATA_UNLOCK()" link="FsParticipant.html#FS-PARTICIPANT-DATA-UNLOCK:CAPS"/> |
46 | 49 | <function name="The "cname" property" link="FsParticipant.html#FsParticipant--cname"/> |
47 | 50 | <function name="The "error" signal" link="FsParticipant.html#FsParticipant-error"/> |
48 | <function name="The "farsight-send-codec-changed" message" link="farsight2-libs-fs-session.html#id376154"/> | |
49 | <function name="The "farsight-codecs-changed" message" link="farsight2-libs-fs-session.html#id376214"/> | |
51 | <function name="The "farsight-send-codec-changed" message" link="farsight2-libs-fs-session.html#id493898"/> | |
52 | <function name="The "farsight-codecs-changed" message" link="farsight2-libs-fs-session.html#id493958"/> | |
50 | 53 | <function name="enum FsDTMFEvent" link="farsight2-libs-fs-session.html#FsDTMFEvent"/> |
51 | 54 | <function name="enum FsDTMFMethod" link="farsight2-libs-fs-session.html#FsDTMFMethod"/> |
52 | 55 | <function name="FsSession" link="farsight2-libs-fs-session.html#FsSession-struct"/> |
69 | 72 | <function name="The "sink-pad" property" link="farsight2-libs-fs-session.html#FsSession--sink-pad"/> |
70 | 73 | <function name="The "tos" property" link="farsight2-libs-fs-session.html#FsSession--tos"/> |
71 | 74 | <function name="The "error" signal" link="farsight2-libs-fs-session.html#FsSession-error"/> |
72 | <function name="The "farsight-new-local-candidate" message" link="FsStream.html#id398080"/> | |
73 | <function name="The "farsight-local-candidates-prepared" message" link="FsStream.html#id398116"/> | |
74 | <function name="The "farsight-new-active-candidate-pair" message" link="FsStream.html#id398146"/> | |
75 | <function name="The "farsight-recv-codecs-changed" message" link="FsStream.html#id398190"/> | |
76 | <function name="The "farsight-component-state-changed" message" link="FsStream.html#id398254"/> | |
75 | <function name="The "farsight-new-local-candidate" message" link="FsStream.html#id498750"/> | |
76 | <function name="The "farsight-local-candidates-prepared" message" link="FsStream.html#id498786"/> | |
77 | <function name="The "farsight-new-active-candidate-pair" message" link="FsStream.html#id498816"/> | |
78 | <function name="The "farsight-recv-codecs-changed" message" link="FsStream.html#id498860"/> | |
79 | <function name="The "farsight-component-state-changed" message" link="FsStream.html#id498924"/> | |
77 | 80 | <function name="FsStream" link="FsStream.html#FsStream-struct"/> |
78 | 81 | <function name="FsStreamClass" link="FsStream.html#FsStreamClass"/> |
79 | 82 | <function name="enum FsStreamDirection" link="FsStream.html#FsStreamDirection"/> |
105 | 108 | <function name="FsCodec" link="farsight2-libs-FsCodec.html#FsCodec"/> |
106 | 109 | <function name="enum FsMediaType" link="farsight2-libs-FsCodec.html#FsMediaType"/> |
107 | 110 | <function name="FsCodecParameter" link="farsight2-libs-FsCodec.html#FsCodecParameter"/> |
111 | <function name="FsFeedbackParameter" link="farsight2-libs-FsCodec.html#FsFeedbackParameter"/> | |
108 | 112 | <function name="FS_CODEC_ID_ANY" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS"/> |
109 | 113 | <function name="FS_CODEC_ID_DISABLE" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS"/> |
110 | 114 | <function name="fs_codec_new ()" link="farsight2-libs-FsCodec.html#fs-codec-new"/> |
119 | 123 | <function name="fs_codec_add_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter"/> |
120 | 124 | <function name="fs_codec_remove_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter"/> |
121 | 125 | <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"/> | |
122 | 129 | <function name="FS_CODEC_FORMAT" link="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS"/> |
123 | 130 | <function name="FS_CODEC_ARGS()" link="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS"/> |
124 | 131 | <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"/> | |
125 | 142 | <function name="FsElementAddedNotifier" link="FsElementAddedNotifier.html#FsElementAddedNotifier-struct"/> |
126 | 143 | <function name="fs_element_added_notifier_new ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-new"/> |
127 | 144 | <function name="fs_element_added_notifier_add ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-add"/> |
132 | 149 | <function name="fs_interfaces_get_ip_for_interface ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-ip-for-interface"/> |
133 | 150 | <function name="fs_interfaces_get_local_interfaces ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces"/> |
134 | 151 | <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"/> | |
137 | 166 | <function name="FsBaseConference" link="FsBaseConference.html#FsBaseConference-struct"/> |
138 | 167 | <function name="FsBaseConferenceClass" link="FsBaseConference.html#FsBaseConferenceClass"/> |
139 | 168 | <function name="FsTransmitter" link="FsTransmitter.html#FsTransmitter-struct"/> |
12 | 12 | <sub name="FsCandidate" link="farsight2-libs-FsCandidate.html"/> |
13 | 13 | <sub name="FsCodec" link="farsight2-libs-FsCodec.html"/> |
14 | 14 | </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"> | |
16 | 19 | <sub name="FsElementAddedNotifier" link="FsElementAddedNotifier.html"/> |
17 | 20 | <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"/> | |
19 | 22 | </sub> |
20 | 23 | </sub> |
21 | 24 | <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"> | |
23 | 26 | <sub name="FsBaseConference" link="FsBaseConference.html"/> |
24 | 27 | </sub> |
25 | <sub name="Farsight Transmitter Classes" link="ch05.html"> | |
28 | <sub name="Farsight Transmitter Classes" link="ch06.html"> | |
26 | 29 | <sub name="FsTransmitter" link="FsTransmitter.html"/> |
27 | 30 | <sub name="FsStreamTransmitter" link="FsStreamTransmitter.html"/> |
28 | 31 | </sub> |
29 | <sub name="Farsight Plugins Infrastructure" link="ch06.html"> | |
32 | <sub name="Farsight Plugins Infrastructure" link="ch07.html"> | |
30 | 33 | <sub name="FsPlugin" link="farsight2-libs-FsPlugin.html"/> |
31 | 34 | </sub> |
32 | 35 | </sub> |
33 | 36 | </chapters> |
34 | 37 | <functions> |
35 | <keyword type="" name="The "farsight-error" message" link="FsConference.html#id318267"/> | |
38 | <keyword type="" name="The "farsight-error" message" link="FsConference.html#id415196"/> | |
36 | 39 | <keyword type="struct" name="FsConference" link="FsConference.html#FsConference-struct"/> |
37 | 40 | <keyword type="function" name="fs_conference_new_session ()" link="FsConference.html#fs-conference-new-session"/> |
38 | 41 | <keyword type="function" name="fs_conference_new_participant ()" link="FsConference.html#fs-conference-new-participant"/> |
45 | 48 | <keyword type="macro" name="FS_PARTICIPANT_DATA_UNLOCK()" link="FsParticipant.html#FS-PARTICIPANT-DATA-UNLOCK:CAPS"/> |
46 | 49 | <keyword type="property" name="The "cname" property" link="FsParticipant.html#FsParticipant--cname"/> |
47 | 50 | <keyword type="signal" name="The "error" signal" link="FsParticipant.html#FsParticipant-error"/> |
48 | <keyword type="" name="The "farsight-send-codec-changed" message" link="farsight2-libs-fs-session.html#id376154"/> | |
49 | <keyword type="" name="The "farsight-codecs-changed" message" link="farsight2-libs-fs-session.html#id376214"/> | |
51 | <keyword type="" name="The "farsight-send-codec-changed" message" link="farsight2-libs-fs-session.html#id493898"/> | |
52 | <keyword type="" name="The "farsight-codecs-changed" message" link="farsight2-libs-fs-session.html#id493958"/> | |
50 | 53 | <keyword type="enum" name="enum FsDTMFEvent" link="farsight2-libs-fs-session.html#FsDTMFEvent"/> |
51 | 54 | <keyword type="enum" name="enum FsDTMFMethod" link="farsight2-libs-fs-session.html#FsDTMFMethod"/> |
52 | 55 | <keyword type="struct" name="FsSession" link="farsight2-libs-fs-session.html#FsSession-struct"/> |
69 | 72 | <keyword type="property" name="The "sink-pad" property" link="farsight2-libs-fs-session.html#FsSession--sink-pad"/> |
70 | 73 | <keyword type="property" name="The "tos" property" link="farsight2-libs-fs-session.html#FsSession--tos"/> |
71 | 74 | <keyword type="signal" name="The "error" signal" link="farsight2-libs-fs-session.html#FsSession-error"/> |
72 | <keyword type="" name="The "farsight-new-local-candidate" message" link="FsStream.html#id398080"/> | |
73 | <keyword type="" name="The "farsight-local-candidates-prepared" message" link="FsStream.html#id398116"/> | |
74 | <keyword type="" name="The "farsight-new-active-candidate-pair" message" link="FsStream.html#id398146"/> | |
75 | <keyword type="" name="The "farsight-recv-codecs-changed" message" link="FsStream.html#id398190"/> | |
76 | <keyword type="" name="The "farsight-component-state-changed" message" link="FsStream.html#id398254"/> | |
75 | <keyword type="" name="The "farsight-new-local-candidate" message" link="FsStream.html#id498750"/> | |
76 | <keyword type="" name="The "farsight-local-candidates-prepared" message" link="FsStream.html#id498786"/> | |
77 | <keyword type="" name="The "farsight-new-active-candidate-pair" message" link="FsStream.html#id498816"/> | |
78 | <keyword type="" name="The "farsight-recv-codecs-changed" message" link="FsStream.html#id498860"/> | |
79 | <keyword type="" name="The "farsight-component-state-changed" message" link="FsStream.html#id498924"/> | |
77 | 80 | <keyword type="struct" name="FsStream" link="FsStream.html#FsStream-struct"/> |
78 | 81 | <keyword type="struct" name="FsStreamClass" link="FsStream.html#FsStreamClass"/> |
79 | 82 | <keyword type="enum" name="enum FsStreamDirection" link="FsStream.html#FsStreamDirection"/> |
105 | 108 | <keyword type="struct" name="FsCodec" link="farsight2-libs-FsCodec.html#FsCodec"/> |
106 | 109 | <keyword type="enum" name="enum FsMediaType" link="farsight2-libs-FsCodec.html#FsMediaType"/> |
107 | 110 | <keyword type="struct" name="FsCodecParameter" link="farsight2-libs-FsCodec.html#FsCodecParameter"/> |
111 | <keyword type="struct" name="FsFeedbackParameter" link="farsight2-libs-FsCodec.html#FsFeedbackParameter"/> | |
108 | 112 | <keyword type="macro" name="FS_CODEC_ID_ANY" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS"/> |
109 | 113 | <keyword type="macro" name="FS_CODEC_ID_DISABLE" link="farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS"/> |
110 | 114 | <keyword type="function" name="fs_codec_new ()" link="farsight2-libs-FsCodec.html#fs-codec-new"/> |
119 | 123 | <keyword type="function" name="fs_codec_add_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter"/> |
120 | 124 | <keyword type="function" name="fs_codec_remove_optional_parameter ()" link="farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter"/> |
121 | 125 | <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"/> | |
122 | 129 | <keyword type="macro" name="FS_CODEC_FORMAT" link="farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS"/> |
123 | 130 | <keyword type="macro" name="FS_CODEC_ARGS()" link="farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS"/> |
124 | 131 | <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"/> | |
125 | 142 | <keyword type="struct" name="FsElementAddedNotifier" link="FsElementAddedNotifier.html#FsElementAddedNotifier-struct"/> |
126 | 143 | <keyword type="function" name="fs_element_added_notifier_new ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-new"/> |
127 | 144 | <keyword type="function" name="fs_element_added_notifier_add ()" link="FsElementAddedNotifier.html#fs-element-added-notifier-add"/> |
132 | 149 | <keyword type="function" name="fs_interfaces_get_ip_for_interface ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-ip-for-interface"/> |
133 | 150 | <keyword type="function" name="fs_interfaces_get_local_interfaces ()" link="farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces"/> |
134 | 151 | <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"/> | |
137 | 166 | <keyword type="struct" name="FsBaseConference" link="FsBaseConference.html#FsBaseConference-struct"/> |
138 | 167 | <keyword type="struct" name="FsBaseConferenceClass" link="FsBaseConference.html#FsBaseConferenceClass"/> |
139 | 168 | <keyword type="struct" name="FsTransmitter" link="FsTransmitter.html#FsTransmitter-struct"/> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="next" href="pt01.html" title="Part I. User-oriented classes, interfaces and functions"> |
8 | 8 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
14 | 14 | <div> |
15 | 15 | <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> |
16 | 16 | <div><p class="releaseinfo"> |
17 | for version 0.0.25.1. | |
17 | for version 0.0.28. | |
18 | 18 | The latest version of this documentation can be found on-line at |
19 | 19 | <a class="ulink" href="http://farsight.freedesktop.org/apidoc/farsight2/" target="_top">http://farsight.freedesktop.org/apidoc/farsight2/</a>. |
20 | 20 | The bases classes are implemented by multiple plugins described in |
48 | 48 | <span class="refentrytitle"><a href="farsight2-libs-FsCodec.html">FsCodec</a></span><span class="refpurpose"> — Structure representing a media codec</span> |
49 | 49 | </dt> |
50 | 50 | </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> | |
52 | 56 | <dd><dl> |
53 | 57 | <dt> |
54 | 58 | <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span> |
57 | 61 | <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> |
58 | 62 | </dt> |
59 | 63 | <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> | |
61 | 65 | </dt> |
62 | 66 | </dl></dd> |
63 | 67 | </dl></dd> |
64 | 68 | <dt><span class="part"><a href="pt02.html">II. Classes used to implement Farsight plugins</a></span></dt> |
65 | 69 | <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> | |
67 | 71 | <dd><dl><dt> |
68 | 72 | <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span> |
69 | 73 | </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> | |
71 | 75 | <dd><dl> |
72 | 76 | <dt> |
73 | 77 | <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span> |
77 | 81 | information to a transmitter.</span> |
78 | 82 | </dt> |
79 | 83 | </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> | |
81 | 85 | <dd><dl><dt> |
82 | 86 | <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span> |
83 | 87 | </dt></dl></dd> |
145 | 145 | <ANCHOR id="FS-MEDIA-TYPE-VIDEO:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-MEDIA-TYPE-VIDEO:CAPS"> |
146 | 146 | <ANCHOR id="FS-MEDIA-TYPE-LAST:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-MEDIA-TYPE-LAST:CAPS"> |
147 | 147 | <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"> | |
148 | 149 | <ANCHOR id="FS-CODEC-ID-ANY:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ID-ANY:CAPS"> |
149 | 150 | <ANCHOR id="FS-CODEC-ID-DISABLE:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ID-DISABLE:CAPS"> |
150 | 151 | <ANCHOR id="fs-codec-new" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-new"> |
159 | 160 | <ANCHOR id="fs-codec-add-optional-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-add-optional-parameter"> |
160 | 161 | <ANCHOR id="fs-codec-remove-optional-parameter" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#fs-codec-remove-optional-parameter"> |
161 | 162 | <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"> | |
162 | 166 | <ANCHOR id="FS-CODEC-FORMAT:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-FORMAT:CAPS"> |
163 | 167 | <ANCHOR id="FS-CODEC-ARGS:CAPS" href="farsight2-libs-0.10/farsight2-libs-FsCodec.html#FS-CODEC-ARGS:CAPS"> |
164 | 168 | <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"> | |
165 | 183 | <ANCHOR id="FsElementAddedNotifier" href="farsight2-libs-0.10/FsElementAddedNotifier.html"> |
166 | 184 | <ANCHOR id="FsElementAddedNotifier.synopsis" href="farsight2-libs-0.10/FsElementAddedNotifier.html#FsElementAddedNotifier.synopsis"> |
167 | 185 | <ANCHOR id="FsElementAddedNotifier.object-hierarchy" href="farsight2-libs-0.10/FsElementAddedNotifier.html#FsElementAddedNotifier.object-hierarchy"> |
183 | 201 | <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"> |
184 | 202 | <ANCHOR id="fs-interfaces-get-local-interfaces" href="farsight2-libs-0.10/farsight2-libs-Network-interfaces-discovery.html#fs-interfaces-get-local-interfaces"> |
185 | 203 | <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"> | |
192 | 222 | <ANCHOR id="FsBaseConference" href="farsight2-libs-0.10/FsBaseConference.html"> |
193 | 223 | <ANCHOR id="FsBaseConference.synopsis" href="farsight2-libs-0.10/FsBaseConference.html#FsBaseConference.synopsis"> |
194 | 224 | <ANCHOR id="FsBaseConference.object-hierarchy" href="farsight2-libs-0.10/FsBaseConference.html#FsBaseConference.object-hierarchy"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <link rel="up" href="index.html" title="Farsight2 Reference Manual"> |
8 | 8 | <link rel="prev" href="index.html" title="Farsight2 Reference Manual"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="part" title="Part I. User-oriented classes, interfaces and functions"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"> |
25 | 25 | <p><b>Table of Contents</b></p> |
26 | 26 | <dl> |
46 | 46 | <span class="refentrytitle"><a href="farsight2-libs-FsCodec.html">FsCodec</a></span><span class="refpurpose"> — Structure representing a media codec</span> |
47 | 47 | </dt> |
48 | 48 | </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> | |
50 | 54 | <dd><dl> |
51 | 55 | <dt> |
52 | 56 | <span class="refentrytitle"><a href="FsElementAddedNotifier.html">FsElementAddedNotifier</a></span><span class="refpurpose"> — Recursive element addition notifier</span> |
55 | 59 | <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> |
56 | 60 | </dt> |
57 | 61 | <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> | |
59 | 63 | </dt> |
60 | 64 | </dl></dd> |
61 | 65 | </dl> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Reference Manual"> |
7 | 7 | <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"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
13 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
14 | 14 | <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> | |
16 | 16 | <td> </td> |
17 | 17 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
18 | 18 | <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> | |
20 | 20 | </tr></table> |
21 | 21 | <div class="part" title="Part II. Classes used to implement Farsight plugins"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"> |
25 | 25 | <p><b>Table of Contents</b></p> |
26 | 26 | <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> | |
28 | 28 | <dd><dl><dt> |
29 | 29 | <span class="refentrytitle"><a href="FsBaseConference.html">FsBaseConference</a></span><span class="refpurpose"> — Base class for Farsight Conference Gstreamer Elements</span> |
30 | 30 | </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> | |
32 | 32 | <dd><dl> |
33 | 33 | <dt> |
34 | 34 | <span class="refentrytitle"><a href="FsTransmitter.html">FsTransmitter</a></span><span class="refpurpose"> — A transmitter object linked to a session</span> |
38 | 38 | information to a transmitter.</span> |
39 | 39 | </dt> |
40 | 40 | </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> | |
42 | 42 | <dd><dl><dt> |
43 | 43 | <span class="refentrytitle"><a href="farsight2-libs-FsPlugin.html">FsPlugin</a></span><span class="refpurpose"> — A class for defining Farsight plugins</span> |
44 | 44 | </dt></dl></dd> |
167 | 167 | <DEFAULT>NULL</DEFAULT> |
168 | 168 | </ARG> |
169 | 169 | |
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 |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference"> |
8 | 8 | <link rel="prev" href="pt01.html" title="Part I. Plugins implementing FsConference"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter" title="RTP Plugin"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"><dl> |
25 | 25 | <dt> |
26 | 26 | <span class="refentrytitle"><a href="farsight2-plugins-FsRtpConference.html">FsRtpConference</a></span><span class="refpurpose"> — Farsight RTP Conference Gstreamer Elements</span> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRtpStream.html" title="FsRtpStream"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter" title="Raw Plugin"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"><dl> |
25 | 25 | <dt> |
26 | 26 | <span class="refentrytitle"><a href="farsight2-plugins-FsRawConference.html">FsRawConference</a></span><span class="refpurpose"> — Farsight Raw Conference Gstreamer Elements Base class</span> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. Plugins implementing FsConference"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRawStream.html" title="FsRawStream"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter" title="MSN Webcam plugin"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"><dl> |
25 | 25 | <dt> |
26 | 26 | <span class="refentrytitle"><a href="farsight2-plugins-FsMsnCamSendConference.html">FsMsnCamSendConference</a></span><span class="refpurpose"> — Farsight MSN send Conference Gstreamer Element</span> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt03.html" title="Part III. Utility elements"> |
8 | 8 | <link rel="prev" href="pt03.html" title="Part III. Utility elements"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnCamSendConference.html" title="FsMsnCamSendConference"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="ch03.html" title="MSN Webcam plugin"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnCamCamRecvConference.html" title="FsMsnCamCamRecvConference"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnConference.html" title="FsMsnConference"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnParticipant.html" title="FsMsnParticipant"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch03.html" title="MSN Webcam plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnSession.html" title="FsMsnSession"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. Transmitters"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRawUdpStreamTransmitter.html" title="FsRawUdpStreamTransmitter"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. Transmitters"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMulticastStreamTransmitter.html" title="FsMulticastStreamTransmitter"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Raw Plugin"> |
8 | 8 | <link rel="prev" href="ch02.html" title="Raw Plugin"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Raw Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRawConference.html" title="FsRawConference"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Raw Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRawParticipant.html" title="FsRawParticipant"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch02.html" title="Raw Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRawSession.html" title="FsRawSession"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. Transmitters"> |
8 | 8 | <link rel="prev" href="pt02.html" title="Part II. Transmitters"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="RTP Plugin"> |
8 | 8 | <link rel="prev" href="ch01.html" title="RTP Plugin"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="RTP Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRtpConference.html" title="FsRtpConference"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="RTP Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRtpParticipant.html" title="FsRtpParticipant"> |
60 | 60 | SSRC (although if there is a SSRC collision, that SSRC may change). |
61 | 61 | </p> |
62 | 62 | <div class="refsect2" title="Codec profiles"> |
63 | <a name="id568368"></a><h3>Codec profiles</h3> | |
63 | <a name="id586353"></a><h3>Codec profiles</h3> | |
64 | 64 | <p> |
65 | 65 | It is possible to define "codec profiles", that is non-autodetected |
66 | 66 | encoding and decoding pipelines for codecs. It is even possible to declare |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="RTP Plugin"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsRtpSession.html" title="FsRtpSession"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. Transmitters"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsNiceStreamTransmitter.html" title="FsNiceStreamTransmitter"> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="pt03.html" title="Part III. Utility elements"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsFunnel.html" title="FsFunnel"> |
46 | 46 | <function name="The "sdes" property" link="farsight2-plugins-FsRtpConference.html#FsRtpConference--sdes"/> |
47 | 47 | <function name="FsRtpParticipant" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant"/> |
48 | 48 | <function name="The "cname" 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"/> | |
50 | 50 | <function name="FsRtpSession" link="farsight2-plugins-FsRtpSession.html#FsRtpSession"/> |
51 | 51 | <function name="The "no-rtcp-timeout" property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--no-rtcp-timeout"/> |
52 | 52 | <function name="The "ssrc" property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--ssrc"/> |
46 | 46 | <keyword type="property" name="The "sdes" property" link="farsight2-plugins-FsRtpConference.html#FsRtpConference--sdes"/> |
47 | 47 | <keyword type="struct" name="FsRtpParticipant" link="farsight2-plugins-FsRtpParticipant.html#FsRtpParticipant"/> |
48 | 48 | <keyword type="property" name="The "cname" 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"/> | |
50 | 50 | <keyword type="struct" name="FsRtpSession" link="farsight2-plugins-FsRtpSession.html#FsRtpSession"/> |
51 | 51 | <keyword type="property" name="The "no-rtcp-timeout" property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--no-rtcp-timeout"/> |
52 | 52 | <keyword type="property" name="The "ssrc" property" link="farsight2-plugins-FsRtpSession.html#FsRtpSession--ssrc"/> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="next" href="pt01.html" title="Part I. Plugins implementing FsConference"> |
8 | 8 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> |
14 | 14 | <div> |
15 | 15 | <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> |
16 | 16 | <div><p class="releaseinfo"> |
17 | for version 0.0.25.1. | |
17 | for version 0.0.26.1. | |
18 | 18 | The latest version of this documentation can be found on-line at |
19 | 19 | <a class="ulink" href="http://farsight.freedesktop.org/apidoc/farsight2-plugins/" target="_top">http://farsight.freedesktop.org/apidoc/farsight2-plugins/</a>. |
20 | 20 | These plugins are to be used with the base classes and other utility |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="index.html" title="Farsight2 Plugins Manual"> |
8 | 8 | <link rel="prev" href="index.html" title="Farsight2 Plugins Manual"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="part" title="Part I. Plugins implementing FsConference"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"> |
25 | 25 | <p><b>Table of Contents</b></p> |
26 | 26 | <dl> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="index.html" title="Farsight2 Plugins Manual"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsMsnStream.html" title="FsMsnStream"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="part" title="Part II. Transmitters"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"> |
25 | 25 | <p><b>Table of Contents</b></p> |
26 | 26 | <dl> |
2 | 2 | <head> |
3 | 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
4 | 4 | <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"> | |
6 | 6 | <link rel="home" href="index.html" title="Farsight2 Plugins Manual"> |
7 | 7 | <link rel="up" href="index.html" title="Farsight2 Plugins Manual"> |
8 | 8 | <link rel="prev" href="farsight2-plugins-FsShmStreamTransmitter.html" title="FsShmStreamTransmitter"> |
20 | 20 | </tr></table> |
21 | 21 | <div class="part" title="Part III. Utility elements"> |
22 | 22 | <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> | |
24 | 24 | <div class="toc"> |
25 | 25 | <p><b>Table of Contents</b></p> |
26 | 26 | <dl> |
86 | 86 | GError *construction_error; |
87 | 87 | |
88 | 88 | GstPad *media_sink_pad; |
89 | GstElement *capsfilter; | |
89 | GstElement *send_capsfilter; | |
90 | 90 | GList *codecs; |
91 | 91 | FsCodec *send_codec; |
92 | 92 | gboolean transmitter_linked; |
97 | 97 | GstElement *transform_bin; |
98 | 98 | GstElement *fakesink; |
99 | 99 | |
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; | |
101 | 107 | |
102 | 108 | FsTransmitter *transmitter; |
103 | 109 | |
112 | 118 | |
113 | 119 | G_DEFINE_TYPE (FsRawSession, fs_raw_session, FS_TYPE_SESSION); |
114 | 120 | |
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)) | |
117 | 123 | |
118 | 124 | #ifdef DEBUG_MUTEXES |
119 | 125 | |
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++; \ | |
125 | 131 | } 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); \ | |
131 | 137 | } while (0); |
132 | #define FS_RAW_SESSION_GET_LOCK(session) \ | |
138 | #define FS_RAW_SESSION_GET_LOCK(session) \ | |
133 | 139 | (FS_RAW_SESSION (session)->priv->mutex) |
134 | 140 | #else |
135 | #define FS_RAW_SESSION_LOCK(session) \ | |
141 | #define FS_RAW_SESSION_LOCK(session) \ | |
136 | 142 | g_mutex_lock ((session)->priv->mutex) |
137 | #define FS_RAW_SESSION_UNLOCK(session) \ | |
143 | #define FS_RAW_SESSION_UNLOCK(session) \ | |
138 | 144 | g_mutex_unlock ((session)->priv->mutex) |
139 | #define FS_RAW_SESSION_GET_LOCK(session) \ | |
145 | #define FS_RAW_SESSION_GET_LOCK(session) \ | |
140 | 146 | ((session)->priv->mutex) |
141 | 147 | #endif |
142 | 148 | |
164 | 170 | |
165 | 171 | static gchar **fs_raw_session_list_transmitters (FsSession *session); |
166 | 172 | |
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, | |
169 | 174 | const gchar *transmitter); |
170 | 175 | |
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 | ||
173 | 187 | |
174 | 188 | static void |
175 | 189 | fs_raw_session_class_init (FsRawSessionClass *klass) |
187 | 201 | session_class->new_stream = fs_raw_session_new_stream; |
188 | 202 | session_class->list_transmitters = fs_raw_session_list_transmitters; |
189 | 203 | session_class->get_stream_transmitter_type = |
190 | fs_raw_session_get_stream_transmitter_type; | |
204 | fs_raw_session_get_stream_transmitter_type; | |
191 | 205 | |
192 | 206 | g_object_class_override_property (gobject_class, |
193 | 207 | PROP_MEDIA_TYPE, "media-type"); |
197 | 211 | PROP_SINK_PAD, "sink-pad"); |
198 | 212 | |
199 | 213 | g_object_class_override_property (gobject_class, |
200 | PROP_CODEC_PREFERENCES, "codec-preferences"); | |
214 | PROP_CODEC_PREFERENCES, "codec-preferences"); | |
201 | 215 | g_object_class_override_property (gobject_class, |
202 | PROP_CODECS, "codecs"); | |
216 | PROP_CODECS, "codecs"); | |
203 | 217 | g_object_class_override_property (gobject_class, |
204 | PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config"); | |
218 | PROP_CODECS_WITHOUT_CONFIG, "codecs-without-config"); | |
205 | 219 | g_object_class_override_property (gobject_class, |
206 | PROP_CURRENT_SEND_CODEC, "current-send-codec"); | |
220 | PROP_CURRENT_SEND_CODEC, "current-send-codec"); | |
207 | 221 | g_object_class_override_property (gobject_class, |
208 | PROP_CODECS_READY, "codecs-ready"); | |
222 | PROP_CODECS_READY, "codecs-ready"); | |
209 | 223 | g_object_class_override_property (gobject_class, |
210 | PROP_TOS, "tos"); | |
224 | PROP_TOS, "tos"); | |
211 | 225 | |
212 | 226 | g_object_class_install_property (gobject_class, |
213 | 227 | PROP_CONFERENCE, |
260 | 274 | FsRawSession *self = FS_RAW_SESSION (object); |
261 | 275 | GstBin *conferencebin = NULL; |
262 | 276 | FsRawConference *conference = NULL; |
263 | GstElement *valve = NULL; | |
264 | GstElement *capsfilter = NULL; | |
277 | GstElement *send_valve = NULL; | |
278 | GstElement *send_capsfilter = NULL; | |
265 | 279 | GstElement *transform = NULL; |
266 | 280 | GstElement *send_tee = NULL; |
267 | 281 | GstElement *fakesink = NULL; |
284 | 298 | goto out; |
285 | 299 | |
286 | 300 | 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); | |
310 | 324 | } |
311 | 325 | |
312 | 326 | if (self->priv->stream) |
314 | 328 | if (handler_id > 0 && self->priv->stream) |
315 | 329 | g_signal_handler_disconnect (self->priv->stream, handler_id); |
316 | 330 | |
317 | raw_session_remove_stream(self, FS_STREAM (self->priv->stream)); | |
331 | fs_raw_session_remove_stream(self, FS_STREAM (self->priv->stream)); | |
318 | 332 | } |
319 | 333 | |
320 | 334 | GST_OBJECT_LOCK (conference); |
387 | 401 | |
388 | 402 | gst_object_unref (conference); |
389 | 403 | |
390 | out: | |
404 | out: | |
391 | 405 | |
392 | 406 | G_OBJECT_CLASS (fs_raw_session_parent_class)->dispose (object); |
393 | 407 | } |
410 | 424 | |
411 | 425 | static void |
412 | 426 | 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) | |
416 | 430 | { |
417 | 431 | FsRawSession *self = FS_RAW_SESSION (object); |
418 | 432 | FsRawConference *conference = fs_raw_session_get_conference (self, NULL); |
463 | 477 | |
464 | 478 | static void |
465 | 479 | 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) | |
469 | 483 | { |
470 | 484 | FsRawSession *self = FS_RAW_SESSION (object); |
471 | 485 | FsRawConference *conference = fs_raw_session_get_conference (self, NULL); |
514 | 528 | if (self->id == 0) |
515 | 529 | { |
516 | 530 | g_error ("You can not instantiate this element directly, you MUST" |
517 | " call fs_raw_session_new ()"); | |
531 | " call fs_raw_session_new ()"); | |
518 | 532 | return; |
519 | 533 | } |
520 | 534 | |
521 | 535 | g_assert (self->priv->conference); |
522 | 536 | |
523 | 537 | 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); | |
525 | 539 | g_free (tmp); |
526 | 540 | |
527 | if (!self->priv->capsfilter) | |
541 | if (!self->priv->send_capsfilter) | |
528 | 542 | { |
529 | 543 | self->priv->construction_error = g_error_new (FS_ERROR, |
530 | 544 | FS_ERROR_CONSTRUCTION, |
532 | 546 | return; |
533 | 547 | } |
534 | 548 | |
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)) | |
538 | 553 | { |
539 | 554 | self->priv->construction_error = g_error_new (FS_ERROR, |
540 | 555 | 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)) | |
547 | 562 | { |
548 | 563 | self->priv->construction_error = g_error_new (FS_ERROR, |
549 | 564 | FS_ERROR_CONSTRUCTION, |
572 | 587 | } |
573 | 588 | |
574 | 589 | if (!gst_element_link_pads (self->priv->transform_bin, "src", |
575 | self->priv->capsfilter, "sink")) | |
590 | self->priv->send_capsfilter, "sink")) | |
576 | 591 | { |
577 | 592 | self->priv->construction_error = g_error_new (FS_ERROR, |
578 | 593 | FS_ERROR_CONSTRUCTION, |
649 | 664 | return; |
650 | 665 | } |
651 | 666 | |
667 | g_object_set (self->priv->fakesink, | |
668 | "sync", FALSE, | |
669 | "async", FALSE, | |
670 | NULL); | |
671 | ||
652 | 672 | gst_object_ref_sink (self->priv->fakesink); |
653 | 673 | if (!gst_bin_add (GST_BIN (self->priv->conference), self->priv->fakesink)) |
654 | 674 | { |
686 | 706 | } |
687 | 707 | |
688 | 708 | 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); | |
690 | 710 | g_free (tmp); |
691 | 711 | |
692 | if (!self->priv->valve) | |
712 | if (!self->priv->send_valve) | |
693 | 713 | { |
694 | 714 | self->priv->construction_error = g_error_new (FS_ERROR, |
695 | 715 | FS_ERROR_CONSTRUCTION, "Could not make send valve"); |
696 | 716 | return; |
697 | 717 | } |
698 | 718 | |
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)) | |
702 | 722 | { |
703 | 723 | self->priv->construction_error = g_error_new (FS_ERROR, |
704 | 724 | 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)) | |
713 | 733 | { |
714 | 734 | self->priv->construction_error = g_error_new (FS_ERROR, |
715 | 735 | FS_ERROR_CONSTRUCTION, |
717 | 737 | return; |
718 | 738 | } |
719 | 739 | |
720 | if (!gst_element_link_pads (self->priv->valve, "src", | |
740 | if (!gst_element_link_pads (self->priv->send_valve, "src", | |
721 | 741 | self->priv->send_tee, "sink")) |
722 | 742 | { |
723 | 743 | self->priv->construction_error = g_error_new (FS_ERROR, |
726 | 746 | return; |
727 | 747 | } |
728 | 748 | |
729 | pad = gst_element_get_static_pad (self->priv->valve, "sink"); | |
749 | pad = gst_element_get_static_pad (self->priv->send_valve, "sink"); | |
730 | 750 | tmp = g_strdup_printf ("sink_%u", self->id); |
731 | 751 | self->priv->media_sink_pad = gst_ghost_pad_new (tmp, pad); |
732 | 752 | g_free (tmp); |
799 | 819 | |
800 | 820 | if (g_list_length (codecs) == 2) |
801 | 821 | codec = codecs->next->data; |
802 | else if (codecs && codecs->data) | |
822 | else | |
803 | 823 | codec = codecs->data; |
804 | 824 | |
805 | 825 | GST_OBJECT_LOCK (conference); |
826 | 846 | goto error; |
827 | 847 | |
828 | 848 | 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); | |
831 | 851 | gst_caps_unref (caps); |
832 | 852 | |
833 | 853 | if (!gst_element_link_pads (transform, "src", |
834 | self->priv->capsfilter, "sink")) | |
854 | self->priv->send_capsfilter, "sink")) | |
835 | 855 | goto error; |
836 | 856 | |
837 | 857 | if (!gst_element_sync_state_with_parent (transform)) |
859 | 879 | fs_codec_destroy (self->priv->send_codec); |
860 | 880 | |
861 | 881 | 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); | |
862 | 897 | } |
863 | 898 | |
864 | 899 | GST_OBJECT_UNLOCK (conference); |
899 | 934 | } |
900 | 935 | |
901 | 936 | void |
902 | raw_session_remove_stream (FsRawSession *self, | |
903 | FsStream *stream) | |
937 | fs_raw_session_remove_stream (FsRawSession *self, | |
938 | FsStream *stream) | |
904 | 939 | { |
905 | 940 | FsRawConference *conference = fs_raw_session_get_conference (self, NULL); |
906 | 941 | FsTransmitter *transmitter = NULL; |
910 | 945 | if (!conference) |
911 | 946 | return; |
912 | 947 | |
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); | |
914 | 949 | |
915 | 950 | GST_OBJECT_LOCK (conference); |
916 | 951 | if (self->priv->stream == (FsRawStream *) stream) |
917 | 952 | { |
918 | 953 | 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; | |
924 | 961 | g_object_get (transmitter, |
925 | 962 | "gst-src", &src, |
926 | 963 | "gst-sink", &sink, |
927 | 964 | NULL); |
928 | 965 | |
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 | ||
929 | 976 | gst_element_set_locked_state (src, TRUE); |
930 | 977 | gst_element_set_state (src, GST_STATE_NULL); |
931 | 978 | gst_bin_remove (GST_BIN (conference), src); |
936 | 983 | gst_element_set_state (sink, GST_STATE_NULL); |
937 | 984 | gst_bin_remove (GST_BIN (conference), sink); |
938 | 985 | } |
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 | ||
939 | 1020 | |
940 | 1021 | gst_object_unref (src); |
941 | 1022 | gst_object_unref (sink); |
945 | 1026 | |
946 | 1027 | static gboolean |
947 | 1028 | _add_transmitter_sink (FsRawSession *self, |
948 | GstElement *transmitter_sink, | |
949 | GError **error) | |
1029 | GstElement *transmitter_sink, | |
1030 | GError **error) | |
950 | 1031 | { |
951 | 1032 | if (!transmitter_sink) |
952 | 1033 | { |
973 | 1054 | goto error; |
974 | 1055 | } |
975 | 1056 | |
976 | if (!gst_element_link (self->priv->capsfilter, transmitter_sink)) | |
1057 | if (!gst_element_link (self->priv->send_capsfilter, transmitter_sink)) | |
977 | 1058 | { |
978 | 1059 | g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, |
979 | 1060 | "Could not link the capsfilter and transmitter's" |
981 | 1062 | goto error; |
982 | 1063 | } |
983 | 1064 | |
984 | self->priv->transmitter_linked = TRUE; | |
985 | ||
986 | 1065 | return TRUE; |
987 | 1066 | |
988 | 1067 | error: |
993 | 1072 | fs_raw_session_update_direction (FsRawSession *self, |
994 | 1073 | FsStreamDirection direction) |
995 | 1074 | { |
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 | ||
996 | 1090 | /* Don't start sending before we have codecs */ |
997 | 1091 | if (!self->priv->codecs) |
998 | return; | |
1092 | { | |
1093 | GST_OBJECT_UNLOCK (conference); | |
1094 | goto out; | |
1095 | } | |
999 | 1096 | |
1000 | 1097 | if (direction & FS_DIRECTION_SEND && !self->priv->transmitter_linked) |
1001 | 1098 | { |
1002 | 1099 | 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); | |
1015 | 1102 | |
1016 | 1103 | g_object_get (self->priv->transmitter, "gst-sink", &transmitter_sink, NULL); |
1017 | 1104 | |
1020 | 1107 | fs_session_emit_error (FS_SESSION (self), error->code, error->message, |
1021 | 1108 | "Unable to add transmitter sink"); |
1022 | 1109 | g_clear_error (&error); |
1023 | gst_object_unref (conference); | |
1024 | return; | |
1110 | goto out; | |
1025 | 1111 | } |
1026 | 1112 | |
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); | |
1029 | 1129 | |
1030 | 1130 | 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); | |
1032 | 1132 | 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); | |
1034 | 1137 | } |
1035 | 1138 | |
1036 | 1139 | /** |
1049 | 1152 | */ |
1050 | 1153 | static FsStream * |
1051 | 1154 | 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) | |
1058 | 1161 | { |
1059 | 1162 | FsRawSession *self = FS_RAW_SESSION (session); |
1060 | FsRawParticipant *rawparticipant = NULL; | |
1061 | 1163 | FsStream *new_stream = NULL; |
1062 | 1164 | FsRawConference *conference; |
1063 | FsTransmitter *fstransmitter = NULL; | |
1064 | 1165 | FsStreamTransmitter *stream_transmitter = NULL; |
1065 | GstElement *transmitter_sink = NULL; | |
1066 | GstElement *transmitter_src = NULL; | |
1067 | GstPad *transmitter_pad; | |
1068 | 1166 | |
1069 | 1167 | if (!FS_IS_RAW_PARTICIPANT (participant)) |
1070 | 1168 | { |
1082 | 1180 | goto already_have_stream; |
1083 | 1181 | GST_OBJECT_UNLOCK (conference); |
1084 | 1182 | |
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); | |
1095 | 1185 | 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)); | |
1138 | 1192 | |
1139 | 1193 | if (new_stream) |
1140 | 1194 | { |
1141 | 1195 | g_signal_connect_object (new_stream, "notify::remote-codecs", |
1142 | 1196 | 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 | } | |
1151 | 1197 | |
1152 | 1198 | GST_OBJECT_LOCK (conference); |
1153 | 1199 | if (self->priv->stream) |
1156 | 1202 | } |
1157 | 1203 | self->priv->stream = (FsRawStream *) new_stream; |
1158 | 1204 | |
1159 | if (self->priv->tos) | |
1160 | g_object_set (fstransmitter, "tos", self->priv->tos, NULL); | |
1161 | ||
1162 | self->priv->transmitter = fstransmitter; | |
1163 | ||
1164 | 1205 | 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 | } | |
1184 | 1207 | |
1185 | 1208 | done: |
1186 | 1209 | gst_object_unref (conference); |
1191 | 1214 | g_set_error (error, FS_ERROR, FS_ERROR_ALREADY_EXISTS, |
1192 | 1215 | "There already is a stream in this session"); |
1193 | 1216 | 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; | |
1194 | 1227 | } |
1195 | 1228 | |
1196 | 1229 | FsRawSession * |
1243 | 1276 | g_object_unref (fstransmitter); |
1244 | 1277 | return transmitter_type; |
1245 | 1278 | } |
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 | } |
82 | 82 | guint id, |
83 | 83 | GError **error); |
84 | 84 | |
85 | void raw_session_remove_stream (FsRawSession *self, | |
85 | void fs_raw_session_remove_stream (FsRawSession *self, | |
86 | 86 | FsStream *stream); |
87 | 87 | |
88 | 88 | void fs_raw_session_update_direction (FsRawSession *self, |
75 | 75 | PROP_CONFERENCE, |
76 | 76 | PROP_STREAM_TRANSMITTER, |
77 | 77 | PROP_REMOTE_CODECS, |
78 | PROP_TRANSMITTER_PAD, | |
79 | 78 | }; |
80 | 79 | |
81 | 80 | |
87 | 86 | FsRawParticipant *participant; |
88 | 87 | FsStreamDirection direction; |
89 | 88 | FsStreamTransmitter *stream_transmitter; |
90 | GstElement *capsfilter; | |
91 | GstElement *recv_valve; | |
92 | GstPad *transmitter_pad; | |
93 | GstPad *src_pad; | |
94 | 89 | |
95 | 90 | GList *remote_codecs; |
96 | ||
97 | gulong blocking_id; | |
98 | 91 | |
99 | 92 | GError *construction_error; |
100 | 93 | |
103 | 96 | gulong new_local_candidate_handler_id; |
104 | 97 | gulong error_handler_id; |
105 | 98 | gulong state_changed_handler_id; |
99 | ||
100 | stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb; | |
101 | gpointer user_data; | |
106 | 102 | |
107 | 103 | GMutex *mutex; /* protects the conference */ |
108 | 104 | |
229 | 225 | FS_TYPE_RAW_CONFERENCE, |
230 | 226 | G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
231 | 227 | |
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 | ||
240 | 228 | /** |
241 | 229 | * FsRawStream:stream-transmitter: |
242 | 230 | * |
306 | 294 | if (!conference) |
307 | 295 | return; |
308 | 296 | |
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 | } | |
349 | 297 | |
350 | 298 | st = self->priv->stream_transmitter; |
351 | 299 | self->priv->stream_transmitter = NULL; |
375 | 323 | |
376 | 324 | if (self->priv->session) |
377 | 325 | { |
378 | raw_session_remove_stream (self->priv->session, (FsStream *)self); | |
326 | fs_raw_session_remove_stream (self->priv->session, (FsStream *)self); | |
379 | 327 | |
380 | 328 | g_object_unref (self->priv->session); |
381 | 329 | self->priv->session = NULL; |
507 | 455 | case PROP_DIRECTION: |
508 | 456 | if (g_value_get_flags (value) != self->priv->direction) |
509 | 457 | { |
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) | |
516 | 469 | { |
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); | |
519 | 473 | } |
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); | |
544 | 477 | } |
545 | 478 | break; |
546 | 479 | case PROP_CONFERENCE: |
549 | 482 | case PROP_STREAM_TRANSMITTER: |
550 | 483 | self->priv->stream_transmitter = g_value_get_object (value); |
551 | 484 | break; |
552 | case PROP_TRANSMITTER_PAD: | |
553 | self->priv->transmitter_pad = GST_PAD (g_value_dup_object (value)); | |
554 | break; | |
555 | 485 | default: |
556 | 486 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
557 | 487 | break; |
564 | 494 | } |
565 | 495 | } |
566 | 496 | |
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 | ||
662 | 497 | static void |
663 | 498 | fs_raw_stream_constructed (GObject *object) |
664 | 499 | { |
665 | 500 | FsRawStream *self = FS_RAW_STREAM_CAST (object); |
666 | GstPad *valve_sink_pad = NULL; | |
667 | GstPadLinkReturn linkret; | |
668 | gchar *tmp; | |
669 | 501 | |
670 | 502 | if (!self->priv->conference) { |
671 | 503 | self->priv->construction_error = g_error_new (FS_ERROR, |
672 | 504 | FS_ERROR_INVALID_ARGUMENTS, "A Stream needs a conference object"); |
673 | 505 | return; |
674 | 506 | } |
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); | |
768 | 507 | |
769 | 508 | if (!self->priv->stream_transmitter) { |
770 | 509 | self->priv->construction_error = g_error_new (FS_ERROR, |
812 | 551 | return; |
813 | 552 | } |
814 | 553 | |
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 | ||
819 | 554 | if (G_OBJECT_CLASS (fs_raw_stream_parent_class)->constructed) |
820 | 555 | G_OBJECT_CLASS (fs_raw_stream_parent_class)->constructed (object); |
821 | 556 | } |
1051 | 786 | GST_OBJECT_UNLOCK (conf); |
1052 | 787 | |
1053 | 788 | 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 | ||
1062 | 789 | g_object_notify (G_OBJECT (stream), "remote-codecs"); |
1063 | } | |
1064 | 790 | |
1065 | 791 | g_object_unref (session); |
1066 | 792 | g_object_unref (conf); |
1092 | 818 | FsStreamDirection direction, |
1093 | 819 | FsRawConference *conference, |
1094 | 820 | FsStreamTransmitter *stream_transmitter, |
1095 | GstPad *transmitter_pad, | |
821 | stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb, | |
822 | gpointer user_data, | |
1096 | 823 | GError **error) |
1097 | 824 | { |
1098 | 825 | FsRawStream *self; |
1107 | 834 | "direction", direction, |
1108 | 835 | "conference", conference, |
1109 | 836 | "stream-transmitter", stream_transmitter, |
1110 | "transmitter-pad", transmitter_pad, | |
1111 | 837 | NULL); |
1112 | 838 | |
1113 | 839 | if (!self) |
1123 | 849 | return NULL; |
1124 | 850 | } |
1125 | 851 | |
852 | self->priv->get_new_stream_transmitter_cb = get_new_stream_transmitter_cb; | |
853 | self->priv->user_data = user_data; | |
854 | ||
1126 | 855 | return self; |
1127 | 856 | } |
1128 | 857 |
74 | 74 | |
75 | 75 | GType fs_raw_stream_get_type (void); |
76 | 76 | |
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 | ||
77 | 82 | FsRawStream *fs_raw_stream_new (FsRawSession *session, |
78 | 83 | FsRawParticipant *participant, |
79 | 84 | FsStreamDirection direction, |
80 | 85 | FsRawConference *conference, |
81 | 86 | FsStreamTransmitter *stream_transmitter, |
82 | GstPad *transmitter_pad, | |
87 | stream_get_new_stream_transmitter_cb get_new_stream_transmitter_cb, | |
88 | gpointer user_data, | |
83 | 89 | GError **error); |
84 | 90 | |
85 | 91 |
165 | 165 | gchar *tmp; |
166 | 166 | gint tmp_size; |
167 | 167 | 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; | |
171 | 171 | |
172 | 172 | READ_CHECK (read_codec_blueprint_int |
173 | (in, size, &(codec_blueprint->codec->id))); | |
173 | (in, size, &(id))); | |
174 | 174 | READ_CHECK (read_codec_blueprint_string |
175 | (in, size, &(codec_blueprint->codec->encoding_name))); | |
175 | (in, size, &(encoding_name))); | |
176 | 176 | 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); | |
178 | 181 | READ_CHECK (read_codec_blueprint_uint |
179 | 182 | (in, size, &(codec_blueprint->codec->channels))); |
180 | ||
181 | 183 | |
182 | 184 | READ_CHECK (read_codec_blueprint_int (in, size, &tmp_size)); |
183 | 185 | for (i = 0; i < tmp_size; i++) { |
26 | 26 | #endif |
27 | 27 | |
28 | 28 | #include "fs-rtp-codec-negotiation.h" |
29 | ||
30 | #include <gst/farsight/fs-rtp.h> | |
29 | 31 | |
30 | 32 | #include <string.h> |
31 | 33 | |
798 | 800 | } |
799 | 801 | |
800 | 802 | 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 | |
801 | 821 | negotiate_stream_codec (CodecAssociation *old_ca, FsCodec *remote_codec, |
802 | 822 | gboolean multi_stream, FsCodec **nego_codec, FsCodec **nego_send_codec) |
803 | 823 | { |
825 | 845 | { |
826 | 846 | fs_codec_destroy (*nego_codec); |
827 | 847 | *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; | |
828 | 862 | } |
829 | 863 | } |
830 | 864 | } |
1368 | 1402 | |
1369 | 1403 | return NULL; |
1370 | 1404 | } |
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 | } |
30 | 30 | |
31 | 31 | /** |
32 | 32 | * 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 | |
33 | 37 | * @reserved: Marks a payload-type reserved at the users request |
34 | 38 | * @disable: means that its not a real association, just a spot thats disabled, |
35 | 39 | * its marks the PT of a remote codec that has been refused |
123 | 127 | guint *src_pad_count, guint *sink_pad_count, GError **error); |
124 | 128 | |
125 | 129 | |
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 | ||
126 | 140 | G_END_DECLS |
127 | 141 | |
128 | 142 | #endif /* __FS_RTP_CODEC_NEGOTIATION_H__ */ |
356 | 356 | static void |
357 | 357 | rtpbin_get_sdes (FsRtpConference *self, const gchar *prop, GValue *val) |
358 | 358 | { |
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); | |
376 | 366 | } |
377 | 367 | |
378 | 368 | static void |
418 | 408 | static void |
419 | 409 | rtpbin_set_sdes (FsRtpConference *self, const gchar *prop, const GValue *val) |
420 | 410 | { |
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); | |
436 | 416 | } |
437 | 417 | |
438 | 418 | static void |
906 | 886 | |
907 | 887 | for (item = codec->optional_params; |
908 | 888 | item; |
909 | item = g_list_next (item)) { | |
889 | item = g_list_next (item)) | |
890 | { | |
910 | 891 | FsCodecParameter *param = item->data; |
911 | 892 | gchar *lower_name = g_ascii_strdown (param->name, -1); |
912 | 893 | |
919 | 900 | g_free (lower_name); |
920 | 901 | } |
921 | 902 | |
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 | ||
922 | 928 | caps = gst_caps_new_full (structure, NULL); |
923 | 929 | |
924 | 930 | return caps; |
546 | 546 | { |
547 | 547 | codec_cap = (CodecCap *)(walk->data); |
548 | 548 | |
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); | |
552 | 550 | |
553 | 551 | for (i = 0; i < gst_caps_get_size (codec_cap->rtp_caps); i++) |
554 | 552 | { |
65 | 65 | #include <gst/rtp/gstrtcpbuffer.h> |
66 | 66 | |
67 | 67 | #include <gst/farsight/fs-transmitter.h> |
68 | #include "gst/farsight/fs-utils.h" | |
69 | #include <gst/farsight/fs-rtp.h> | |
68 | 70 | |
69 | 71 | #include "fs-rtp-stream.h" |
70 | 72 | #include "fs-rtp-participant.h" |
97 | 99 | PROP_CONFERENCE, |
98 | 100 | PROP_NO_RTCP_TIMEOUT, |
99 | 101 | PROP_SSRC, |
100 | PROP_TOS | |
102 | PROP_TOS, | |
103 | PROP_SEND_BITRATE, | |
104 | PROP_RTP_HEADER_EXTENSIONS, | |
105 | PROP_RTP_HEADER_EXTENSION_PREFERENCES | |
101 | 106 | }; |
102 | 107 | |
103 | 108 | #define DEFAULT_NO_RTCP_TIMEOUT (7000) |
110 | 115 | FsRtpConference *conference; |
111 | 116 | |
112 | 117 | GHashTable *transmitters; |
113 | ||
114 | GList *transmitters_add_sink; | |
115 | 118 | |
116 | 119 | /* We keep references to these elements |
117 | 120 | */ |
181 | 184 | /* These are protected by the session mutex */ |
182 | 185 | GList *codec_associations; |
183 | 186 | |
187 | GList *hdrext_negotiated; | |
188 | GList *hdrext_preferences; | |
189 | ||
184 | 190 | /* Protected by the session mutex */ |
185 | 191 | gint no_rtcp_timeout; |
186 | 192 | |
198 | 204 | |
199 | 205 | /* IP Type of Service, protext by session mutex */ |
200 | 206 | guint tos; |
207 | ||
208 | /* Protected by sessioin mutex */ | |
209 | guint send_bitrate; | |
201 | 210 | |
202 | 211 | /* Can only be used while using the lock */ |
203 | 212 | GStaticRWLock disposed_lock; |
297 | 306 | _discovery_pad_blocked_callback (GstPad *pad, gboolean blocked, |
298 | 307 | gpointer user_data); |
299 | 308 | |
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); | |
300 | 313 | |
301 | 314 | //static guint signals[LAST_SIGNAL] = { 0 }; |
302 | 315 | |
370 | 383 | " (defaults to a random value)", |
371 | 384 | 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
372 | 385 | |
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 | ||
373 | 411 | gobject_class->dispose = fs_rtp_session_dispose; |
374 | 412 | gobject_class->finalize = fs_rtp_session_finalize; |
375 | 413 | |
408 | 446 | FsRtpSession *self = FS_RTP_SESSION (user_data); |
409 | 447 | FsTransmitter *transmitter = FS_TRANSMITTER (value); |
410 | 448 | GstElement *src, *sink; |
411 | GstObject *parent; | |
412 | 449 | |
413 | 450 | g_object_get (transmitter, "gst-sink", &sink, "gst-src", &src, NULL); |
414 | 451 | |
418 | 455 | |
419 | 456 | gst_element_set_locked_state (sink, TRUE); |
420 | 457 | 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); | |
426 | 459 | |
427 | 460 | gst_object_unref (src); |
428 | 461 | gst_object_unref (sink); |
663 | 696 | self->priv->transmitters = NULL; |
664 | 697 | } |
665 | 698 | |
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 | ||
671 | 699 | if (self->priv->free_substreams) |
672 | 700 | { |
673 | 701 | g_list_foreach (self->priv->free_substreams, (GFunc) g_object_unref, NULL); |
734 | 762 | |
735 | 763 | fs_codec_list_destroy (self->priv->codec_preferences); |
736 | 764 | 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); | |
737 | 768 | |
738 | 769 | if (self->priv->current_send_codec) |
739 | 770 | fs_codec_destroy (self->priv->current_send_codec); |
866 | 897 | g_value_set_uint (value, self->priv->tos); |
867 | 898 | FS_RTP_SESSION_UNLOCK (self); |
868 | 899 | 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; | |
869 | 910 | default: |
870 | 911 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
871 | 912 | break; |
921 | 962 | GUINT_TO_POINTER (self->priv->tos)); |
922 | 963 | FS_RTP_SESSION_UNLOCK (self); |
923 | 964 | 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; | |
924 | 976 | default: |
925 | 977 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
926 | 978 | break; |
1188 | 1240 | |
1189 | 1241 | gst_element_set_state (funnel, GST_STATE_PLAYING); |
1190 | 1242 | |
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 | ||
1191 | 1264 | /* Lets now create the RTP muxer */ |
1192 | 1265 | |
1193 | 1266 | tmp = g_strdup_printf ("send_rtp_muxer_%u", self->id); |
1379 | 1452 | } |
1380 | 1453 | |
1381 | 1454 | 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 | ||
1404 | 1455 | |
1405 | 1456 | if (!fs_rtp_session_update_codecs (self, NULL, NULL, |
1406 | 1457 | &self->priv->construction_error)) |
1697 | 1748 | GError **error) |
1698 | 1749 | { |
1699 | 1750 | FsRtpSession *self = FS_RTP_SESSION (session); |
1700 | gboolean ret = TRUE; | |
1751 | gboolean ret; | |
1701 | 1752 | |
1702 | 1753 | if (fs_rtp_session_has_disposed_enter (self, error)) |
1703 | 1754 | return FALSE; |
1719 | 1770 | { |
1720 | 1771 | g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS, |
1721 | 1772 | "The passed codec is not part of the list of codecs"); |
1773 | ret = FALSE; | |
1722 | 1774 | } |
1723 | 1775 | |
1724 | 1776 | FS_RTP_SESSION_UNLOCK (self); |
1965 | 2017 | { |
1966 | 2018 | FsTransmitter *transmitter; |
1967 | 2019 | GstElement *src = NULL; |
1968 | gboolean sink_add_later = FALSE; | |
1969 | 2020 | guint tos; |
1970 | 2021 | |
1971 | 2022 | FS_RTP_SESSION_LOCK (self); |
1990 | 2041 | g_signal_connect (transmitter, "get-recvonly-filter", |
1991 | 2042 | G_CALLBACK (_get_recvonly_filter), NULL); |
1992 | 2043 | |
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; | |
2002 | 2046 | |
2003 | 2047 | g_object_get (transmitter, "gst-src", &src, NULL); |
2004 | 2048 | |
2033 | 2077 | |
2034 | 2078 | g_object_ref (transmitter); |
2035 | 2079 | |
2036 | if (sink_add_later) | |
2037 | self->priv->transmitters_add_sink = g_list_prepend ( | |
2038 | self->priv->transmitters_add_sink, g_object_ref (transmitter)); | |
2039 | 2080 | g_hash_table_insert (self->priv->transmitters, g_strdup (transmitter_name), |
2040 | 2081 | transmitter); |
2041 | 2082 | FS_RTP_SESSION_UNLOCK (self); |
2262 | 2303 | * @remote_codecs: The #GList of remote codecs to use for that stream |
2263 | 2304 | * @has_remotes: Set to %TRUE if at least one stream has remote codecs |
2264 | 2305 | * set to %FALSE otherwise |
2306 | * @is_new: Set to %TRUE if the codecs associations have changed | |
2265 | 2307 | * |
2266 | 2308 | * Negotiates the codecs using the current (stored) codecs |
2267 | 2309 | * and the remote codecs from each stream. |
2268 | 2310 | * If a stream is specified, it will use the specified remote codecs |
2269 | 2311 | * instead of the ones currently in the stream |
2270 | 2312 | * |
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 | |
2272 | 2315 | */ |
2273 | 2316 | |
2274 | static GList * | |
2317 | static gboolean | |
2275 | 2318 | fs_rtp_session_negotiate_codecs_locked (FsRtpSession *session, |
2276 | 2319 | FsRtpStream *stream, |
2277 | 2320 | GList *remote_codecs, |
2278 | 2321 | gboolean *has_remotes, |
2322 | gboolean *is_new, | |
2279 | 2323 | GError **error) |
2280 | 2324 | { |
2281 | 2325 | gint streams_with_codecs = 0; |
2282 | 2326 | gboolean has_many_streams = FALSE; |
2283 | 2327 | GList *new_negotiated_codec_associations = NULL; |
2284 | 2328 | GList *item; |
2329 | guint8 hdrext_used_ids[8]; | |
2330 | GList *new_hdrexts = NULL; | |
2285 | 2331 | |
2286 | 2332 | *has_remotes = FALSE; |
2287 | 2333 | |
2315 | 2361 | goto error; |
2316 | 2362 | } |
2317 | 2363 | |
2364 | new_hdrexts = create_local_header_extensions ( | |
2365 | session->priv->hdrext_negotiated, session->priv->hdrext_preferences, | |
2366 | hdrext_used_ids); | |
2367 | ||
2318 | 2368 | for (item = g_list_first (session->priv->streams); |
2319 | 2369 | item; |
2320 | 2370 | item = g_list_next (item)) |
2341 | 2391 | |
2342 | 2392 | if (!new_negotiated_codec_associations) |
2343 | 2393 | break; |
2394 | ||
2395 | new_hdrexts = negotiate_stream_header_extensions (new_hdrexts, | |
2396 | mystream->hdrext, !has_many_streams, hdrext_used_ids); | |
2344 | 2397 | } |
2345 | 2398 | } |
2346 | 2399 | |
2360 | 2413 | fs_rtp_special_sources_negotiation_filter ( |
2361 | 2414 | new_negotiated_codec_associations); |
2362 | 2415 | |
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; | |
2364 | 2429 | |
2365 | 2430 | error: |
2366 | 2431 | |
2367 | return NULL; | |
2432 | fs_rtp_header_extension_list_destroy (new_hdrexts); | |
2433 | ||
2434 | return FALSE; | |
2368 | 2435 | } |
2369 | 2436 | |
2370 | 2437 | |
2391 | 2458 | GList *remote_codecs, |
2392 | 2459 | GError **error) |
2393 | 2460 | { |
2394 | GList *new_negotiated_codec_associations = NULL; | |
2395 | 2461 | gboolean is_new = TRUE; |
2396 | GList *old_negotiated_codec_associations; | |
2397 | 2462 | gboolean has_remotes = FALSE; |
2398 | 2463 | |
2399 | 2464 | FS_RTP_SESSION_LOCK (session); |
2400 | 2465 | |
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)) | |
2408 | 2468 | { |
2409 | 2469 | FS_RTP_SESSION_UNLOCK (session); |
2410 | 2470 | 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); | |
2422 | 2471 | } |
2423 | 2472 | |
2424 | 2473 | fs_rtp_session_distribute_recv_codecs_locked (session, stream, remote_codecs); |
2483 | 2532 | } |
2484 | 2533 | |
2485 | 2534 | 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 | |
2486 | 2584 | _substream_unlinked (FsRtpSubStream *substream, gpointer user_data) |
2487 | 2585 | { |
2488 | 2586 | FsRtpSession *self = FS_RTP_SESSION (user_data); |
2489 | 2587 | |
2490 | ||
2491 | 2588 | if (fs_rtp_session_has_disposed_enter (self, NULL)) |
2492 | 2589 | return; |
2590 | ||
2591 | fs_rtp_session_update_minimum_rtcp_interval (self, substream); | |
2493 | 2592 | |
2494 | 2593 | FS_RTP_SESSION_LOCK (self); |
2495 | 2594 | |
2506 | 2605 | { |
2507 | 2606 | FS_RTP_SESSION_UNLOCK (self); |
2508 | 2607 | } |
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); | |
2509 | 2619 | |
2510 | 2620 | fs_rtp_session_has_disposed_exit (self); |
2511 | 2621 | } |
2563 | 2673 | |
2564 | 2674 | g_signal_connect_object (substream, "unlinked", |
2565 | 2675 | G_CALLBACK (_substream_unlinked), session, 0); |
2676 | ||
2677 | g_signal_connect_object (substream, "codec-changed", | |
2678 | G_CALLBACK (_substream_codec_changed), session, 0); | |
2566 | 2679 | |
2567 | 2680 | /* Lets find the FsRtpStream for this substream, if no Stream claims it |
2568 | 2681 | * then we just store it |
3081 | 3194 | return FALSE; |
3082 | 3195 | } |
3083 | 3196 | |
3197 | /** | |
3198 | * @codec: The currently selected codec for sending (but not the send_codec) | |
3199 | */ | |
3084 | 3200 | |
3085 | 3201 | static gboolean |
3086 | 3202 | fs_rtp_session_remove_send_codec_bin (FsRtpSession *self, |
3087 | FsCodec *send_codec, | |
3203 | FsCodec *codec, | |
3088 | 3204 | GstElement *send_codecbin, |
3089 | 3205 | gboolean error_emit) |
3090 | 3206 | { |
3149 | 3265 | self->priv->extra_send_capsfilters); |
3150 | 3266 | } |
3151 | 3267 | |
3152 | if (send_codec) | |
3268 | if (codec) | |
3153 | 3269 | fs_rtp_special_sources_remove ( |
3154 | 3270 | &self->priv->extra_sources, |
3155 | 3271 | &self->priv->codec_associations, |
3156 | 3272 | FS_RTP_SESSION_GET_LOCK (self), |
3157 | send_codec); | |
3273 | codec); | |
3158 | 3274 | |
3159 | 3275 | return TRUE; |
3160 | 3276 | } |
3186 | 3302 | GstIterator *iter; |
3187 | 3303 | GValue link_rv = {0}; |
3188 | 3304 | struct link_data data; |
3189 | GList *item; | |
3190 | 3305 | FsCodec *send_codec_copy = fs_codec_copy (ca->send_codec); |
3191 | 3306 | FsCodec *codec_copy = fs_codec_copy (ca->codec); |
3192 | 3307 | |
3200 | 3315 | g_free (name); |
3201 | 3316 | |
3202 | 3317 | sendcaps = fs_codec_to_gst_caps (ca->send_codec); |
3318 | ||
3319 | if (codecbin) | |
3320 | codecbin_set_bitrate (codecbin, session->priv->send_bitrate); | |
3203 | 3321 | |
3204 | 3322 | FS_RTP_SESSION_UNLOCK (session); |
3205 | 3323 | |
3302 | 3420 | |
3303 | 3421 | |
3304 | 3422 | 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); | |
3328 | 3426 | |
3329 | 3427 | if (session->priv->streams_sending) |
3330 | 3428 | g_object_set (session->priv->media_sink_valve, "drop", FALSE, NULL); |
3361 | 3459 | fs_codec_destroy (codec_copy); |
3362 | 3460 | fs_codec_destroy (send_codec_copy); |
3363 | 3461 | return NULL; |
3364 | ||
3365 | error_locked: | |
3366 | ||
3367 | FS_RTP_SESSION_UNLOCK (session); | |
3368 | goto error; | |
3369 | 3462 | } |
3370 | 3463 | |
3371 | 3464 | static void |
3427 | 3520 | &self->priv->extra_sources, |
3428 | 3521 | &self->priv->codec_associations, |
3429 | 3522 | FS_RTP_SESSION_GET_LOCK (self), |
3430 | send_codec_copy); | |
3523 | codec_copy); | |
3431 | 3524 | goto skip_main_codec; |
3432 | 3525 | } |
3433 | 3526 | |
3472 | 3565 | &self->priv->extra_sources, |
3473 | 3566 | &self->priv->codec_associations, |
3474 | 3567 | FS_RTP_SESSION_GET_LOCK (self), |
3475 | send_codec_copy, | |
3568 | codec_copy, | |
3476 | 3569 | GST_ELEMENT (self->priv->conference), |
3477 | 3570 | self->priv->rtpmuxer); |
3478 | 3571 | |
4407 | 4500 | |
4408 | 4501 | gst_element_send_event (session->priv->rtpmuxer, |
4409 | 4502 | 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))); | |
4411 | 4506 | |
4412 | 4507 | fs_rtp_session_has_disposed_exit (session); |
4413 | 4508 | } |
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 | } |
357 | 357 | * @negotiated_codec_associations: A pointer to the #GList of current negotiated |
358 | 358 | * #CodecAssociation |
359 | 359 | * @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 | |
361 | 362 | * |
362 | 363 | * This function removes any special source that are not compatible with the |
363 | 364 | * currently selected send codec. |
369 | 370 | GList **extra_sources, |
370 | 371 | GList **negotiated_codec_associations, |
371 | 372 | GMutex *mutex, |
372 | FsCodec *send_codec) | |
373 | FsCodec *selected_codec) | |
373 | 374 | { |
374 | 375 | GList *klass_item = NULL; |
375 | 376 | gboolean changed = FALSE; |
400 | 401 | if (obj_item) |
401 | 402 | { |
402 | 403 | FsCodec *telephony_codec = fs_rtp_special_source_class_get_codec (klass, |
403 | *negotiated_codec_associations, send_codec); | |
404 | *negotiated_codec_associations, selected_codec); | |
404 | 405 | |
405 | 406 | if (!telephony_codec || !fs_codec_are_equal (telephony_codec, obj->codec)) |
406 | 407 | { |
434 | 435 | * @negotiated_codec_associations: A pointer to the #GList of current negotiated |
435 | 436 | * #CodecAssociation |
436 | 437 | * @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) | |
438 | 440 | * @bin: The #GstBin to add the stuff to |
439 | 441 | * @rtpmuxer: The rtpmux element |
440 | 442 | * |
447 | 449 | GList **extra_sources, |
448 | 450 | GList **negotiated_codec_associations, |
449 | 451 | GMutex *mutex, |
450 | FsCodec *send_codec, | |
452 | FsCodec *selected_codec, | |
451 | 453 | GstElement *bin, |
452 | 454 | GstElement *rtpmuxer) |
453 | 455 | { |
478 | 480 | |
479 | 481 | if (!obj_item && |
480 | 482 | fs_rtp_special_source_class_get_codec (klass, |
481 | *negotiated_codec_associations, send_codec)) | |
483 | *negotiated_codec_associations, selected_codec)) | |
482 | 484 | { |
483 | 485 | g_mutex_unlock (mutex); |
484 | 486 | obj = fs_rtp_special_source_new (klass, negotiated_codec_associations, |
485 | mutex, send_codec, bin, rtpmuxer); | |
487 | mutex, selected_codec, bin, rtpmuxer); | |
486 | 488 | if (!obj) |
487 | 489 | { |
488 | 490 | GST_WARNING ("Failed to make new special source"); |
118 | 118 | GList **current_extra_sources, |
119 | 119 | GList **negotiated_codec_associations, |
120 | 120 | GMutex *mutex, |
121 | FsCodec *send_codec); | |
121 | FsCodec *selected_codec); | |
122 | 122 | |
123 | 123 | gboolean |
124 | 124 | fs_rtp_special_sources_create ( |
125 | 125 | GList **extra_sources, |
126 | 126 | GList **negotiated_codec_associations, |
127 | 127 | GMutex *mutex, |
128 | FsCodec *send_codec, | |
128 | FsCodec *selected_codec, | |
129 | 129 | GstElement *bin, |
130 | 130 | GstElement *rtpmuxer); |
131 | 131 |
37 | 37 | #include "fs-rtp-stream.h" |
38 | 38 | |
39 | 39 | #include <gst/gst.h> |
40 | ||
41 | #include <gst/farsight/fs-rtp.h> | |
40 | 42 | |
41 | 43 | #include "fs-rtp-marshal.h" |
42 | 44 | |
60 | 62 | PROP_DIRECTION, |
61 | 63 | PROP_PARTICIPANT, |
62 | 64 | PROP_SESSION, |
63 | PROP_STREAM_TRANSMITTER | |
65 | PROP_STREAM_TRANSMITTER, | |
66 | PROP_RTP_HEADER_EXTENSIONS | |
64 | 67 | }; |
65 | 68 | |
66 | 69 | struct _FsRtpStreamPrivate |
207 | 210 | FS_TYPE_STREAM_TRANSMITTER, |
208 | 211 | G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); |
209 | 212 | |
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 | ||
210 | 222 | } |
211 | 223 | |
212 | 224 | static void |
417 | 429 | FS_RTP_SESSION_UNLOCK (session); |
418 | 430 | } |
419 | 431 | 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; | |
420 | 437 | default: |
421 | 438 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
422 | 439 | break; |
488 | 505 | g_list_foreach (copy, (GFunc) g_object_unref, NULL); |
489 | 506 | g_list_free (copy); |
490 | 507 | 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 | } | |
491 | 526 | } |
492 | 527 | break; |
493 | 528 | default: |
73 | 73 | GList *remote_codecs; |
74 | 74 | GList *negotiated_codecs; |
75 | 75 | |
76 | /* Same as codecs, hold FsRtpSession lock and modify by | |
77 | * setting the property | |
78 | */ | |
79 | GList *hdrext; | |
80 | ||
76 | 81 | /* Dont modify, call add_substream() */ |
77 | 82 | GList *substreams; |
78 | 83 |
12 | 12 | fs-plugin.h \ |
13 | 13 | fs-element-added-notifier.h \ |
14 | 14 | fs-interfaces.h \ |
15 | fs-utils.h | |
15 | fs-utils.h \ | |
16 | fs-rtp.h | |
16 | 17 | |
17 | 18 | nodist_libgstfarsightinclude_HEADERS = \ |
18 | 19 | fs-enum-types.h |
43 | 44 | fs-element-added-notifier.c \ |
44 | 45 | fs-interfaces.c \ |
45 | 46 | fs-utils.c \ |
47 | fs-rtp.c \ | |
46 | 48 | fs-private.h |
47 | 49 | |
48 | 50 | nodist_libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = \ |
114 | 114 | libgstfarsight_@GST_MAJORMINOR@_la-fs-plugin.lo \ |
115 | 115 | libgstfarsight_@GST_MAJORMINOR@_la-fs-element-added-notifier.lo \ |
116 | 116 | 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 | |
118 | 119 | nodist_libgstfarsight_@GST_MAJORMINOR@_la_OBJECTS = \ |
119 | 120 | libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo \ |
120 | 121 | libgstfarsight_@GST_MAJORMINOR@_la-fs-enumtypes.lo |
375 | 376 | fs-plugin.h \ |
376 | 377 | fs-element-added-notifier.h \ |
377 | 378 | fs-interfaces.h \ |
378 | fs-utils.h | |
379 | fs-utils.h \ | |
380 | fs-rtp.h | |
379 | 381 | |
380 | 382 | nodist_libgstfarsightinclude_HEADERS = \ |
381 | 383 | fs-enum-types.h |
400 | 402 | fs-element-added-notifier.c \ |
401 | 403 | fs-interfaces.c \ |
402 | 404 | fs-utils.c \ |
405 | fs-rtp.c \ | |
403 | 406 | fs-private.h |
404 | 407 | |
405 | 408 | nodist_libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = \ |
520 | 523 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.Plo@am__quote@ |
521 | 524 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-participant.Plo@am__quote@ |
522 | 525 | @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@ | |
523 | 527 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-session.Plo@am__quote@ |
524 | 528 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-stream-transmitter.Plo@am__quote@ |
525 | 529 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstfarsight_@GST_MAJORMINOR@_la-fs-stream.Plo@am__quote@ |
653 | 657 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fs-utils.c' object='libgstfarsight_@GST_MAJORMINOR@_la-fs-utils.lo' libtool=yes @AMDEPBACKSLASH@ |
654 | 658 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
655 | 659 | @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 | |
656 | 668 | |
657 | 669 | libgstfarsight_@GST_MAJORMINOR@_la-fs-marshal.lo: fs-marshal.c |
658 | 670 | @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 |
99 | 99 | codec->encoding_name = g_strdup (encoding_name); |
100 | 100 | codec->media_type = media_type; |
101 | 101 | codec->clock_rate = clock_rate; |
102 | codec->ABI.ABI.minimum_reporting_interval = G_MAXUINT; | |
102 | 103 | |
103 | 104 | 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); | |
104 | 123 | } |
105 | 124 | |
106 | 125 | /** |
116 | 135 | return; |
117 | 136 | |
118 | 137 | 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); | |
131 | 146 | |
132 | 147 | g_slice_free (FsCodec, codec); |
133 | 148 | } |
145 | 160 | { |
146 | 161 | FsCodec *copy = NULL; |
147 | 162 | GList *lp; |
148 | FsCodecParameter *param; | |
149 | FsCodecParameter *param_copy; | |
150 | 163 | |
151 | 164 | if (codec == NULL) |
152 | 165 | return NULL; |
153 | 166 | |
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 | ||
159 | 170 | copy->channels = codec->channels; |
160 | 171 | copy->ABI.ABI.maxptime = codec->ABI.ABI.maxptime; |
161 | 172 | copy->ABI.ABI.ptime = codec->ABI.ABI.ptime; |
173 | copy->ABI.ABI.minimum_reporting_interval = | |
174 | codec->ABI.ABI.minimum_reporting_interval; | |
162 | 175 | |
163 | 176 | copy->encoding_name = g_strdup (codec->encoding_name); |
164 | 177 | |
165 | 178 | for (lp = codec->optional_params; lp; lp = g_list_next (lp)) |
166 | 179 | { |
180 | FsCodecParameter *param_copy; | |
181 | FsCodecParameter *param = lp->data;; | |
182 | ||
167 | 183 | param_copy = g_slice_new (FsCodecParameter); |
168 | param = (FsCodecParameter *) lp->data; | |
169 | 184 | param_copy->name = g_strdup (param->name); |
170 | 185 | param_copy->value = g_strdup (param->value); |
171 | 186 | /* prepend then reverse the list for efficiency */ |
174 | 189 | } |
175 | 190 | copy->optional_params = g_list_reverse (copy->optional_params); |
176 | 191 | |
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 | ||
177 | 208 | return copy; |
178 | 209 | } |
179 | 210 | |
242 | 273 | * [audio/codec2] |
243 | 274 | * one_param=QCIF |
244 | 275 | * another_param=WOW |
276 | * | |
277 | * [video/codec3] | |
278 | * wierd_param=42 | |
279 | * feedback:nack/pli=1 | |
280 | * feedback:tfrc= | |
245 | 281 | * ]| |
246 | 282 | * |
247 | 283 | * Return value: The #GList of #FsCodec or %NULL if the keyfile was empty |
257 | 293 | gsize groups_count = 0; |
258 | 294 | int i; |
259 | 295 | |
260 | g_assert (filename); | |
296 | g_return_val_if_fail (filename, NULL); | |
297 | g_return_val_if_fail (error == NULL || *error == NULL, NULL); | |
261 | 298 | |
262 | 299 | keyfile = g_key_file_new (); |
263 | 300 | |
272 | 309 | goto out; |
273 | 310 | |
274 | 311 | for (i=0; i < groups_count && groups[i]; i++) { |
275 | FsCodec *codec = g_slice_new0 (FsCodec); | |
312 | FsCodec *codec; | |
276 | 313 | gchar **keys = NULL; |
277 | 314 | gsize keys_count; |
278 | 315 | int j; |
279 | 316 | gchar *encoding_name = NULL; |
280 | 317 | gchar *next_tok = NULL; |
281 | ||
282 | codec->id = FS_CODEC_ID_ANY; | |
318 | FsMediaType media_type; | |
283 | 319 | |
284 | 320 | keys = g_key_file_get_keys (keyfile, groups[i], &keys_count, &gerror); |
285 | 321 | |
286 | 322 | if (!keys || gerror) { |
287 | if (gerror) { | |
323 | if (gerror) | |
288 | 324 | GST_WARNING ("Unable to read parameters for %s: %s\n", |
289 | 325 | groups[i], gerror->message); |
290 | ||
291 | } else { | |
326 | else | |
292 | 327 | GST_WARNING ("Unknown errors while reading parameters for %s", |
293 | 328 | groups[i]); |
294 | } | |
329 | ||
295 | 330 | g_clear_error (&gerror); |
296 | 331 | |
297 | 332 | goto next_codec; |
298 | 333 | } |
299 | 334 | |
300 | 335 | next_tok = strchr (groups[i], '/'); |
301 | if (!next_tok) { | |
336 | if (!next_tok) | |
337 | { | |
302 | 338 | GST_WARNING ("Invalid codec name: %s", groups[i]); |
303 | 339 | goto next_codec; |
304 | 340 | } |
305 | 341 | |
306 | 342 | if ((next_tok - groups[i]) == 5 /* strlen ("audio") */ && |
307 | 343 | !g_ascii_strncasecmp ("audio", groups[i], 5)) |
308 | codec->media_type = FS_MEDIA_TYPE_AUDIO; | |
344 | { | |
345 | media_type = FS_MEDIA_TYPE_AUDIO; | |
346 | } | |
309 | 347 | else if ((next_tok - groups[i]) == 5 /* strlen ("video") */ && |
310 | 348 | !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 | { | |
313 | 354 | GST_WARNING ("Invalid media type in codec name name %s", groups[i]); |
314 | 355 | goto next_codec; |
315 | 356 | } |
316 | 357 | |
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, | |
323 | 367 | 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); | |
331 | 374 | |
332 | 375 | for (j = 0; j < keys_count && keys[j]; j++) { |
333 | 376 | if (!g_ascii_strcasecmp ("clock-rate", keys[j])) { |
371 | 414 | codec->ABI.ABI.ptime = 0; |
372 | 415 | goto keyerror; |
373 | 416 | } |
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); | |
374 | 448 | } else { |
375 | 449 | FsCodecParameter *param = g_slice_new (FsCodecParameter); |
376 | 450 | |
378 | 452 | param->value = g_key_file_get_string (keyfile, groups[i], keys[j], |
379 | 453 | &gerror); |
380 | 454 | if (gerror) { |
381 | g_free (param->name); | |
382 | g_free (param->value); | |
383 | g_slice_free (FsCodecParameter, param); | |
455 | free_optional_parameter (param); | |
384 | 456 | goto keyerror; |
385 | 457 | } |
386 | 458 | |
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 | |
392 | 462 | codec->optional_params = g_list_append (codec->optional_params, |
393 | 463 | param); |
394 | } | |
395 | 464 | } |
396 | 465 | continue; |
397 | 466 | keyerror: |
403 | 472 | |
404 | 473 | codecs = g_list_append (codecs, codec); |
405 | 474 | |
475 | next_codec: | |
406 | 476 | g_strfreev (keys); |
407 | continue; | |
408 | next_codec: | |
409 | fs_codec_destroy (codec); | |
410 | g_strfreev (keys); | |
411 | ||
412 | 477 | } |
413 | 478 | |
414 | 479 | |
471 | 536 | if (codec->ABI.ABI.ptime) |
472 | 537 | g_string_append_printf (string, " ptime=%u", codec->ABI.ABI.ptime); |
473 | 538 | |
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 | ||
474 | 543 | for (item = codec->optional_params; |
475 | 544 | item; |
476 | 545 | item = g_list_next (item)) { |
478 | 547 | g_string_append_printf (string, " %s=%s", param->name, param->value); |
479 | 548 | } |
480 | 549 | |
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 | ||
481 | 558 | charstring = string->str; |
482 | 559 | g_string_free (string, FALSE); |
483 | 560 | |
485 | 562 | } |
486 | 563 | |
487 | 564 | |
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 | } | |
488 | 591 | |
489 | 592 | /* |
490 | 593 | * 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 | |
492 | 595 | */ |
493 | 596 | 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)) | |
495 | 599 | { |
496 | 600 | GList *item1; |
497 | 601 | |
506 | 610 | item2 = g_list_next (item2)) { |
507 | 611 | FsCodecParameter *param2 = item2->data; |
508 | 612 | |
509 | if (!g_ascii_strcasecmp (param1->name, param2->name) && | |
510 | !strcmp (param1->value, param2->value)) | |
613 | if (compare_params (param1, param2)) | |
511 | 614 | break; |
512 | 615 | } |
513 | 616 | if (!item2) |
545 | 648 | codec1->channels != codec2->channels || |
546 | 649 | codec1->ABI.ABI.maxptime != codec2->ABI.ABI.maxptime || |
547 | 650 | codec1->ABI.ABI.ptime != codec2->ABI.ABI.ptime || |
651 | codec1->ABI.ABI.minimum_reporting_interval != | |
652 | codec2->ABI.ABI.minimum_reporting_interval || | |
548 | 653 | codec1->encoding_name == NULL || |
549 | 654 | codec2->encoding_name == NULL || |
550 | 655 | g_ascii_strcasecmp (codec1->encoding_name, codec2->encoding_name)) |
554 | 659 | /* Is there a smarter way to compare to un-ordered linked lists |
555 | 660 | * to make sure they contain exactly the same elements?? |
556 | 661 | */ |
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)) | |
559 | 672 | return FALSE; |
560 | 673 | |
561 | 674 | return TRUE; |
593 | 706 | * fs_codec_add_optional_parameter: |
594 | 707 | * @codec: The #FsCodec to add the parameter to |
595 | 708 | * @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 | |
597 | 710 | * |
598 | 711 | * This function adds an new optional parameter to a #FsCodec |
599 | 712 | */ |
634 | 747 | if (!param) |
635 | 748 | return; |
636 | 749 | |
637 | g_free (param->name); | |
638 | g_free (param->value); | |
639 | g_slice_free (FsCodecParameter, param); | |
750 | free_optional_parameter (param); | |
640 | 751 | codec->optional_params = g_list_remove (codec->optional_params, param); |
641 | 752 | } |
642 | 753 | |
673 | 784 | |
674 | 785 | return NULL; |
675 | 786 | } |
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 | } |
33 | 33 | |
34 | 34 | typedef struct _FsCodec FsCodec; |
35 | 35 | typedef struct _FsCodecParameter FsCodecParameter; |
36 | typedef struct _FsFeedbackParameter FsFeedbackParameter; | |
36 | 37 | |
37 | 38 | #define FS_TYPE_CODEC \ |
38 | 39 | (fs_codec_get_type ()) |
82 | 83 | * @optional_params: key pairs of param name to param data |
83 | 84 | * @ptime: The preferred duration (in ms) of a packet |
84 | 85 | * @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). | |
85 | 89 | * |
86 | 90 | * This structure reprensents one codec that can be offered or received |
87 | 91 | */ |
99 | 103 | struct { |
100 | 104 | guint ptime; |
101 | 105 | guint maxptime; |
106 | guint minimum_reporting_interval; | |
107 | GList *feedback_params; | |
102 | 108 | } ABI; |
103 | 109 | gpointer _padding[4]; /* padding for binary-compatible |
104 | 110 | expansion*/ |
115 | 121 | struct _FsCodecParameter { |
116 | 122 | gchar *name; |
117 | 123 | 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; | |
118 | 138 | }; |
119 | 139 | |
120 | 140 | |
154 | 174 | |
155 | 175 | GList *fs_codec_list_from_keyfile (const gchar *filename, GError **error); |
156 | 176 | gchar *fs_codec_to_string (const FsCodec *codec); |
177 | const gchar *fs_media_type_to_string (FsMediaType media_type); | |
157 | 178 | |
158 | 179 | gboolean fs_codec_are_equal (const FsCodec *codec1, const FsCodec *codec2); |
159 | ||
160 | 180 | gboolean fs_codec_list_are_equal (GList *list1, GList *list2); |
161 | ||
162 | const gchar *fs_media_type_to_string (FsMediaType media_type); | |
163 | 181 | |
164 | 182 | void fs_codec_add_optional_parameter (FsCodec *codec, const gchar *name, |
165 | 183 | const gchar *value); |
166 | ||
167 | 184 | void fs_codec_remove_optional_parameter (FsCodec *codec, |
168 | 185 | FsCodecParameter *param); |
169 | ||
170 | 186 | FsCodecParameter *fs_codec_get_optional_parameter (FsCodec *codec, |
171 | 187 | 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); | |
172 | 195 | |
173 | 196 | G_END_DECLS |
174 | 197 |
26 | 26 | #endif |
27 | 27 | |
28 | 28 | #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 | |
29 | 43 | |
30 | 44 | #ifdef G_OS_UNIX |
31 | 45 | |
43 | 57 | #include <sys/socket.h> |
44 | 58 | #include <ifaddrs.h> |
45 | 59 | #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 | ||
61 | 60 | |
62 | 61 | /** |
63 | 62 | * 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__ */ |
26 | 26 | #include "fs-utils.h" |
27 | 27 | |
28 | 28 | #include <string.h> |
29 | ||
30 | #include "fs-rtp.h" | |
29 | 31 | |
30 | 32 | /** |
31 | 33 | * SECTION:fs-utils |
133 | 135 | return NULL; |
134 | 136 | } |
135 | 137 | } |
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 | } |
25 | 25 | #define __FS_UTILS_H__ |
26 | 26 | |
27 | 27 | #include <gst/gst.h> |
28 | ||
28 | 29 | #include <gst/farsight/fs-codec.h> |
29 | 30 | |
30 | 31 | G_BEGIN_DECLS |
33 | 34 | |
34 | 35 | GKeyFile *fs_utils_get_default_element_properties (GstElement *element); |
35 | 36 | |
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 | ||
36 | 42 | G_END_DECLS |
37 | 43 | |
38 | 44 | #endif /* __FS_UTILS_H__ */ |
25 | 25 | $(PYFARSIGHT_LIBS) \ |
26 | 26 | $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-@GST_MAJORMINOR@.la |
27 | 27 | |
28 | farsight_la_LDFLAGS = \ | |
29 | `python-config --libs` \ | |
30 | -module -avoid-version | |
28 | farsight_la_LDFLAGS = -module -avoid-version | |
31 | 29 | |
32 | 30 | pyfarsight.c: pyfarsight.override pyfarsight.defs |
33 | 31 | $(PYCODEGEN) \ |
353 | 353 | $(PYFARSIGHT_LIBS) \ |
354 | 354 | $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-@GST_MAJORMINOR@.la |
355 | 355 | |
356 | farsight_la_LDFLAGS = \ | |
357 | `python-config --libs` \ | |
358 | -module -avoid-version | |
359 | ||
356 | farsight_la_LDFLAGS = -module -avoid-version | |
360 | 357 | EXTRA_DIST = \ |
361 | 358 | pyfarsight.override \ |
362 | 359 | pyfarsight.defs \ |
614 | 614 | ) |
615 | 615 | ) |
616 | 616 | |
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 | ||
617 | 624 | |
618 | 625 | ;; -*- scheme -*- |
619 | 626 | ; object definitions ... |
82 | 82 | $(NICE_LIBS) |
83 | 83 | transmitter_rawudp_SOURCES = \ |
84 | 84 | check-threadsafe.h \ |
85 | testutils.c \ | |
86 | testutils.h \ | |
85 | 87 | transmitter/generic.c \ |
86 | 88 | transmitter/generic.h \ |
87 | 89 | transmitter/rawudp.c \ |
191 | 191 | $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ |
192 | 192 | $(transmitter_nice_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ |
193 | 193 | -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) \ | |
195 | 197 | transmitter_rawudp-rawudp.$(OBJEXT) \ |
196 | 198 | transmitter_rawudp-rawudp-upnp.$(OBJEXT) \ |
197 | 199 | transmitter_rawudp-stunalternd.$(OBJEXT) |
524 | 526 | |
525 | 527 | transmitter_rawudp_SOURCES = \ |
526 | 528 | check-threadsafe.h \ |
529 | testutils.c \ | |
530 | testutils.h \ | |
527 | 531 | transmitter/generic.c \ |
528 | 532 | transmitter/generic.h \ |
529 | 533 | transmitter/rawudp.c \ |
750 | 754 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-rawudp-upnp.Po@am__quote@ |
751 | 755 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_rawudp-rawudp.Po@am__quote@ |
752 | 756 | @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@ | |
753 | 758 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_shm-generic.Po@am__quote@ |
754 | 759 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transmitter_shm-shm.Po@am__quote@ |
755 | 760 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils_binadded-binadded.Po@am__quote@ |
1130 | 1135 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transmitter/nice.c' object='transmitter_nice-nice.obj' libtool=no @AMDEPBACKSLASH@ |
1131 | 1136 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
1132 | 1137 | @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` | |
1133 | 1154 | |
1134 | 1155 | transmitter_rawudp-generic.o: transmitter/generic.c |
1135 | 1156 | @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 |
22 | 22 | #endif |
23 | 23 | |
24 | 24 | #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" | |
26 | 27 | |
27 | 28 | #include "testutils.h" |
28 | 29 | |
94 | 95 | fs_codec_add_optional_parameter (codec, "aa2", "bb2"); |
95 | 96 | fs_codec_add_optional_parameter (codec, "aa3", "bb3"); |
96 | 97 | |
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 | ||
97 | 102 | codec->ABI.ABI.ptime = 12; |
98 | 103 | codec->ABI.ABI.maxptime = 12; |
99 | 104 | |
100 | 105 | return codec; |
101 | 106 | } |
102 | 107 | |
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 | ||
112 | 108 | GST_START_TEST (test_fscodec_are_equal_opt_params) |
113 | 109 | { |
114 | 110 | FsCodec *codec1; |
120 | 116 | fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE, |
121 | 117 | "Identical codecs (with params) not recognized"); |
122 | 118 | |
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, | |
125 | 120 | g_list_first (codec1->optional_params)->data); |
126 | ||
127 | 121 | fs_codec_add_optional_parameter (codec1, "aa1", "bb1"); |
128 | 122 | |
129 | 123 | fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE, |
130 | 124 | "Identical codecs (with params in different order 1) not recognized"); |
131 | 125 | |
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, | |
134 | 127 | g_list_first (codec1->optional_params)->data); |
135 | ||
136 | 128 | fs_codec_add_optional_parameter (codec1, "aa2", "bb2"); |
137 | 129 | |
138 | 130 | fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE, |
142 | 134 | |
143 | 135 | codec1 = init_codec_with_three_params (); |
144 | 136 | |
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, | |
147 | 138 | g_list_first (codec1->optional_params)->data); |
148 | 139 | |
149 | 140 | fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE, |
154 | 145 | fs_codec_destroy (codec1); |
155 | 146 | |
156 | 147 | 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, | |
159 | 149 | 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)); | |
160 | 204 | |
161 | 205 | fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE, |
162 | 206 | "Did not detect removal of last parameter of first codec"); |
225 | 269 | GList *item; |
226 | 270 | for(item = codecs; item ; item= item->next) |
227 | 271 | { |
228 | GST_DEBUG ("%s", fs_codec_to_string (item->data)); | |
272 | g_debug("%s", fs_codec_to_string (item->data)); | |
229 | 273 | } |
230 | 274 | } |
231 | 275 | #endif |
233 | 277 | codec = fs_codec_new (122, "TEST1", FS_MEDIA_TYPE_AUDIO, 8001); |
234 | 278 | codec->channels = 5; |
235 | 279 | 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", "", ""); | |
236 | 283 | comparison = g_list_append (comparison, codec); |
237 | 284 | |
238 | 285 | codec = fs_codec_new (123, "TEST2", FS_MEDIA_TYPE_VIDEO, 8002); |
262 | 309 | } |
263 | 310 | GST_END_TEST; |
264 | 311 | |
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 | ||
265 | 398 | static Suite * |
266 | 399 | fscodec_suite (void) |
267 | 400 | { |
273 | 406 | tcase_add_test (tc_chain, test_fscodec_new); |
274 | 407 | tcase_add_test (tc_chain, test_fscodec_are_equal); |
275 | 408 | tcase_add_test (tc_chain, test_fscodec_are_equal_opt_params); |
409 | tcase_add_test (tc_chain, test_fscodec_are_equal_feedback_params); | |
276 | 410 | tcase_add_test (tc_chain, test_fscodec_copy); |
277 | 411 | tcase_add_test (tc_chain, test_fscodec_null); |
278 | 412 | 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); | |
279 | 415 | |
280 | 416 | return s; |
281 | 417 | } |
2 | 2 | clock-rate=8001 |
3 | 3 | channels=5 |
4 | 4 | test3=test4 |
5 | feedback:aa/bb=cc | |
6 | feedback:dd/ee= | |
7 | feedback:ff= | |
5 | 8 | |
6 | 9 | [video/TEST2] |
7 | 10 | id=123 |
30 | 33 | adsas=11 |
31 | 34 | clock-rate=dsa |
32 | 35 | |
36 | [asass/] | |
37 | adsas=1as | |
38 | clock-rate=dsa | |
39 | ||
40 | [asass/:1] | |
41 | adsas=135 | |
42 | clock-rate=dsa | |
43 | ||
33 | 44 | [daasd/asdsa] |
34 | 45 | asdasd=11 |
35 | 46 | channels=1das |
36 | 47 | maxptime=532 |
37 | 48 | 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 |
24 | 24 | #include <gst/check/gstcheck.h> |
25 | 25 | #include <gst/farsight/fs-conference-iface.h> |
26 | 26 | #include <gst/farsight/fs-stream-transmitter.h> |
27 | #include <gst/farsight/fs-rtp.h> | |
27 | 28 | |
28 | 29 | #include "generic.h" |
29 | 30 | |
1125 | 1126 | codecs = g_list_append (NULL, fs_codec_copy (prefcodec)); |
1126 | 1127 | fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error)); |
1127 | 1128 | fail_unless (error == NULL); |
1129 | fs_codec_list_destroy (codecs); | |
1128 | 1130 | |
1129 | 1131 | g_object_get (dat->session, "codecs", &codecs, NULL); |
1130 | 1132 | fail_unless (g_list_length (codecs) == 1); |
1171 | 1173 | codecs = g_list_append (NULL, codec); |
1172 | 1174 | fail_unless (fs_stream_set_remote_codecs (stream, codecs, &error)); |
1173 | 1175 | fail_unless (error == NULL); |
1176 | fs_codec_list_destroy (codecs); | |
1174 | 1177 | |
1175 | 1178 | fail_if (gst_element_set_state (dat->pipeline, GST_STATE_NULL) != |
1176 | 1179 | GST_STATE_CHANGE_SUCCESS); |
1177 | 1180 | |
1181 | fs_codec_destroy (prefcodec); | |
1178 | 1182 | g_object_unref (stream); |
1179 | 1183 | g_object_unref (participant); |
1180 | 1184 | cleanup_simple_conference (dat); |
1883 | 1887 | } |
1884 | 1888 | GST_END_TEST; |
1885 | 1889 | |
1886 | ||
1887 | ||
1888 | 1890 | GST_START_TEST (test_rtpcodecs_nego_h263_2000) |
1889 | 1891 | { |
1890 | 1892 | struct SimpleTestConference *dat = NULL; |
1977 | 1979 | FsCodec *outcodec = NULL; |
1978 | 1980 | FsCodec *prefcodec = NULL; |
1979 | 1981 | FsCodec *outprefcodec = NULL; |
1982 | FsCodec *tmp_prefcodec, *tmp_outprefcodec; | |
1980 | 1983 | FsParticipant *participant; |
1981 | 1984 | |
1982 | 1985 | setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_VIDEO); |
2065 | 2068 | test_one_codec (dat->session, participant, prefcodec, outprefcodec, |
2066 | 2069 | codec, outcodec); |
2067 | 2070 | |
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 | ||
2068 | 2101 | fs_codec_destroy (outprefcodec); |
2069 | 2102 | fs_codec_destroy (prefcodec); |
2070 | 2103 | cleanup_codec_tests (dat, participant); |
2071 | 2104 | } |
2072 | 2105 | GST_END_TEST; |
2073 | 2106 | |
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 | ||
2074 | 2287 | static Suite * |
2075 | 2288 | fsrtpcodecs_suite (void) |
2076 | 2289 | { |
2078 | 2291 | TCase *tc_chain; |
2079 | 2292 | GLogLevelFlags fatal_mask; |
2080 | 2293 | |
2081 | ||
2082 | 2294 | fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK); |
2083 | 2295 | fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL; |
2084 | 2296 | g_log_set_always_fatal (fatal_mask); |
2152 | 2364 | tcase_add_test (tc_chain, test_rtpcodecs_nego_h264); |
2153 | 2365 | suite_add_tcase (s, tc_chain); |
2154 | 2366 | |
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 | ||
2155 | 2375 | return s; |
2156 | 2376 | } |
2157 | 2377 |
168 | 168 | other_st->dat->id, |
169 | 169 | other_st->target->id, |
170 | 170 | candidate->component_id); |
171 | ||
172 | if (other_st->stream == NULL) | |
173 | { | |
174 | TEST_UNLOCK (); | |
175 | return; | |
176 | } | |
171 | 177 | |
172 | 178 | candidates = g_list_prepend (NULL, candidate); |
173 | 179 | ret = fs_stream_set_remote_candidates (other_st->stream, candidates, &error); |
1368 | 1374 | return; |
1369 | 1375 | g_free (mcast_addr); |
1370 | 1376 | |
1371 | max_src_pads = 3; | |
1377 | max_src_pads = 3 * 2; /* x2 because of loopbacks causing fake conflicts */ | |
1372 | 1378 | nway_test (3, NULL, multicast_ssrc_init, "multicast", 0, NULL); |
1373 | 1379 | max_src_pads = 1; |
1374 | 1380 | } |
33 | 33 | #include "check-threadsafe.h" |
34 | 34 | #include "generic.h" |
35 | 35 | #include "transmitter/rawudp-upnp.h" |
36 | #include "testutils.h" | |
36 | 37 | |
37 | 38 | #include "stunalternd.h" |
38 | 39 | |
966 | 967 | suite_add_tcase (s, tc_chain); |
967 | 968 | |
968 | 969 | #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 | } | |
981 | 992 | #endif |
982 | 993 | |
983 | 994 | tc_chain = tcase_create ("rawudptransmitter-with-filter"); |
706 | 706 | g_object_set (elem, |
707 | 707 | "closefd", FALSE, |
708 | 708 | "sockfd", fd, |
709 | "auto-multicast", FALSE, | |
709 | 710 | 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); | |
714 | 711 | |
715 | 712 | if (!gst_bin_add (bin, elem)) { |
716 | 713 | g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION, |
1133 | 1130 | |
1134 | 1131 | gst_element_send_event (udpsock->udpsink, |
1135 | 1132 | 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))); | |
1137 | 1136 | } |
1138 | 1137 | } |
1139 | 1138 |
423 | 423 | gststream = self->priv->gststream; |
424 | 424 | self->priv->gststream = NULL; |
425 | 425 | 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 | */ | |
427 | 429 | FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); |
428 | 430 | |
429 | 431 | if (gststream) |
528 | 530 | case PROP_SENDING: |
529 | 531 | FS_NICE_STREAM_TRANSMITTER_LOCK (self); |
530 | 532 | 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)); | |
531 | 536 | FS_NICE_STREAM_TRANSMITTER_UNLOCK (self); |
532 | fs_nice_transmitter_set_sending (self->priv->transmitter, | |
533 | self->priv->gststream, g_value_get_boolean (value)); | |
534 | 537 | break; |
535 | 538 | case PROP_PREFERRED_LOCAL_CANDIDATES: |
536 | 539 | self->priv->preferred_local_candidates = g_value_dup_boxed (value); |
1507 | 1510 | fs_nice_agent_add_idle (self->priv->agent, state_changed_signal_idle, |
1508 | 1511 | data, free_state_changed_signal_data); |
1509 | 1512 | |
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 | } | |
1513 | 1521 | } |
1514 | 1522 | |
1515 | 1523 |
938 | 938 | |
939 | 939 | gst_element_send_event (ns->nicesinks[component], |
940 | 940 | 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 | } |
1305 | 1305 | self->priv->stun_buffer, |
1306 | 1306 | sizeof(self->priv->stun_buffer)); |
1307 | 1307 | |
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 | ||
1311 | 1319 | self->priv->stun_timeout_thread = |
1312 | 1320 | g_thread_create (stun_timeout_func, self, TRUE, error); |
1313 | 1321 | } |
1464 | 1472 | GError *error = NULL; |
1465 | 1473 | guint timeout_accum_ms = 0; |
1466 | 1474 | guint remainder; |
1467 | StunUsageTimerReturn timer_ret = STUN_USAGE_TIMER_RETURN_RETRANSMIT; | |
1475 | StunUsageTimerReturn timer_ret = STUN_USAGE_TIMER_RETURN_SUCCESS; | |
1468 | 1476 | StunTransactionId stunid; |
1469 | 1477 | StunTimer stun_timer; |
1470 | 1478 |
654 | 654 | } |
655 | 655 | |
656 | 656 | g_object_set (elem, |
657 | "auto-multicast", FALSE, | |
657 | 658 | "closefd", FALSE, |
658 | 659 | "sockfd", fd, |
659 | 660 | 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 | ||
665 | 661 | |
666 | 662 | if (!gst_bin_add (bin, elem)) |
667 | 663 | { |
1030 | 1026 | g_signal_emit_by_name (udpport->udpsink, "add", ip, port); |
1031 | 1027 | gst_element_send_event (udpport->udpsink, |
1032 | 1028 | 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))); | |
1034 | 1032 | } |
1035 | 1033 | |
1036 | 1034 |
562 | 562 | c, path, ready_cb, connected_cb, self, error); |
563 | 563 | g_free (path); |
564 | 564 | |
565 | fs_shm_transmitter_sink_set_sending (self->priv->transmitter, | |
566 | self->priv->shm_sink[c], self->priv->sending); | |
567 | ||
568 | 565 | if (self->priv->shm_sink[c] == NULL) |
569 | 566 | return FALSE; |
567 | ||
568 | fs_shm_transmitter_sink_set_sending (self->priv->transmitter, | |
569 | self->priv->shm_sink[c], self->priv->sending); | |
570 | 570 | } |
571 | 571 | |
572 | 572 | return TRUE; |