GNOME Bugzilla – Bug 614958
[camerabin] Replace actions with properties for setting parameters
Last modified: 2010-04-14 12:18:28 UTC
Currently camerabin has 'set-image-resolution' and 'set-video-resolution-fps' for setting the image/video capture parameters. Those doesn't allow getting the currently set values. Using properties here is a better approach, as it allows getting the values too. One downside is that the caps creation and the procedures that were already done at the action will now be delayed to the capture start function. I don't think it will add much overhead, but if it does we can think of alternatives as having a 'prepare-capture' action.
Created attachment 158042 [details] [review] camerabin: Adds image-capture-width/height properties Adds image-capture-width and image-capture-height properties to camerabin, allowing the user to get/set them. Getting was not possible before and setting was done through the set-image-resolution action, which shouldn't be used anymore. Fixes #614958
Created attachment 158043 [details] [review] camerabin: Add video-capture-width height and framerate properties Adds video-capture-width, video-capture-height and video-capture-framerate properties to allow applications to get/set those values. Getting was not possible before this patch, and setting was done through the set-video-resolution-fps action, which is now deprecated. Fixes #614958
(In reply to comment #0) > One downside is that the caps creation and the procedures that were already > done at the action will now be delayed to the capture start function. I don't > think it will add much overhead, but if it does we can think of alternatives as > having a 'prepare-capture' action. It would be good if changing video resolution and fps was also possible when not capturing video, i.e. when running viewfinder only. So people could see the how the scene looks like first (in correct aspect ratio) and then start capture.
(In reply to comment #3) > (In reply to comment #0) > > One downside is that the caps creation and the procedures that were already > > done at the action will now be delayed to the capture start function. I don't > > think it will add much overhead, but if it does we can think of alternatives as > > having a 'prepare-capture' action. > > It would be good if changing video resolution and fps was also possible when > not capturing video, i.e. when running viewfinder only. So people could see the > how the scene looks like first (in correct aspect ratio) and then start > capture. The same applies for images, right? One problem here is that properties are set one after another and I don't think is optimal to update viewfinder after each property set. Maybe we should add an action signal for forcing updating the caps? Or maybe being more generic and preparing for capture in general?
Created attachment 158659 [details] [review] camerabin: Adds image-capture-width/height properties Updated patch for latest -bad tree
Created attachment 158660 [details] [review] camerabin: Add video-capture-width/height/framerate properties Updated patch for latest -bad tree
Pushed these patches that make the old signals still work the same way, while adding the properties for getting the values. Module: gst-plugins-bad Branch: master Commit: fa6adc85b46efbe78998b9add82289efbd192bf0 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=fa6adc85b46efbe78998b9add82289efbd192bf0 Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk> Date: Tue Apr 13 18:33:40 2010 -0300 camerabin: Adds image-capture-width/height properties Adds image-capture-width and image-capture-height properties to camerabin, allowing the user to get/set them. Getting was not possible before and setting was done through the set-image-resolution action, which shouldn't now just set the properties. Fixes #614958 Module: gst-plugins-bad Branch: master Commit: c48de5c594a090432cb520596273fc620ea1120e URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c48de5c594a090432cb520596273fc620ea1120e Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk> Date: Tue Apr 13 20:32:50 2010 -0300 camerabin: Add video-capture-width/height/framerate properties Adds video-capture-width, video-capture-height and video-capture-framerate properties to allow applications to get/set those values. Getting was not possible before this patch, and setting was done through the set-video-resolution-fps action, which sets the properties and promptly resets the video source to use them. Fixes #614958
There is also Bug #614487 that was setting the camerasrc to NULL instead of setting camerabin to READY when changing the caps (see reset_video_capture_caps() ). Maybe it even needs both.