|
|
ecdf9b |
From 62d880a4f15b2a4ccf84c7078b9c7232b27cd228 Mon Sep 17 00:00:00 2001
|
|
|
ecdf9b |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
ecdf9b |
Date: Mon, 10 Jun 2013 10:26:39 +0200
|
|
|
ecdf9b |
Subject: [PATCH 04/35] cheese-camera: Fix the no video after switching
|
|
|
ecdf9b |
resolution problem
|
|
|
ecdf9b |
|
|
|
ecdf9b |
There is a bug in wrappercamerabinsrc which causes it to loose its video-source
|
|
|
ecdf9b |
setting after the pipeline has started, so on a stop / re-start, as we
|
|
|
ecdf9b |
do when changing resolution, its video-source has become NULL, and we no
|
|
|
ecdf9b |
longer have video.
|
|
|
ecdf9b |
|
|
|
ecdf9b |
This patch works around this by moving the setting of the video-source
|
|
|
ecdf9b |
property to cheese_camera_play(), so that it gets (re)set each time before
|
|
|
ecdf9b |
we start the pipeline.
|
|
|
ecdf9b |
|
|
|
ecdf9b |
I've also written a patch fixing the underlying cause, but since the workaround
|
|
|
ecdf9b |
is simple, and has no adverse effects when the underlying issue is fixed,
|
|
|
ecdf9b |
it seems a good idea to have this workaround in cheese, see here for the
|
|
|
ecdf9b |
gst-plugins-bad fix: https://bugzilla.gnome.org/show_bug.cgi?id=701915
|
|
|
ecdf9b |
|
|
|
ecdf9b |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
ecdf9b |
---
|
|
|
ecdf9b |
libcheese/cheese-camera.c | 4 ++--
|
|
|
ecdf9b |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ecdf9b |
|
|
|
ecdf9b |
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
|
|
|
ecdf9b |
index 9eeb245..b353152 100644
|
|
|
ecdf9b |
--- a/libcheese/cheese-camera.c
|
|
|
ecdf9b |
+++ b/libcheese/cheese-camera.c
|
|
|
ecdf9b |
@@ -424,7 +424,7 @@ cheese_camera_set_camera_source (CheeseCamera *camera)
|
|
|
ecdf9b |
priv->video_source = gst_parse_bin_from_description (camera_input, TRUE, &err;;
|
|
|
ecdf9b |
g_free (camera_input);
|
|
|
ecdf9b |
|
|
|
ecdf9b |
- if (priv->video_source == NULL || priv->camera_source == NULL)
|
|
|
ecdf9b |
+ if (priv->video_source == NULL)
|
|
|
ecdf9b |
{
|
|
|
ecdf9b |
if (err != NULL)
|
|
|
ecdf9b |
{
|
|
|
ecdf9b |
@@ -433,7 +433,6 @@ cheese_camera_set_camera_source (CheeseCamera *camera)
|
|
|
ecdf9b |
}
|
|
|
ecdf9b |
return FALSE;
|
|
|
ecdf9b |
}
|
|
|
ecdf9b |
- g_object_set (priv->camera_source, "video-source", priv->video_source, NULL);
|
|
|
ecdf9b |
|
|
|
ecdf9b |
return TRUE;
|
|
|
ecdf9b |
}
|
|
|
ecdf9b |
@@ -769,6 +768,7 @@ cheese_camera_play (CheeseCamera *camera)
|
|
|
ecdf9b |
{
|
|
|
ecdf9b |
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
|
|
|
ecdf9b |
cheese_camera_set_new_caps (camera);
|
|
|
ecdf9b |
+ g_object_set (priv->camera_source, "video-source", priv->video_source, NULL);
|
|
|
ecdf9b |
gst_element_set_state (priv->camerabin, GST_STATE_PLAYING);
|
|
|
ecdf9b |
priv->pipeline_is_playing = TRUE;
|
|
|
ecdf9b |
}
|
|
|
ecdf9b |
--
|
|
|
ecdf9b |
1.8.2.1
|
|
|
ecdf9b |
|