comparison libpurple/media.c @ 29299:7925bb7f2aa7

propagate from branch 'im.pidgin.pidgin' (head 92e101e3698042e7600729bc09dec9e28f81de8f) to branch 'im.pidgin.cpw.attention_ui' (head 563c35d20efcc234a74567ebb88c059d10ce1e09)
author Marcus Lundblad <ml@update.uu.se>
date Mon, 24 Aug 2009 19:23:56 +0000
parents afa79877d972
children 0775b7b7298e
comparison
equal deleted inserted replaced
29298:fb99a0067812 29299:7925bb7f2aa7
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details. 20 * GNU General Public License for more details.
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */ 25 */
26 26
27 #include <string.h> 27 #include <string.h>
28 28
29 #include "internal.h" 29 #include "internal.h"
2127 } 2127 }
2128 } 2128 }
2129 } 2129 }
2130 break; 2130 break;
2131 } 2131 }
2132 case GST_MESSAGE_ERROR: {
2133 GstElement *element = GST_ELEMENT(GST_MESSAGE_SRC(msg));
2134 GstElement *lastElement = NULL;
2135 while (!GST_IS_PIPELINE(element)) {
2136 if (element == media->priv->confbin) {
2137 purple_media_error("media", _("Conference error."));
2138 purple_media_end(media, NULL, NULL);
2139 break;
2140 }
2141 lastElement = element;
2142 element = GST_ELEMENT_PARENT(element);
2143 }
2144 if (GST_IS_PIPELINE(element)) {
2145 GList *sessions = g_hash_table_get_values(media->priv->sessions);
2146 for (; sessions; sessions = g_list_delete_link(sessions, sessions)) {
2147 PurpleMediaSession *session = sessions->data;
2148
2149 if (session->src == lastElement) {
2150 if (session->type & PURPLE_MEDIA_AUDIO)
2151 purple_media_error(media, _("Error with your microphone."));
2152 else
2153 purple_media_error(media, _("Error with your webcam."));
2154 purple_media_end(media, NULL, NULL);
2155 break;
2156 }
2157 }
2158 g_list_free(sessions);
2159 }
2160 }
2132 default: 2161 default:
2133 break; 2162 break;
2134 } 2163 }
2135 2164
2136 return TRUE; 2165 return TRUE;
2728 participant, type_direction & 2757 participant, type_direction &
2729 FS_DIRECTION_RECV, transmitter, 2758 FS_DIRECTION_RECV, transmitter,
2730 num_params, params, &err); 2759 num_params, params, &err);
2731 } 2760 }
2732 2761
2733 if (err) { 2762 if (fsstream == NULL) {
2734 purple_debug_error("media", "Error creating stream: %s\n", 2763 purple_debug_error("media",
2735 err->message); 2764 "Error creating stream: %s\n",
2736 g_error_free(err); 2765 err && err->message ?
2766 err->message : "NULL");
2767 if (err)
2768 g_error_free(err);
2737 g_object_unref(participant); 2769 g_object_unref(participant);
2738 g_hash_table_remove(media->priv->participants, who); 2770 g_hash_table_remove(media->priv->participants, who);
2739 purple_media_remove_session(media, session); 2771 purple_media_remove_session(media, session);
2740 g_free(session); 2772 g_free(session);
2741 return FALSE; 2773 return FALSE;