summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-10-21 16:06:08 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-10-21 16:43:45 -0300
commit0999fdb82a659b1efa1a7a6f0d9a218ef2afa31e (patch)
tree409bde794ec42e0f83317fd88ee481124943d46e
parent90b4ce0b80ddc4340cecc595233e09ef2c76cc9a (diff)
camerabin: Check the source scene mode when creating it
As camerabin only gets notified of the changes from the video source element, it should query the initial value once the source is created so it initializes itself correctly.
-rw-r--r--gst/camerabin/gstcamerabin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c
index 000b69d35..6984acd05 100644
--- a/gst/camerabin/gstcamerabin.c
+++ b/gst/camerabin/gstcamerabin.c
@@ -2552,11 +2552,16 @@ gst_camerabin_monitor_video_source_properties (GstCameraBin * camera)
if (GST_IS_ELEMENT (camera->src_vid_src) &&
gst_element_implements_interface (camera->src_vid_src,
GST_TYPE_PHOTOGRAPHY)) {
+ gint scene_mode;
GST_DEBUG_OBJECT (camera,
"connecting to %" GST_PTR_FORMAT " - notify::scene-mode",
camera->src_vid_src);
g_signal_connect (G_OBJECT (camera->src_vid_src), "notify::scene-mode",
(GCallback) gst_camerabin_scene_mode_notify_cb, camera);
+ g_object_get (G_OBJECT (camera->src_vid_src), "scene-mode", &scene_mode,
+ NULL);
+ camera->night_mode = scene_mode == GST_PHOTOGRAPHY_SCENE_MODE_NIGHT;
+
GST_DEBUG_OBJECT (camera,
"connecting to %" GST_PTR_FORMAT " - notify::zoom",
camera->src_vid_src);