Mercurial > pidgin.yaz
changeset 26173:58071d9f10b1
Add some debug messages for the remaining Farsight signals.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 05 Feb 2009 03:08:52 +0000 |
parents | 8a402c91fe6f |
children | cc96a5ec4782 |
files | libpurple/media.c |
diffstat | 1 files changed, 31 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/media.c Thu Feb 05 02:46:38 2009 +0000 +++ b/libpurple/media.c Thu Feb 05 03:08:52 2009 +0000 @@ -1253,10 +1253,39 @@ } 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);