]>
Commit | Line | Data |
---|---|---|
0a25c284 MB |
1 | diff -aur pidgin-2.10.3-orig//configure.ac pidgin-2.10.3/configure.ac |
2 | --- pidgin-2.10.3-orig//configure.ac 2012-03-25 23:49:14.000000000 -0400 | |
3 | +++ pidgin-2.10.3/configure.ac 2012-03-31 16:23:09.772818869 -0400 | |
4 | @@ -786,18 +786,18 @@ | |
5 | fi | |
6 | ||
7 | dnl ####################################################################### | |
8 | -dnl # Check for Farsight | |
9 | +dnl # Check for Farstream | |
10 | dnl ####################################################################### | |
11 | -AC_ARG_ENABLE(farsight, | |
12 | - [AC_HELP_STRING([--disable-farsight], [compile without farsight support])], | |
13 | - enable_farsight="$enableval", enable_farsight="yes") | |
14 | -if test "x$enable_farsight" != "xno"; then | |
15 | - PKG_CHECK_MODULES(FARSIGHT, [farsight2-0.10 >= 0.0.9], [ | |
16 | - AC_DEFINE(USE_FARSIGHT, 1, [Use Farsight for voice and video]) | |
17 | - AC_SUBST(FARSIGHT_CFLAGS) | |
18 | - AC_SUBST(FARSIGHT_LIBS) | |
19 | +AC_ARG_ENABLE(farstream, | |
20 | + [AC_HELP_STRING([--disable-farstream], [compile without farstream support])], | |
21 | + enable_farstream="$enableval", enable_farstream="yes") | |
22 | +if test "x$enable_farstream" != "xno"; then | |
23 | + PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [ | |
24 | + AC_DEFINE(USE_FARSTREAM, 1, [Use Farstream for voice and video]) | |
25 | + AC_SUBST(FARSTREAM_CFLAGS) | |
26 | + AC_SUBST(FARSTREAM_LIBS) | |
27 | ], [ | |
28 | - enable_farsight="no" | |
29 | + enable_farstream="no" | |
30 | ]) | |
31 | fi | |
32 | ||
33 | @@ -808,20 +808,20 @@ | |
34 | [AC_HELP_STRING([--disable-vv], [compile without voice and video support])], | |
35 | enable_vv="$enableval", enable_vv="yes") | |
36 | if test "x$enable_vv" != "xno"; then | |
37 | - if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then | |
38 | + if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then | |
39 | AC_DEFINE(USE_VV, 1, [Use voice and video]) | |
40 | else | |
41 | enable_vv="no" | |
42 | if test "x$force_deps" = "xyes"; then | |
43 | AC_MSG_ERROR([ | |
44 | Dependencies for voice/video were not met. | |
45 | -Install the necessary gstreamer and farsight packages first. | |
46 | +Install the necessary gstreamer and farstream packages first. | |
47 | Or use --disable-vv if you do not need voice/video support. | |
48 | ]) | |
49 | fi | |
50 | fi | |
51 | fi | |
52 | -AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno") | |
53 | +AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno") | |
54 | ||
55 | dnl ####################################################################### | |
56 | dnl # Check for Internationalized Domain Name support | |
57 | Only in pidgin-2.10.3: configure.ac.orig | |
58 | diff -aur pidgin-2.10.3-orig//libpurple/Makefile.am pidgin-2.10.3/libpurple/Makefile.am | |
59 | --- pidgin-2.10.3-orig//libpurple/Makefile.am 2012-03-25 23:49:15.000000000 -0400 | |
60 | +++ pidgin-2.10.3/libpurple/Makefile.am 2012-03-31 16:23:09.776152155 -0400 | |
61 | @@ -306,7 +306,7 @@ | |
62 | $(LIBXML_LIBS) \ | |
63 | $(NETWORKMANAGER_LIBS) \ | |
64 | $(INTLLIBS) \ | |
65 | - $(FARSIGHT_LIBS) \ | |
66 | + $(FARSTREAM_LIBS) \ | |
67 | $(GSTREAMER_LIBS) \ | |
68 | $(GSTINTERFACES_LIBS) \ | |
69 | $(IDN_LIBS) \ | |
70 | @@ -322,7 +322,7 @@ | |
71 | $(DEBUG_CFLAGS) \ | |
72 | $(DBUS_CFLAGS) \ | |
73 | $(LIBXML_CFLAGS) \ | |
74 | - $(FARSIGHT_CFLAGS) \ | |
75 | + $(FARSTREAM_CFLAGS) \ | |
76 | $(GSTREAMER_CFLAGS) \ | |
77 | $(GSTINTERFACES_CFLAGS) \ | |
78 | $(IDN_CFLAGS) \ | |
79 | diff -aur pidgin-2.10.3-orig//libpurple/media/backend-fs2.c pidgin-2.10.3/libpurple/media/backend-fs2.c | |
80 | --- pidgin-2.10.3-orig//libpurple/media/backend-fs2.c 2012-03-25 23:49:16.000000000 -0400 | |
81 | +++ pidgin-2.10.3/libpurple/media/backend-fs2.c 2012-03-31 16:41:52.840615660 -0400 | |
82 | @@ -1,5 +1,5 @@ | |
83 | /** | |
84 | - * @file backend-fs2.c Farsight 2 backend for media API | |
85 | + * @file backend-fs2.c Farstream backend for media API | |
86 | * @ingroup core | |
87 | */ | |
88 | ||
89 | @@ -34,8 +34,9 @@ | |
90 | #include "network.h" | |
91 | #include "media-gst.h" | |
92 | ||
93 | -#include <gst/farsight/fs-conference-iface.h> | |
94 | -#include <gst/farsight/fs-element-added-notifier.h> | |
95 | +#include <farstream/fs-conference.h> | |
96 | +#include <farstream/fs-element-added-notifier.h> | |
97 | +#include <farstream/fs-utils.h> | |
98 | ||
99 | /** @copydoc _PurpleMediaBackendFs2Class */ | |
100 | typedef struct _PurpleMediaBackendFs2Class PurpleMediaBackendFs2Class; | |
101 | @@ -112,6 +113,8 @@ | |
102 | gchar *participant; | |
103 | FsStream *stream; | |
104 | ||
105 | + gboolean supports_add; | |
106 | + | |
107 | GstElement *src; | |
108 | GstElement *tee; | |
109 | GstElement *volume; | |
110 | @@ -147,6 +150,8 @@ | |
111 | FsConference *conference; | |
112 | gchar *conference_type; | |
113 | ||
114 | + FsElementAddedNotifier *notifier; | |
115 | + | |
116 | GHashTable *sessions; | |
117 | GHashTable *participants; | |
118 | ||
119 | @@ -212,6 +217,11 @@ | |
120 | ||
121 | purple_debug_info("backend-fs2", "purple_media_backend_fs2_dispose\n"); | |
122 | ||
123 | + if (priv->notifier) { | |
124 | + g_object_unref(priv->notifier); | |
125 | + priv->notifier = NULL; | |
126 | + } | |
127 | + | |
128 | if (priv->confbin) { | |
129 | GstElement *pipeline; | |
130 | ||
131 | @@ -846,7 +856,7 @@ | |
132 | priv->conference != FS_CONFERENCE(src)) | |
133 | return; | |
134 | ||
135 | - if (gst_structure_has_name(msg->structure, "farsight-error")) { | |
136 | + if (gst_structure_has_name(msg->structure, "farstream-error")) { | |
137 | FsError error_no; | |
138 | gst_structure_get_enum(msg->structure, "error-no", | |
139 | FS_TYPE_ERROR, (gint*)&error_no); | |
140 | @@ -859,24 +869,9 @@ | |
141 | " packages.")); | |
142 | purple_media_end(priv->media, NULL, NULL); | |
143 | break; | |
144 | - case FS_ERROR_NO_CODECS_LEFT: | |
145 | - purple_media_error(priv->media, _("No codecs" | |
146 | - " left. Your codec" | |
147 | - " preferences in" | |
148 | - " fs-codecs.conf are too" | |
149 | - " strict.")); | |
150 | - purple_media_end(priv->media, NULL, NULL); | |
151 | - break; | |
152 | - case FS_ERROR_UNKNOWN_CNAME: | |
153 | - /* | |
154 | - * Unknown CName is only a problem for the | |
155 | - * multicast transmitter which isn't used. | |
156 | - * It is also deprecated. | |
157 | - */ | |
158 | - break; | |
159 | default: | |
160 | purple_debug_error("backend-fs2", | |
161 | - "farsight-error: %i: %s\n", | |
162 | + "farstream-error: %i: %s\n", | |
163 | error_no, | |
164 | gst_structure_get_string( | |
165 | msg->structure, "error-msg")); | |
166 | @@ -885,11 +880,11 @@ | |
167 | ||
168 | if (FS_ERROR_IS_FATAL(error_no)) { | |
169 | purple_media_error(priv->media, _("A non-recoverable " | |
170 | - "Farsight2 error has occurred.")); | |
171 | + "Farstream error has occurred.")); | |
172 | purple_media_end(priv->media, NULL, NULL); | |
173 | } | |
174 | } else if (gst_structure_has_name(msg->structure, | |
175 | - "farsight-new-local-candidate")) { | |
176 | + "farstream-new-local-candidate")) { | |
177 | const GValue *value; | |
178 | FsStream *stream; | |
179 | FsCandidate *local_candidate; | |
180 | @@ -924,7 +919,7 @@ | |
181 | session->id, name, candidate); | |
182 | g_object_unref(candidate); | |
183 | } else if (gst_structure_has_name(msg->structure, | |
184 | - "farsight-local-candidates-prepared")) { | |
185 | + "farstream-local-candidates-prepared")) { | |
186 | const GValue *value; | |
187 | FsStream *stream; | |
188 | FsParticipant *participant; | |
189 | @@ -942,7 +937,7 @@ | |
190 | g_signal_emit_by_name(self, "candidates-prepared", | |
191 | session->id, name); | |
192 | } else if (gst_structure_has_name(msg->structure, | |
193 | - "farsight-new-active-candidate-pair")) { | |
194 | + "farstream-new-active-candidate-pair")) { | |
195 | const GValue *value; | |
196 | FsStream *stream; | |
197 | FsCandidate *local_candidate; | |
198 | @@ -976,7 +971,7 @@ | |
199 | g_object_unref(lcandidate); | |
200 | g_object_unref(rcandidate); | |
201 | } else if (gst_structure_has_name(msg->structure, | |
202 | - "farsight-recv-codecs-changed")) { | |
203 | + "farstream-recv-codecs-changed")) { | |
204 | const GValue *value; | |
205 | GList *codecs; | |
206 | FsCodec *codec; | |
207 | @@ -986,10 +981,10 @@ | |
208 | codec = codecs->data; | |
209 | ||
210 | purple_debug_info("backend-fs2", | |
211 | - "farsight-recv-codecs-changed: %s\n", | |
212 | + "farstream-recv-codecs-changed: %s\n", | |
213 | codec->encoding_name); | |
214 | } else if (gst_structure_has_name(msg->structure, | |
215 | - "farsight-component-state-changed")) { | |
216 | + "farstream-component-state-changed")) { | |
217 | const GValue *value; | |
218 | FsStreamState fsstate; | |
219 | guint component; | |
220 | @@ -1025,11 +1020,11 @@ | |
221 | } | |
222 | ||
223 | purple_debug_info("backend-fs2", | |
224 | - "farsight-component-state-changed: " | |
225 | + "farstream-component-state-changed: " | |
226 | "component: %u state: %s\n", | |
227 | component, state); | |
228 | } else if (gst_structure_has_name(msg->structure, | |
229 | - "farsight-send-codec-changed")) { | |
230 | + "farstream-send-codec-changed")) { | |
231 | const GValue *value; | |
232 | FsCodec *codec; | |
233 | gchar *codec_str; | |
234 | @@ -1039,12 +1034,12 @@ | |
235 | codec_str = fs_codec_to_string(codec); | |
236 | ||
237 | purple_debug_info("backend-fs2", | |
238 | - "farsight-send-codec-changed: codec: %s\n", | |
239 | + "farstream-send-codec-changed: codec: %s\n", | |
240 | codec_str); | |
241 | ||
242 | g_free(codec_str); | |
243 | } else if (gst_structure_has_name(msg->structure, | |
244 | - "farsight-codecs-changed")) { | |
245 | + "farstream-codecs-changed")) { | |
246 | const GValue *value; | |
247 | FsSession *fssession; | |
248 | GList *sessions; | |
249 | @@ -1220,8 +1215,12 @@ | |
250 | purple_media_is_initiator(media, sid, name)) | |
251 | return; | |
252 | ||
253 | - fs_stream_set_remote_candidates(stream->stream, | |
254 | - stream->remote_candidates, &err); | |
255 | + if (stream->supports_add) | |
256 | + fs_stream_add_remote_candidates(stream->stream, | |
257 | + stream->remote_candidates, &err); | |
258 | + else | |
259 | + fs_stream_force_remote_candidates(stream->stream, | |
260 | + stream->remote_candidates, &err); | |
261 | ||
262 | if (err == NULL) | |
263 | return; | |
264 | @@ -1301,6 +1300,7 @@ | |
265 | GstElement *pipeline; | |
266 | GstBus *bus; | |
267 | gchar *name; | |
268 | + GKeyFile *default_props; | |
269 | ||
270 | priv->conference = FS_CONFERENCE( | |
271 | gst_element_factory_make(priv->conference_type, NULL)); | |
272 | @@ -1343,6 +1343,14 @@ | |
273 | return FALSE; | |
274 | } | |
275 | ||
276 | + default_props = fs_utils_get_default_element_properties(GST_ELEMENT(priv->conference)); | |
277 | + if (default_props != NULL) { | |
278 | + priv->notifier = fs_element_added_notifier_new(); | |
279 | + fs_element_added_notifier_add(priv->notifier, | |
280 | + GST_BIN(priv->confbin)); | |
281 | + fs_element_added_notifier_set_properties_from_keyfile(priv->notifier, default_props); | |
282 | + } | |
283 | + | |
284 | g_signal_connect(G_OBJECT(bus), "message", | |
285 | G_CALLBACK(gst_bus_cb), self); | |
286 | gst_object_unref(bus); | |
287 | @@ -1559,7 +1567,7 @@ | |
288 | * receiving the src-pad-added signal. | |
289 | * Only works for non-multicast FsRtpSessions. | |
290 | */ | |
291 | - if (is_nice || !strcmp(transmitter, "rawudp")) | |
292 | + if (!!strcmp(transmitter, "multicast")) | |
293 | g_object_set(G_OBJECT(session->session), | |
294 | "no-rtcp-timeout", 0, NULL); | |
295 | ||
296 | @@ -1612,7 +1620,7 @@ | |
297 | GError *err = NULL; | |
298 | ||
299 | participant = fs_conference_new_participant( | |
300 | - priv->conference, name, &err); | |
301 | + priv->conference, &err); | |
302 | ||
303 | if (err) { | |
304 | purple_debug_error("backend-fs2", | |
305 | @@ -1622,6 +1630,12 @@ | |
306 | return FALSE; | |
307 | } | |
308 | ||
309 | + if (g_object_class_find_property(G_OBJECT_GET_CLASS(participant), | |
310 | + "cname")) { | |
311 | + g_object_set(participant, "cname", name, NULL); | |
312 | + } | |
313 | + | |
314 | + | |
315 | if (!priv->participants) { | |
316 | purple_debug_info("backend-fs2", | |
317 | "Creating hash table for participants\n"); | |
318 | @@ -1786,6 +1800,40 @@ | |
319 | } | |
320 | } | |
321 | ||
322 | + | |
323 | + session = get_session(self, sess_id); | |
324 | + | |
325 | + if (session == NULL) { | |
326 | + purple_debug_error("backend-fs2", | |
327 | + "Couldn't find session to create stream.\n"); | |
328 | + return FALSE; | |
329 | + } | |
330 | + | |
331 | + participant = get_participant(self, who); | |
332 | + | |
333 | + if (participant == NULL) { | |
334 | + purple_debug_error("backend-fs2", "Couldn't find " | |
335 | + "participant to create stream.\n"); | |
336 | + return FALSE; | |
337 | + } | |
338 | + | |
339 | + fsstream = fs_session_new_stream(session->session, participant, | |
340 | + initiator == TRUE ? type_direction : | |
341 | + (type_direction & FS_DIRECTION_RECV), &err); | |
342 | + | |
343 | + if (fsstream == NULL) { | |
344 | + if (err) { | |
345 | + purple_debug_error("backend-fs2", | |
346 | + "Error creating stream: %s\n", | |
347 | + err && err->message ? | |
348 | + err->message : "NULL"); | |
349 | + g_error_free(err); | |
350 | + } else | |
351 | + purple_debug_error("backend-fs2", | |
352 | + "Error creating stream\n"); | |
353 | + return FALSE; | |
354 | + } | |
355 | + | |
356 | memcpy(_params, params, sizeof(GParameter) * num_params); | |
357 | ||
358 | /* set the controlling mode parameter */ | |
359 | @@ -1840,45 +1888,22 @@ | |
360 | _num_params++; | |
361 | } | |
362 | ||
363 | - session = get_session(self, sess_id); | |
364 | ||
365 | - if (session == NULL) { | |
366 | - purple_debug_error("backend-fs2", | |
367 | - "Couldn't find session to create stream.\n"); | |
368 | - return FALSE; | |
369 | - } | |
370 | - | |
371 | - participant = get_participant(self, who); | |
372 | - | |
373 | - if (participant == NULL) { | |
374 | - purple_debug_error("backend-fs2", "Couldn't find " | |
375 | - "participant to create stream.\n"); | |
376 | - return FALSE; | |
377 | + if(!fs_stream_set_transmitter(fsstream, transmitter, | |
378 | + _params, _num_params, &err)) { | |
379 | + purple_debug_error("backend-fs2", "Could not set transmitter %s: %s.\n", transmitter, err->message); | |
380 | + g_clear_error(&err); | |
381 | + g_free(_params); | |
382 | + return FALSE; | |
383 | } | |
384 | - | |
385 | - fsstream = fs_session_new_stream(session->session, participant, | |
386 | - initiator == TRUE ? type_direction : | |
387 | - (type_direction & FS_DIRECTION_RECV), transmitter, | |
388 | - _num_params, _params, &err); | |
389 | g_free(_params); | |
390 | ||
391 | - if (fsstream == NULL) { | |
392 | - if (err) { | |
393 | - purple_debug_error("backend-fs2", | |
394 | - "Error creating stream: %s\n", | |
395 | - err && err->message ? | |
396 | - err->message : "NULL"); | |
397 | - g_error_free(err); | |
398 | - } else | |
399 | - purple_debug_error("backend-fs2", | |
400 | - "Error creating stream\n"); | |
401 | - return FALSE; | |
402 | - } | |
403 | ||
404 | stream = g_new0(PurpleMediaBackendFs2Stream, 1); | |
405 | stream->participant = g_strdup(who); | |
406 | stream->session = session; | |
407 | stream->stream = fsstream; | |
408 | + stream->supports_add = !strcmp(transmitter, "nice"); | |
409 | ||
410 | priv->streams = g_list_append(priv->streams, stream); | |
411 | ||
412 | @@ -1991,7 +2016,11 @@ | |
413 | if (purple_media_is_initiator(priv->media, sess_id, participant) || | |
414 | purple_media_accepted( | |
415 | priv->media, sess_id, participant)) { | |
416 | - fs_stream_set_remote_candidates(stream->stream, | |
417 | + if (stream->supports_add) | |
418 | + fs_stream_add_remote_candidates(stream->stream, | |
419 | + stream->remote_candidates, &err); | |
420 | + else | |
421 | + fs_stream_force_remote_candidates(stream->stream, | |
422 | stream->remote_candidates, &err); | |
423 | ||
424 | if (err) { | |
425 | @@ -2016,6 +2045,7 @@ | |
426 | if (sess_id != NULL) { | |
427 | PurpleMediaBackendFs2Session *session = get_session( | |
428 | PURPLE_MEDIA_BACKEND_FS2(self), sess_id); | |
429 | + GList *codecs = NULL; | |
430 | ||
431 | if (session == NULL) | |
432 | return FALSE; | |
433 | @@ -2023,21 +2053,31 @@ | |
434 | if (session->type & (PURPLE_MEDIA_SEND_AUDIO | | |
435 | PURPLE_MEDIA_SEND_VIDEO)) | |
436 | g_object_get(session->session, | |
437 | - "codecs-ready", &ret, NULL); | |
438 | + "codecs", &codecs, NULL); | |
439 | else | |
440 | ret = TRUE; | |
441 | + if (codecs) { | |
442 | + fs_codec_list_destroy (codecs); | |
443 | + ret = TRUE; | |
444 | + } | |
445 | } else { | |
446 | GList *values = g_hash_table_get_values(priv->sessions); | |
447 | ||
448 | for (; values; values = g_list_delete_link(values, values)) { | |
449 | PurpleMediaBackendFs2Session *session = values->data; | |
450 | + GList *codecs = NULL; | |
451 | + | |
452 | if (session->type & (PURPLE_MEDIA_SEND_AUDIO | | |
453 | PURPLE_MEDIA_SEND_VIDEO)) | |
454 | g_object_get(session->session, | |
455 | - "codecs-ready", &ret, NULL); | |
456 | + "codecs", &codecs, NULL); | |
457 | else | |
458 | ret = TRUE; | |
459 | ||
460 | + if (codecs) { | |
461 | + fs_codec_list_destroy (codecs); | |
462 | + ret = TRUE; | |
463 | + } | |
464 | if (ret == FALSE) | |
465 | break; | |
466 | } | |
467 | Only in pidgin-2.10.3/libpurple/media: backend-fs2.c~ | |
468 | diff -aur pidgin-2.10.3-orig//libpurple/media.c pidgin-2.10.3/libpurple/media.c | |
469 | --- pidgin-2.10.3-orig//libpurple/media.c 2012-03-25 23:49:16.000000000 -0400 | |
470 | +++ pidgin-2.10.3/libpurple/media.c 2012-03-31 16:23:09.789485312 -0400 | |
471 | @@ -1067,7 +1067,6 @@ | |
472 | { | |
473 | #ifdef USE_VV | |
474 | PurpleMediaSession *session; | |
475 | - PurpleMediaStream *stream = NULL; | |
476 | ||
477 | g_return_val_if_fail(PURPLE_IS_MEDIA(media), FALSE); | |
478 | ||
479 | @@ -1103,7 +1102,7 @@ | |
480 | } | |
481 | ||
482 | if (purple_media_get_stream(media, sess_id, who) == NULL) { | |
483 | - stream = purple_media_insert_stream(session, who, initiator); | |
484 | + purple_media_insert_stream(session, who, initiator); | |
485 | ||
486 | g_signal_emit(media, purple_media_signals[STATE_CHANGED], | |
487 | 0, PURPLE_MEDIA_STATE_NEW, | |
488 | diff -aur pidgin-2.10.3-orig//libpurple/mediamanager.c pidgin-2.10.3/libpurple/mediamanager.c | |
489 | --- pidgin-2.10.3-orig//libpurple/mediamanager.c 2012-03-25 23:49:16.000000000 -0400 | |
490 | +++ pidgin-2.10.3/libpurple/mediamanager.c 2012-03-31 16:23:09.789485312 -0400 | |
491 | @@ -39,7 +39,7 @@ | |
492 | #ifdef USE_VV | |
493 | #include <media/backend-fs2.h> | |
494 | ||
495 | -#include <gst/farsight/fs-element-added-notifier.h> | |
496 | +#include <farstream/fs-element-added-notifier.h> | |
497 | #include <gst/interfaces/xoverlay.h> | |
498 | ||
499 | /** @copydoc _PurpleMediaManagerPrivate */ |