diff options
Diffstat (limited to 'src/empathy-video-src.c')
-rw-r--r-- | src/empathy-video-src.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/empathy-video-src.c b/src/empathy-video-src.c index e249633c7..4017990a2 100644 --- a/src/empathy-video-src.c +++ b/src/empathy-video-src.c @@ -361,3 +361,16 @@ out: return result; } +void +empathy_video_src_change_device (EmpathyGstVideoSrc *self, + const gchar *device) +{ + EmpathyGstVideoSrcPrivate *priv = EMPATHY_GST_VIDEO_SRC_GET_PRIVATE (self); + GstState state; + + gst_element_get_state (priv->src, &state, NULL, 0); + + gst_element_set_state (priv->src, GST_STATE_NULL); + g_object_set (priv->src, "device", device, NULL); + gst_element_set_state (priv->src, state); +} |