diff libpurple/media/backend-fs2.c @ 29163:1fdc75c94c22

Move Farsight 2's local-candidates-prepared signal to the Fs2 media backend.
author maiku@pidgin.im
date Mon, 26 Oct 2009 18:02:06 +0000
parents 74e75fc3481e
children 98a1b62a0f7e
line wrap: on
line diff
--- a/libpurple/media/backend-fs2.c	Mon Oct 26 17:39:38 2009 +0000
+++ b/libpurple/media/backend-fs2.c	Mon Oct 26 18:02:06 2009 +0000
@@ -558,16 +558,20 @@
 			"farsight-local-candidates-prepared")) {
 		const GValue *value;
 		FsStream *stream;
-#if 0
-		PurpleMediaSession *session;
-#endif
+		FsParticipant *participant;
+		PurpleMediaBackendFs2Session *session;
+		gchar *name;
 
 		value = gst_structure_get_value(msg->structure, "stream");
 		stream = g_value_get_object(value);
-#if 0
-		session = purple_media_session_from_fs_stream(media, stream);
-		_candidates_prepared_cb(stream, session);
-#endif
+		session = _get_session_from_fs_stream(self, stream);
+
+		g_object_get(stream, "participant", &participant, NULL);
+		g_object_get(participant, "cname", &name, NULL);
+		g_object_unref(participant);
+
+		g_signal_emit_by_name(self, "candidates-prepared",
+				session->id, name);
 	} else if (gst_structure_has_name(msg->structure,
 			"farsight-new-active-candidate-pair")) {
 		const GValue *value;