aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-05-04 03:25:36 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-05-04 03:25:36 +0800
commitc309ee110aa7dbf2a59804896f6678fe924825d0 (patch)
treeabd3fb0c556ebaa9f57a746cde452fcee766a827
parent8d643984bd096910e7f3ac15526099e9342d0872 (diff)
parent75f5e5be0fd789df370be135b1ebfe1f70208383 (diff)
downloadgsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar.gz
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar.bz2
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar.lz
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar.xz
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.tar.zst
gsoc2013-empathy-c309ee110aa7dbf2a59804896f6678fe924825d0.zip
Merge remote-tracking branch 'public/gnome-2-34' into empathy-skype
-rw-r--r--src/empathy-call-window.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 3f260327a..0e1b55fdb 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -667,12 +667,6 @@ add_video_preview_to_pipeline (EmpathyCallWindow *self)
return;
}
- if (!gst_bin_add (GST_BIN (priv->pipeline), priv->video_tee))
- {
- g_warning ("Could not add video tee to pipeline");
- return;
- }
-
if (!gst_bin_add (GST_BIN (priv->pipeline), preview))
{
g_warning ("Could not add video preview to pipeline");
@@ -699,7 +693,6 @@ create_video_preview (EmpathyCallWindow *self)
GstBus *bus;
g_assert (priv->video_preview == NULL);
- g_assert (priv->video_tee == NULL);
bus = gst_pipeline_get_bus (GST_PIPELINE (priv->pipeline));
@@ -710,10 +703,6 @@ create_video_preview (EmpathyCallWindow *self)
gtk_box_pack_start (GTK_BOX (priv->self_user_output_hbox),
priv->video_preview, TRUE, TRUE, 0);
- priv->video_tee = gst_element_factory_make ("tee", NULL);
- gst_object_ref (priv->video_tee);
- gst_object_sink (priv->video_tee);
-
g_object_unref (bus);
}
@@ -990,6 +979,12 @@ create_pipeline (EmpathyCallWindow *self)
priv->pipeline = gst_pipeline_new (NULL);
priv->pipeline_playing = FALSE;
+ priv->video_tee = gst_element_factory_make ("tee", NULL);
+ gst_object_ref (priv->video_tee);
+ gst_object_sink (priv->video_tee);
+
+ gst_bin_add (GST_BIN (priv->pipeline), priv->video_tee);
+
bus = gst_pipeline_get_bus (GST_PIPELINE (priv->pipeline));
priv->bus_message_source_id = gst_bus_add_watch (bus,
empathy_call_window_bus_message, self);
@@ -2594,21 +2589,18 @@ empathy_call_window_sink_added_cb (EmpathyCallHandler *handler,
retval = TRUE;
break;
case FS_MEDIA_TYPE_VIDEO:
- if (priv->video_input != NULL)
+ if (priv->video_tee != NULL)
{
- if (priv->video_tee != NULL)
+ pad = gst_element_get_request_pad (priv->video_tee, "src%d");
+ if (GST_PAD_LINK_FAILED (gst_pad_link (pad, sink)))
{
- pad = gst_element_get_request_pad (priv->video_tee, "src%d");
- if (GST_PAD_LINK_FAILED (gst_pad_link (pad, sink)))
- {
- g_warning ("Could not link video source input pipeline");
- break;
- }
- gst_object_unref (pad);
+ g_warning ("Could not link video source input pipeline");
+ break;
}
-
- retval = TRUE;
+ gst_object_unref (pad);
}
+
+ retval = TRUE;
break;
default:
g_assert_not_reached ();
@@ -2634,7 +2626,7 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self)
gst_element_set_state (preview, GST_STATE_NULL);
gst_bin_remove_many (GST_BIN (priv->pipeline), priv->video_input,
- priv->video_tee, preview, NULL);
+ preview, NULL);
g_object_unref (priv->video_input);
priv->video_input = NULL;