summaryrefslogtreecommitdiff
path: root/gst/camerabin2/gstwrappercamerabinsrc.c
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-04-24 14:16:24 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-04-24 15:12:46 -0300
commit7b834cb0b36c47970999b2f33c9da912dbbbc722 (patch)
tree9fa4de7ee2b3ba465bab0f6aa2192aa223a07992 /gst/camerabin2/gstwrappercamerabinsrc.c
parent0c04f2f0ff4edad1513fb2600afc83760603937d (diff)
downloadgstreamer-plugins-bad-7b834cb0b36c47970999b2f33c9da912dbbbc722.tar.gz
wrappercamerabinsrc: error out if source fails to prepare for capture
Post an error when preparing the image capture through photography interface fails
Diffstat (limited to 'gst/camerabin2/gstwrappercamerabinsrc.c')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 84ff3887c..289febad7 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -824,13 +824,16 @@ start_image_capture (GstPad * pad, GstPadProbeInfo * info, gpointer udata)
}
if (photography) {
- gst_element_set_state (self->src_vid_src, GST_STATE_PLAYING);
GST_DEBUG_OBJECT (self, "prepare image capture caps %" GST_PTR_FORMAT,
self->image_capture_caps);
if (!gst_photography_prepare_for_capture (photography,
(GstPhotographyCapturePrepared) img_capture_prepared,
- self->image_capture_caps, self))
- self->image_capture_count = 0; /* TODO post an error */
+ self->image_capture_caps, self)) {
+ GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
+ ("Failed to prepare image capture"),
+ ("Prepare capture call didn't succeed for the given caps"));
+ self->image_capture_count = 0;
+ }
gst_object_unref (photography);
} else {
gst_wrapper_camera_bin_reset_video_src_caps (self,