From a33eae1a659ea8eb2c104a63c45c7c2e81243f9d Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Wed, 22 Jun 2011 15:56:26 -0300 Subject: [PATCH] camerabin2: No need to change state of the whole image branch We only need to change the state of the filesink to switch its saving location. This might still cause some problems of dropping captured buffers, but it is better than changing the state of the whole branch. --- gst/camerabin2/gstcamerabin2.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index f69b3d350d..10a996c535 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -325,17 +325,11 @@ gst_camera_bin_src_notify_readyforcapture (GObject * obj, GParamSpec * pspec, gst_element_set_state (camera->videobin_queue, GST_STATE_PLAYING); } else if (camera->mode == MODE_IMAGE) { gst_element_set_state (camera->imagesink, GST_STATE_NULL); - gst_element_set_state (camera->image_encodebin, GST_STATE_NULL); - gst_element_set_state (camera->imagebin_queue, GST_STATE_NULL); - gst_element_set_state (camera->imagebin_capsfilter, GST_STATE_NULL); GST_DEBUG_OBJECT (camera, "Switching imagebin location to %s", camera->image_location); g_object_set (camera->imagesink, "location", camera->image_location, NULL); gst_element_set_state (camera->imagesink, GST_STATE_PLAYING); - gst_element_set_state (camera->image_encodebin, GST_STATE_PLAYING); - gst_element_set_state (camera->imagebin_capsfilter, GST_STATE_PLAYING); - gst_element_set_state (camera->imagebin_queue, GST_STATE_PLAYING); } }