GNOME Bugzilla – Bug 641530
Camerabin should capture image if preview_caps is set even if filename is not set
Last modified: 2011-02-09 11:57:53 UTC
Created attachment 180100 [details] [review] Take picture when preview_caps is set even if filename is NULL The preview message sent in the bus after a photo is taken can be used by applications, for instance, to edit the photo before saving. It would be nice if camerabin could take the picture and send the preview image even if the filename was not set. This way, applications would not have to save and image just to receive the preview image or use workarounds like setting filename to /dev/null.
Makes sense. I'll push it after some testing.
Review of attachment 180100 [details] [review]: ::: gst/camerabin/gstcamerabin.c @@ +4049,3 @@ + + if (g_str_equal (camera->filename->str, "")) + if (camera->active_bin == camera->vidbin || !camera->preview_caps) { why only in video-mode?
(In reply to comment #2) > Review of attachment 180100 [details] [review]: > > ::: gst/camerabin/gstcamerabin.c > @@ +4049,3 @@ > + > + if (g_str_equal (camera->filename->str, "")) > + if (camera->active_bin == camera->vidbin || !camera->preview_caps) { > > why only in video-mode? Thanks for your comments. If camerabin is in video-mode, than it should always fail if filename is not set, since preview-caps only affects image-mode. If camerabin is in image-mode it should only fail if preview-caps is not set. That is what being tested there. I tried to add a comment to make it more clear, because I know the code is not that nice to read.
commit fa45b1fe2d6a2613a3972b10d9595558cd521607 Author: Luciana Fujii Pontello <luciana@fujii.eti.br> Date: Fri Feb 4 01:00:55 2011 -0200 camerabin: Always take photo when preview-caps is set When filename is not set, but preview-caps is set, take the photo and send its preview.