[gst-devel] Propose to add camera control settings to camera source element

Hu, Gang A gang.a.hu at intel.com
Wed Aug 11 06:10:29 CEST 2010


Hi,
I am proposing a way to add the camera control to the camera source element to turn on/off some feature in my camera.
These features need to be exposed to user application for control in my camera. Currently, there is no such controls setting in the v4l2src.

My propose is to add these control settings to photography interface and let the camera source element to implement the interface.
My current implementation is combining all these features to one guint type, and add "guint advanced_mode;" to the GstPhotoSettings.
I also defined one enum type to represent the features bit in advanced_mode.
191 typedef enum
192 {
193   GST_PHOTOGRAPHY_GDC = (1 << 0), /* Geometry distortion correction*/
194   GST_PHOTOGRAPHY_REDEYE = (1 << 1), /* Redeye reduction */
195   GST_PHOTOGRAPHY_CAC = (1 << 2),/* Chromatic Aberration Correction*/
196   GST_PHOTOGRAPHY_SHARPEN = (1 << 3),/* Edge enhancement */
197   GST_PHOTOGRAPHY_DEMOSAIC = (1 << 4), /* False Color Correction */
198   GST_PHOTOGRAPHY_DPC = (1 << 5), /*Defect Pixel Correction*/
199   GST_PHOTOGRAPHY_SHADING = (1 << 6), /*Shading Correction */
200   GST_PHOTOGRAPHY_BLACK_LEVEL = (1 << 7),/* Black level compensation */
201   GST_PHOTOGRAPHY_IMAGE_STABLE = (1 << 8),/* Digital Image Stabilization */
202       GST_PHOTOGRAPHY_VIDEO_STABLE = (1 << 9)/* VIDEO Stabilization */
203 } GstAdvancedMode;
More features can be added to the GstAdvancedMode to represent other features of the camera.

So the user can use the following sequence to turn on the red eye reduction feature in the camera.

guint adv;
get_advanced_mode(photo, &adv);
adv = adv | GST_PHOTOGRAPHY_REDEYE;
set_advanced_mode (photo, adv);

Any better idea to add the control to the camera source? Your comments are welcome.
If this propose is feasible, I will submit my patch later.

Best Regards!
Hu Gang



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100811/1efe52c1/attachment.htm>


More information about the gstreamer-devel mailing list