[cheese/wip/hans-fixes-master: 3/16] Fix no-video-after-switching-resolution problem
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/wip/hans-fixes-master: 3/16] Fix no-video-after-switching-resolution problem
- Date: Sun, 16 Jun 2013 20:58:24 +0000 (UTC)
commit f18ee5f13e8e3db4c5ebe6bf00b277dd9cb369be
Author: Hans de Goede <hdegoede redhat com>
Date: Mon Jun 10 10:26:39 2013 +0200
Fix no-video-after-switching-resolution problem
There is a bug in wrappercamerabinsrc which causes it to lose its
video-source setting after the pipeline has started, so on a
stop/re-start, as when changing resolution, its video-source has become
NULL, and there is no longer video.
This patch works around this by moving the setting of the video-source
property to cheese_camera_play(), so that it gets (re)set each time
before starting the pipeline.
I've also written a patch fixing the underlying cause, but since the
workaround is simple, and has no adverse effects when the underlying
issue is fixed, it seems a good idea to have this workaround in Cheese,
see here for the gst-plugins-bad fix:
https://bugzilla.gnome.org/show_bug.cgi?id=701915
Signed-off-by: Hans de Goede <hdegoede redhat com>
libcheese/cheese-camera.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index e88a44e..8a82406 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -424,7 +424,7 @@ cheese_camera_set_camera_source (CheeseCamera *camera)
priv->video_source = gst_parse_bin_from_description (camera_input, TRUE, &err);
g_free (camera_input);
- if (priv->video_source == NULL || priv->camera_source == NULL)
+ if (priv->video_source == NULL)
{
if (err != NULL)
{
@@ -433,7 +433,6 @@ cheese_camera_set_camera_source (CheeseCamera *camera)
}
return FALSE;
}
- g_object_set (priv->camera_source, "video-source", priv->video_source, NULL);
return TRUE;
}
@@ -770,6 +769,7 @@ cheese_camera_play (CheeseCamera *camera)
{
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
cheese_camera_set_new_caps (camera);
+ g_object_set (priv->camera_source, "video-source", priv->video_source, NULL);
gst_element_set_state (priv->camerabin, GST_STATE_PLAYING);
priv->pipeline_is_playing = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]