comparison libpurple/media.c @ 28104:f628e98e6dff

Add some extra error strings just in case.
author maiku@pidgin.im
date Fri, 28 Aug 2009 07:25:43 +0000
parents 0775b7b7298e
children 614a40c68b88
comparison
equal deleted inserted replaced
28103:268b821de5c5 28104:f628e98e6dff
2044 2044
2045 if (gst_structure_has_name(msg->structure, "farsight-error")) { 2045 if (gst_structure_has_name(msg->structure, "farsight-error")) {
2046 FsError error_no; 2046 FsError error_no;
2047 gst_structure_get_enum(msg->structure, "error-no", 2047 gst_structure_get_enum(msg->structure, "error-no",
2048 FS_TYPE_ERROR, (gint*)&error_no); 2048 FS_TYPE_ERROR, (gint*)&error_no);
2049 /* 2049 switch (error_no) {
2050 * Unknown CName is only a problem for the 2050 case FS_ERROR_NO_CODECS:
2051 * multicast transmitter which isn't used. 2051 purple_media_error(media, _("No codecs found. Install some GStreamer codecs found in GStreamer plugins packages."));
2052 */ 2052 purple_media_end(media, NULL, NULL);
2053 if (error_no != FS_ERROR_UNKNOWN_CNAME) 2053 break;
2054 purple_debug_error("media", "farsight-error: %i: %s\n", error_no, 2054 case FS_ERROR_NO_CODECS_LEFT:
2055 gst_structure_get_string(msg->structure, "error-msg")); 2055 purple_media_error(media, _("No codecs left. Your codec preferences in fs-codecs.conf are too strict."));
2056 purple_media_end(media, NULL, NULL);
2057 break;
2058 case FS_ERROR_UNKNOWN_CNAME:
2059 /*
2060 * Unknown CName is only a problem for the
2061 * multicast transmitter which isn't used.
2062 * It is also deprecated.
2063 */
2064 break;
2065 default:
2066 purple_debug_error("media", "farsight-error: %i: %s\n", error_no,
2067 gst_structure_get_string(msg->structure, "error-msg"));
2068 break;
2069 }
2070
2071 if (FS_ERROR_IS_FATAL(error_no)) {
2072 purple_media_error(media, _("A non-recoverable Farsight2 error has occurred."));
2073 purple_media_end(media, NULL, NULL);
2074 }
2056 } else if (gst_structure_has_name(msg->structure, 2075 } else if (gst_structure_has_name(msg->structure,
2057 "farsight-new-local-candidate")) { 2076 "farsight-new-local-candidate")) {
2058 FsStream *stream = g_value_get_object(gst_structure_get_value(msg->structure, "stream")); 2077 FsStream *stream = g_value_get_object(gst_structure_get_value(msg->structure, "stream"));
2059 FsCandidate *local_candidate = g_value_get_boxed(gst_structure_get_value(msg->structure, "candidate")); 2078 FsCandidate *local_candidate = g_value_get_boxed(gst_structure_get_value(msg->structure, "candidate"));
2060 PurpleMediaSession *session = purple_media_session_from_fs_stream(media, stream); 2079 PurpleMediaSession *session = purple_media_session_from_fs_stream(media, stream);
2568 2587
2569 session->session = fs_conference_new_session( 2588 session->session = fs_conference_new_session(
2570 media->priv->conference, media_type, &err); 2589 media->priv->conference, media_type, &err);
2571 2590
2572 if (err != NULL) { 2591 if (err != NULL) {
2573 purple_media_error(media, "Error creating session: %s\n", err->message); 2592 purple_media_error(media, _("Error creating session: %s"), err->message);
2574 g_error_free(err); 2593 g_error_free(err);
2575 g_free(session); 2594 g_free(session);
2576 return FALSE; 2595 return FALSE;
2577 } 2596 }
2578 2597