After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641530 - Camerabin should capture image if preview_caps is set even if filename is not set
Camerabin should capture image if preview_caps is set even if filename is not...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 641918
 
 
Reported: 2011-02-04 18:42 UTC by Luciana Fujii
Modified: 2011-02-09 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Take picture when preview_caps is set even if filename is NULL (2.00 KB, patch)
2011-02-04 18:42 UTC, Luciana Fujii
committed Details | Review

Description Luciana Fujii 2011-02-04 18:42:05 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.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-08 20:02:51 UTC
Makes sense. I'll push it after some testing.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-08 20:05:12 UTC
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?
Comment 3 Luciana Fujii 2011-02-08 20:13:55 UTC
(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.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-09 11:45:48 UTC
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.