pidgin.vv: aa0c8867: Add some debug messages for the remainin...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Wed Feb 4 23:40:37 EST 2009


-----------------------------------------------------------------
Revision: aa0c8867256450c37f9b97135601a39544821ac8
Ancestor: 07f085b918a43496f8e5efd13f4d366a39ea0e97
Author: maiku at soc.pidgin.im
Date: 2009-02-05T03:08:52
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/aa0c8867256450c37f9b97135601a39544821ac8

Modified files:
        libpurple/media.c

ChangeLog: 

Add some debug messages for the remaining Farsight signals.

-------------- next part --------------
============================================================
--- libpurple/media.c	95218d573be9ec2b0b4a266b37924720cf632782
+++ libpurple/media.c	d603b753c0471f6ab91afa0e0f9b498eccba473a
@@ -1253,10 +1253,39 @@ media_bus_call(GstBus *bus, GstMessage *
 				
 			} else if (gst_structure_has_name(msg->structure,
 					"farsight-component-state-changed")) {
-				
+				FsStreamState fsstate = g_value_get_enum(gst_structure_get_value(msg->structure, "state"));
+				guint component = g_value_get_uint(gst_structure_get_value(msg->structure, "component"));
+				const gchar *state;
+				switch (fsstate) {
+					case FS_STREAM_STATE_FAILED:
+						state = "FAILED";
+						break;
+					case FS_STREAM_STATE_DISCONNECTED:
+						state = "DISCONNECTED";
+						break;
+					case FS_STREAM_STATE_GATHERING:
+						state = "GATHERING";
+						break;
+					case FS_STREAM_STATE_CONNECTING:
+						state = "CONNECTING";
+						break;
+					case FS_STREAM_STATE_CONNECTED:
+						state = "CONNECTED";
+						break;
+					case FS_STREAM_STATE_READY:
+						state = "READY";
+						break;
+					default:
+						state = "UNKNOWN";
+						break;
+				}
+				purple_debug_info("media", "farsight-component-state-changed: component: %u state: %s\n", component, state);
 			} else if (gst_structure_has_name(msg->structure,
 					"farsight-send-codec-changed")) {
-				
+				FsCodec *codec = g_value_get_boxed(gst_structure_get_value(msg->structure, "codec"));
+				gchar *codec_str = fs_codec_to_string(codec);
+				purple_debug_info("media", "farsight-send-codec-changed: codec: %s\n", codec_str);
+				g_free(codec_str);
 			} else if (gst_structure_has_name(msg->structure,
 					"farsight-codecs-changed")) {
 				GList *sessions = g_hash_table_get_values(PURPLE_MEDIA(media)->priv->sessions);


More information about the Commits mailing list