aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2010-03-07 06:02:32 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-29 23:36:23 +0800
commit4a4a8f89579147d1e712d5da257c83786f86439f (patch)
tree63e9eeaca8729eac46d16aaa978f854de15df85e
parentc7662e15ba7412146c8d9d76c9c3b4c3cffb4089 (diff)
downloadgsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar.gz
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar.bz2
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar.lz
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar.xz
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.tar.zst
gsoc2013-empathy-4a4a8f89579147d1e712d5da257c83786f86439f.zip
Send stream error when the src pad can't be linked
-rw-r--r--libempathy/empathy-call-handler.c11
-rw-r--r--src/empathy-call-window.c4
2 files changed, 11 insertions, 4 deletions
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index 3be5eda08..9cfee1d86 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -231,8 +231,8 @@ empathy_call_handler_class_init (EmpathyCallHandlerClass *klass)
signals[SRC_PAD_ADDED] =
g_signal_new ("src-pad-added", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- _empathy_marshal_VOID__OBJECT_UINT,
- G_TYPE_NONE,
+ _empathy_marshal_BOOLEAN__OBJECT_UINT,
+ G_TYPE_BOOLEAN,
2, GST_TYPE_PAD, G_TYPE_UINT);
signals[SINK_PAD_ADDED] =
@@ -334,11 +334,16 @@ empathy_call_handler_tf_stream_src_pad_added_cb (TfStream *stream,
GstPad *pad, FsCodec *codec, EmpathyCallHandler *handler)
{
guint media_type;
+ gboolean retval;
g_object_get (stream, "media-type", &media_type, NULL);
g_signal_emit (G_OBJECT (handler), signals[SRC_PAD_ADDED], 0,
- pad, media_type);
+ pad, media_type, &retval);
+
+ if (!retval)
+ tf_stream_error (stream, TP_MEDIA_STREAM_ERROR_MEDIA_ERROR,
+ "Could not link sink");
}
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 5a157ab94..09197bfe1 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1993,7 +1993,7 @@ empathy_call_window_connected (gpointer user_data)
/* Called from the streaming thread */
-static void
+static gboolean
empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
GstPad *src, guint media_type, gpointer user_data)
{
@@ -2029,6 +2029,8 @@ empathy_call_window_src_added_cb (EmpathyCallHandler *handler,
gst_object_unref (pad);
g_mutex_unlock (priv->lock);
+
+ return TRUE;
}
/* Called from the streaming thread */