priv->video_container = gtk_clutter_embed_new ();
+ gtk_widget_set_size_request (priv->video_container,
+ EMPATHY_VIDEO_WIDGET_DEFAULT_WIDTH, EMPATHY_VIDEO_WIDGET_DEFAULT_HEIGHT);
+
/* Set the background color to that of the rest of the window */
context = gtk_widget_get_style_context (priv->content_hbox);
gtk_style_context_get_background_color (context,
{
return EMPATHY_GST_VIDEO_SRC (self->priv->video_input);
}
+
+void
+empathy_call_window_change_webcam (EmpathyCallWindow *self,
+ const gchar *device)
+{
+ EmpathyGstVideoSrc *video;
+ gboolean running;
+
+ /* Restart the camera only if it's already running */
+ running = (self->priv->video_preview != NULL);
+ video = empathy_call_window_get_video_src (self);
+
+ if (running)
+ empathy_call_window_play_camera (self, FALSE);
+
+ empathy_video_src_change_device (video, device);
+
+ if (running)
+ empathy_call_window_play_camera (self, TRUE);
+}