pidgin: f7b9f630: Detect that there has been an error in t...
maiku at pidgin.im
maiku at pidgin.im
Sun Aug 23 05:16:02 EDT 2009
-----------------------------------------------------------------
Revision: f7b9f6308d9e2cb23ec1d56882ff3894e46ad869
Ancestor: 94c4a06010183eacc92ad03f19e324f7d28b7829
Author: maiku at pidgin.im
Date: 2009-08-23T09:12:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f7b9f6308d9e2cb23ec1d56882ff3894e46ad869
Modified files:
libpurple/media.c
ChangeLog:
Detect that there has been an error in the GStreamer pipeline, output an
appropriate message and end the conference.
-------------- next part --------------
============================================================
--- libpurple/media.c 0945c97656314d3657a5f0f59a93419757ec8c7a
+++ libpurple/media.c 58188234ff0e78b693f39d577895d5c543d06a01
@@ -2129,6 +2129,35 @@ media_bus_call(GstBus *bus, GstMessage *
}
break;
}
+ case GST_MESSAGE_ERROR: {
+ GstElement *element = GST_ELEMENT(GST_MESSAGE_SRC(msg));
+ GstElement *lastElement = NULL;
+ while (!GST_IS_PIPELINE(element)) {
+ if (element == media->priv->confbin) {
+ purple_media_error("media", _("Conference error."));
+ purple_media_end(media, NULL, NULL);
+ break;
+ }
+ lastElement = element;
+ element = GST_ELEMENT_PARENT(element);
+ }
+ if (GST_IS_PIPELINE(element)) {
+ GList *sessions = g_hash_table_get_values(media->priv->sessions);
+ for (; sessions; sessions = g_list_delete_link(sessions, sessions)) {
+ PurpleMediaSession *session = sessions->data;
+
+ if (session->src == lastElement) {
+ if (session->type & PURPLE_MEDIA_AUDIO)
+ purple_media_error(media, _("Error with your microphone."));
+ else
+ purple_media_error(media, _("Error with your webcam."));
+ purple_media_end(media, NULL, NULL);
+ break;
+ }
+ }
+ g_list_free(sessions);
+ }
+ }
default:
break;
}
More information about the Commits
mailing list