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 614958 - [camerabin] Replace actions with properties for setting parameters
[camerabin] Replace actions with properties for setting parameters
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 0.10.19
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-06 12:07 UTC by Thiago Sousa Santos
Modified: 2010-04-14 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
camerabin: Adds image-capture-width/height properties (5.51 KB, patch)
2010-04-06 12:09 UTC, Thiago Sousa Santos
none Details | Review
camerabin: Add video-capture-width height and framerate properties (10.37 KB, patch)
2010-04-06 12:10 UTC, Thiago Sousa Santos
none Details | Review
camerabin: Adds image-capture-width/height properties (6.17 KB, patch)
2010-04-13 23:49 UTC, Thiago Sousa Santos
committed Details | Review
camerabin: Add video-capture-width/height/framerate properties (10.08 KB, patch)
2010-04-13 23:51 UTC, Thiago Sousa Santos
committed Details | Review

Description Thiago Sousa Santos 2010-04-06 12:07:19 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.
Comment 1 Thiago Sousa Santos 2010-04-06 12:09:17 UTC
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
Comment 2 Thiago Sousa Santos 2010-04-06 12:10:21 UTC
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
Comment 3 Lasse Laukkanen 2010-04-07 11:37:45 UTC
(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.
Comment 4 Thiago Sousa Santos 2010-04-07 20:40:50 UTC
(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?
Comment 5 Thiago Sousa Santos 2010-04-13 23:49:40 UTC
Created attachment 158659 [details] [review]
camerabin: Adds image-capture-width/height properties

Updated patch for latest -bad tree
Comment 6 Thiago Sousa Santos 2010-04-13 23:51:19 UTC
Created attachment 158660 [details] [review]
camerabin: Add video-capture-width/height/framerate properties

Updated patch for latest -bad tree
Comment 7 Thiago Sousa Santos 2010-04-14 00:12:42 UTC
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
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2010-04-14 12:18:28 UTC
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.