Mercurial > pidgin
diff libpurple/media.c @ 26059:1ff5304f6e9d
Added codecs-changed signal.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Tue, 27 Jan 2009 08:46:53 +0000 |
parents | ac56e5707a72 |
children | 5b64b7d8da39 |
line wrap: on
line diff
--- a/libpurple/media.c Tue Jan 27 07:48:03 2009 +0000 +++ b/libpurple/media.c Tue Jan 27 08:46:53 2009 +0000 @@ -118,6 +118,7 @@ enum { ERROR, + CODECS_CHANGED, NEW_CANDIDATE, READY_NEW, STATE_CHANGED, @@ -199,6 +200,10 @@ G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); + purple_media_signals[CODECS_CHANGED] = g_signal_new("codecs-changed", G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, 0, NULL, NULL, + g_cclosure_marshal_VOID__STRING, + G_TYPE_NONE, 1, G_TYPE_STRING); purple_media_signals[NEW_CANDIDATE] = g_signal_new("new-candidate", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, purple_smarshal_VOID__POINTER_POINTER_OBJECT, @@ -1151,12 +1156,17 @@ PurpleMediaSession *session = sessions->data; if (session->session == fssession) { gboolean ready; + gchar *session_id; + g_object_get(session->session, "codecs-ready", &ready, NULL); if (session->codecs_ready == FALSE && ready == TRUE) { session->codecs_ready = ready; purple_media_emit_ready(media, session, NULL); } + session_id = g_strdup(session->id); + g_signal_emit(media, purple_media_signals[CODECS_CHANGED], 0, session_id); + g_free(session_id); g_list_free(sessions); break; }