72fda1db9df4fa1a8337035f75db7f5d637bc0bf
[platform/upstream/gstreamer.git] / gst-libs / gst / interfaces / photography.c
1 /* GStreamer
2  *
3  * Copyright (C) 2008 Nokia Corporation <multimedia@maemo.org>
4  *
5  * photography.c: photography interface for digital imaging
6  *
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23
24 #ifdef HAVE_CONFIG_H
25 #include "config.h"
26 #endif
27
28 #include "photography.h"
29
30 /**
31  * SECTION:gstphotography
32  * @short_description: Interface for digital image capture elements
33  * @stability: Unstable
34  *
35  * The interface allows access to some common digital image capture parameters.
36  *
37  * > The GstPhotography interface is unstable API and may change in future.
38  * > One can define GST_USE_UNSTABLE_API to acknowledge and avoid this warning.
39  */
40
41 static void gst_photography_iface_base_init (GstPhotographyInterface * iface);
42 static void gst_photography_iface_class_init (gpointer g_class);
43
44 GType
45 gst_photography_get_type (void)
46 {
47   static GType gst_photography_type = 0;
48
49   if (!gst_photography_type) {
50     static const GTypeInfo gst_photography_info = {
51       sizeof (GstPhotographyInterface),
52       (GBaseInitFunc) gst_photography_iface_base_init,  /* base_init */
53       NULL,                     /* base_finalize */
54       (GClassInitFunc) gst_photography_iface_class_init,        /* class_init */
55       NULL,                     /* class_finalize */
56       NULL,                     /* class_data */
57       0,
58       0,                        /* n_preallocs */
59       NULL,                     /* instance_init */
60     };
61
62     gst_photography_type = g_type_register_static (G_TYPE_INTERFACE,
63         "GstPhotography", &gst_photography_info, 0);
64   }
65
66   return gst_photography_type;
67 }
68
69 static void
70 gst_photography_iface_base_init (GstPhotographyInterface * iface)
71 {
72   /* default virtual functions */
73   iface->get_ev_compensation = NULL;
74   iface->get_iso_speed = NULL;
75   iface->get_aperture = NULL;
76   iface->get_exposure = NULL;
77   iface->get_white_balance_mode = NULL;
78   iface->get_color_tone_mode = NULL;
79   iface->get_scene_mode = NULL;
80   iface->get_flash_mode = NULL;
81   iface->get_noise_reduction = NULL;
82   iface->get_zoom = NULL;
83   iface->get_flicker_mode = NULL;
84   iface->get_focus_mode = NULL;
85
86   iface->set_ev_compensation = NULL;
87   iface->set_iso_speed = NULL;
88   iface->set_aperture = NULL;
89   iface->set_exposure = NULL;
90   iface->set_white_balance_mode = NULL;
91   iface->set_color_tone_mode = NULL;
92   iface->set_scene_mode = NULL;
93   iface->set_flash_mode = NULL;
94   iface->set_noise_reduction = NULL;
95   iface->set_zoom = NULL;
96   iface->set_flicker_mode = NULL;
97   iface->set_focus_mode = NULL;
98
99   iface->get_capabilities = NULL;
100   iface->prepare_for_capture = NULL;
101   iface->set_autofocus = NULL;
102   iface->set_config = NULL;
103   iface->get_config = NULL;
104 }
105
106 #define GST_PHOTOGRAPHY_FUNC_TEMPLATE(function_name, param_type) \
107 gboolean \
108 gst_photography_set_ ## function_name (GstPhotography * photo, param_type param) \
109 { \
110   GstPhotographyInterface *iface; \
111   g_return_val_if_fail (photo != NULL, FALSE); \
112   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); \
113   if (iface->set_ ## function_name) { \
114     return iface->set_ ## function_name (photo, param); \
115   } \
116   return FALSE; \
117 } \
118 gboolean \
119 gst_photography_get_ ## function_name (GstPhotography * photo, param_type * param) \
120 { \
121   GstPhotographyInterface *iface; \
122   g_return_val_if_fail (photo != NULL, FALSE); \
123   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo); \
124   if (iface->get_ ## function_name) { \
125     return iface->get_ ## function_name (photo, param); \
126   } \
127   return FALSE; \
128 }
129
130
131 /**
132  * gst_photography_set_ev_compensation:
133  * @photo: #GstPhotography interface of a #GstElement
134  * @ev_comp: ev compensation value to set
135  *
136  * Set the ev compensation value for the #GstElement
137  *
138  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
139  */
140 /**
141  * gst_photography_get_ev_compensation:
142  * @photo: #GstPhotography interface of a #GstElement
143  * @ev_comp: ev compensation value to get
144  *
145  * Get the ev compensation value for the #GstElement
146  *
147  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
148  */
149 GST_PHOTOGRAPHY_FUNC_TEMPLATE (ev_compensation, gfloat);
150
151 /**
152  * gst_photography_set_iso_speed:
153  * @photo: #GstPhotography interface of a #GstElement
154  * @iso_speed: ISO speed value to set
155  *
156  * Set the ISO value (light sensivity) for the #GstElement
157  *
158  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
159  */
160 /**
161  * gst_photography_get_iso_speed:
162  * @photo: #GstPhotography interface of a #GstElement
163  * @iso_speed: ISO speed value to get
164  *
165  * Get the ISO value (light sensivity) for the #GstElement
166  *
167  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
168  */
169 GST_PHOTOGRAPHY_FUNC_TEMPLATE (iso_speed, guint);
170
171 /**
172  * gst_photography_set_aperture:
173  * @photo: #GstPhotography interface of a #GstElement
174  * @aperture: aperture value to set
175  *
176  * Set the aperture value for the #GstElement
177  *
178  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
179  */
180 /**
181  * gst_photography_get_aperture:
182  * @photo: #GstPhotography interface of a #GstElement
183  * @aperture: aperture value to get
184  *
185  * Get the aperture value for the #GstElement
186  *
187  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
188  */
189 GST_PHOTOGRAPHY_FUNC_TEMPLATE (aperture, guint);
190
191 /**
192  * gst_photography_set_exposure:
193  * @photo: #GstPhotography interface of a #GstElement
194  * @exposure: exposure time to set
195  *
196  * Set the fixed exposure time (in us) for the #GstElement
197  *
198  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
199  */
200 /**
201  * gst_photography_get_exposure:
202  * @photo: #GstPhotography interface of a #GstElement
203  * @exposure: exposure time to get
204  *
205  * Get the fixed exposure time (in us) for the #GstElement
206  *
207  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
208  */
209 GST_PHOTOGRAPHY_FUNC_TEMPLATE (exposure, guint32);
210
211 /**
212  * gst_photography_set_white_balance_mode:
213  * @photo: #GstPhotography interface of a #GstElement
214  * @wb_mode: #GstPhotographyWhiteBalanceMode to set
215  *
216  * Set the white balance mode for the #GstElement
217  *
218  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
219  */
220 /**
221  * gst_photography_get_white_balance_mode:
222  * @photo: #GstPhotography interface of a #GstElement
223  * @wb_mode: #GstPhotographyWhiteBalanceMode to get
224  *
225  * Get the white balance mode for the #GstElement
226  *
227  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
228  */
229 GST_PHOTOGRAPHY_FUNC_TEMPLATE (white_balance_mode,
230     GstPhotographyWhiteBalanceMode);
231
232 /**
233  * gst_photography_set_color_tone_mode:
234  * @photo: #GstPhotography interface of a #GstElement
235  * @tone_mode: #GstPhotographyColorToneMode to set
236  *
237  * Set the color tone mode for the #GstElement
238  *
239  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
240  */
241 /**
242  * gst_photography_get_color_tone_mode:
243  * @photo: #GstPhotography interface of a #GstElement
244  * @tone_mode: #GstPhotographyColorToneMode to get
245  *
246  * Get the color tone mode for the #GstElement
247  *
248  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
249  */
250 GST_PHOTOGRAPHY_FUNC_TEMPLATE (color_tone_mode, GstPhotographyColorToneMode);
251
252 /**
253  * gst_photography_set_scene_mode:
254  * @photo: #GstPhotography interface of a #GstElement
255  * @scene_mode: #GstPhotographySceneMode to set
256  *
257  * Set the scene mode for the #GstElement
258  *
259  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
260  */
261 /**
262  * gst_photography_get_scene_mode:
263  * @photo: #GstPhotography interface of a #GstElement
264  * @scene_mode: #GstPhotographySceneMode to get
265  *
266  * Get the scene mode for the #GstElement
267  *
268  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
269  */
270 GST_PHOTOGRAPHY_FUNC_TEMPLATE (scene_mode, GstPhotographySceneMode);
271
272 /**
273  * gst_photography_set_flash_mode:
274  * @photo: #GstPhotography interface of a #GstElement
275  * @flash_mode: #GstPhotographyFlashMode to set
276  *
277  * Set the flash mode for the #GstElement
278  *
279  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
280  */
281 /**
282  * gst_photography_get_flash_mode:
283  * @photo: #GstPhotography interface of a #GstElement
284  * @flash_mode: #GstPhotographyFlashMode to get
285  *
286  * Get the flash mode for the #GstElement
287  *
288  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
289  */
290 GST_PHOTOGRAPHY_FUNC_TEMPLATE (flash_mode, GstPhotographyFlashMode);
291
292 /**
293  * gst_photography_set_noise_reduction:
294  * @photo: #GstPhotography interface of a #GstElement
295  * @noise_reduction: #GstPhotographyNoiseReductionMode to set
296  *
297  * Set the noise reduction mode for the #GstElement
298  *
299  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
300  */
301 /**
302  * gst_photography_get_noise_reduction:
303  * @photo: #GstPhotography interface of a #GstElement
304  * @noise_reduction: #GstPhotographyNoiseReductionMode to get
305  *
306  * Get the noise reduction mode for the #GstElement
307  *
308  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
309  */
310 GST_PHOTOGRAPHY_FUNC_TEMPLATE (noise_reduction, GstPhotographyNoiseReduction);
311
312 /**
313  * gst_photography_set_zoom:
314  * @photo: #GstPhotography interface of a #GstElement
315  * @zoom: zoom value to set
316  *
317  * Set the zoom value for the #GstElement.
318  * E.g. 1.0 to get original image and 3.0 for 3x zoom and so on.
319  *
320  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
321  */
322 /**
323  * gst_photography_get_zoom:
324  * @photo: #GstPhotography interface of a #GstElement
325  * @zoom: zoom value to get
326  *
327  * Get the zoom value for the #GstElement
328  *
329  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
330  */
331 GST_PHOTOGRAPHY_FUNC_TEMPLATE (zoom, gfloat);
332
333 /**
334  * gst_photography_set_flicker_mode:
335  * @photo: #GstPhotography interface of a #GstElement
336  * @flicker_mode: flicker mode value to set
337  *
338  * Set the flicker mode value for the #GstElement.
339  *
340  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
341  */
342 /**
343  * gst_photography_get_flicker_mode:
344  * @photo: #GstPhotography interface of a #GstElement
345  * @flicker_mode: flicker mode value to get
346  *
347  * Get the flicker mode value for the #GstElement
348  *
349  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
350  */
351 GST_PHOTOGRAPHY_FUNC_TEMPLATE (flicker_mode,
352     GstPhotographyFlickerReductionMode);
353
354 /**
355  * gst_photography_set_focus_mode:
356  * @photo: #GstPhotography interface of a #GstElement
357  * @focus_mode: focus mode value to set
358  *
359  * Set the focus mode value for the #GstElement.
360  *
361  * Returns: %TRUE if setting the value succeeded, %FALSE otherwise
362  */
363 /**
364  * gst_photography_get_focus_mode:
365  * @photo: #GstPhotography interface of a #GstElement
366  * @focus_mode: focus_mode value to get
367  *
368  * Get the focus mode value for the #GstElement
369  *
370  * Returns: %TRUE if getting the value succeeded, %FALSE otherwise
371  */
372 GST_PHOTOGRAPHY_FUNC_TEMPLATE (focus_mode, GstPhotographyFocusMode);
373
374 /**
375  * gst_photography_get_capabilities:
376  * @photo: #GstPhotography interface of a #GstElement
377  *
378  * Get #GstPhotographyCaps bitmask value that indicates what photography
379  * interface features the #GstElement supports
380  *
381  * Returns: #GstPhotographyCaps value
382  */
383 GstPhotographyCaps
384 gst_photography_get_capabilities (GstPhotography * photo)
385 {
386   GstPhotographyInterface *iface;
387   g_return_val_if_fail (photo != NULL, GST_PHOTOGRAPHY_CAPS_NONE);
388
389   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo);
390   if (iface->get_capabilities) {
391     return iface->get_capabilities (photo);
392   } else {
393     return GST_PHOTOGRAPHY_CAPS_NONE;
394   }
395 }
396
397 /**
398  * gst_photography_prepare_for_capture:
399  * @photo: #GstPhotography interface of a #GstElement
400  * @func: callback that is called after capturing has been prepared
401  * @capture_caps: #GstCaps defining the desired format of the captured image
402  * @user_data: user data that will be passed to the callback @func
403  *
404  * Start preparations for capture. Preparations can take indeterminate
405  * amount of time and @func callback is called after preparations are
406  * done. Image capture will begin after callback returns.
407  *
408  * Returns: %TRUE if preparations were started (caps were OK), otherwise %FALSE.
409  */
410 gboolean
411 gst_photography_prepare_for_capture (GstPhotography * photo,
412     GstPhotographyCapturePrepared func, GstCaps * capture_caps,
413     gpointer user_data)
414 {
415   GstPhotographyInterface *iface;
416   gboolean ret = TRUE;
417
418   g_return_val_if_fail (photo != NULL, FALSE);
419
420   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo);
421   if (iface->prepare_for_capture) {
422     ret = iface->prepare_for_capture (photo, func, capture_caps, user_data);
423   }
424
425   return ret;
426 }
427
428 /**
429  * gst_photography_set_autofocus:
430  * @photo: #GstPhotography interface of a #GstElement
431  * @on: %TRUE to start autofocusing, %FALSE to stop autofocusing
432  *
433  * Start or stop autofocusing. %GST_PHOTOGRAPHY_AUTOFOCUS_DONE
434  * message is posted to bus when autofocusing has finished.
435  */
436 void
437 gst_photography_set_autofocus (GstPhotography * photo, gboolean on)
438 {
439   GstPhotographyInterface *iface;
440   g_return_if_fail (photo != NULL);
441
442   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo);
443   if (iface->set_autofocus) {
444     iface->set_autofocus (photo, on);
445   }
446 }
447
448 /**
449  * gst_photography_set_config:
450  * @photo: #GstPhotography interface of a #GstElement
451  * @config: #GstPhotographySettings containg the configuration
452  *
453  * Set all configuration settings at once.
454  *
455  * Returns: TRUE if configuration was set successfully, otherwise FALSE.
456  */
457 gboolean
458 gst_photography_set_config (GstPhotography * photo,
459     GstPhotographySettings * config)
460 {
461   GstPhotographyInterface *iface;
462   gboolean ret = FALSE;
463
464   g_return_val_if_fail (photo != NULL, FALSE);
465
466   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo);
467   if (iface->set_config) {
468     ret = iface->set_config (photo, config);
469   }
470
471   return ret;
472 }
473
474 /**
475  * gst_photography_get_config:
476  * @photo: #GstPhotography interface of a #GstElement
477  * @config: #GstPhotographySettings containg the configuration
478  *
479  * Get all configuration settings at once.
480  *
481  * Returns: TRUE if configuration was got successfully, otherwise FALSE.
482  */
483 gboolean
484 gst_photography_get_config (GstPhotography * photo,
485     GstPhotographySettings * config)
486 {
487   GstPhotographyInterface *iface;
488   gboolean ret = FALSE;
489
490   g_return_val_if_fail (photo != NULL, FALSE);
491
492   iface = GST_PHOTOGRAPHY_GET_INTERFACE (photo);
493   if (iface->get_config) {
494     ret = iface->get_config (photo, config);
495   }
496
497   return ret;
498 }
499
500 /* Photography class initialization stuff */
501 static void
502 gst_photography_iface_class_init (gpointer g_class)
503 {
504   /* create interface signals and properties here. */
505
506   /* White balance */
507   g_object_interface_install_property (g_class,
508       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_WB_MODE,
509           "White balance mode property",
510           "White balance affects the color temperature of the photo",
511           GST_TYPE_PHOTOGRAPHY_WHITE_BALANCE_MODE,
512           GST_PHOTOGRAPHY_WB_MODE_AUTO,
513           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
514
515   /* Color tone */
516   g_object_interface_install_property (g_class,
517       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_COLOR_TONE,
518           "Color tone mode property",
519           "Color tone setting changes color shading in the photo",
520           GST_TYPE_PHOTOGRAPHY_COLOR_TONE_MODE,
521           GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL,
522           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
523
524   /* Scene mode */
525   g_object_interface_install_property (g_class,
526       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_SCENE_MODE,
527           "Scene mode property",
528           "Scene mode works as a preset for different photo shooting mode settings",
529           GST_TYPE_PHOTOGRAPHY_SCENE_MODE,
530           GST_PHOTOGRAPHY_SCENE_MODE_AUTO,
531           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
532
533   /* Flash mode */
534   g_object_interface_install_property (g_class,
535       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLASH_MODE,
536           "Flash mode property",
537           "Flash mode defines how the flash light should be used",
538           GST_TYPE_PHOTOGRAPHY_FLASH_MODE,
539           GST_PHOTOGRAPHY_FLASH_MODE_AUTO,
540           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
541
542   /* Flicker reduction mode */
543   g_object_interface_install_property (g_class,
544       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLICKER_MODE,
545           "Flicker reduction mode property",
546           "Flicker reduction mode defines a line frequency for flickering prevention",
547           GST_TYPE_PHOTOGRAPHY_FLICKER_REDUCTION_MODE,
548           GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF,
549           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
550
551   /* Focus mode */
552   g_object_interface_install_property (g_class,
553       g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FOCUS_MODE,
554           "Focus mode property",
555           "Focus mode defines the range of focal lengths to use in autofocus search",
556           GST_TYPE_PHOTOGRAPHY_FOCUS_MODE,
557           GST_PHOTOGRAPHY_FOCUS_MODE_AUTO,
558           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
559
560   /* Capabilities */
561   g_object_interface_install_property (g_class,
562       g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES,
563           "Photo capabilities bitmask",
564           "Tells the photo capabilities of the device",
565           0, G_MAXULONG, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
566
567   /* EV_compensation */
568   g_object_interface_install_property (g_class,
569       g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP,
570           "EV compensation property",
571           "EV compensation affects the brightness of the image",
572           -2.5, 2.5, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
573
574   /* ISO value */
575   g_object_interface_install_property (g_class,
576       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED,
577           "ISO speed property",
578           "ISO speed defines the light sensitivity (0 = auto)",
579           0, 6400, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
580
581   /* Aperture */
582   g_object_interface_install_property (g_class,
583       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE,
584           "Aperture property",
585           "Aperture defines the size of lens opening  (0 = auto)",
586           0, G_MAXUINT8, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
587
588   /* Exposure */
589   g_object_interface_install_property (g_class,
590       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME,
591           "Exposure time in milliseconds",
592           "Exposure time defines how long the shutter will stay open (0 = auto)",
593           0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
594
595   /**
596    * GstPhotography:image-capture-supported-caps:
597    *
598    * Query caps that describe supported formats for image capture. Sometimes
599    * element may support different formats for image capture than for video
600    * streaming.
601    */
602   g_object_interface_install_property (g_class,
603       g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS,
604           "Image capture supported caps",
605           "Caps describing supported image capture formats", GST_TYPE_CAPS,
606           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
607
608   /**
609    * GstPhotography:image-preview-supported-caps:
610    *
611    * Query caps that describe supported formats for preview image. Sometimes
612    * element may support different formats for preview image than for video
613    * streaming.
614    */
615   g_object_interface_install_property (g_class,
616       g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS,
617           "Image preview supported caps",
618           "Caps describing supported image preview formats", GST_TYPE_CAPS,
619           G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
620
621   /* Zoom */
622   g_object_interface_install_property (g_class,
623       g_param_spec_float (GST_PHOTOGRAPHY_PROP_ZOOM,
624           "Zoom property",
625           "How much the resulted image will be zoomed",
626           1.0f, 10.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
627
628   /**
629    * GstPhotography:color-temperature:
630    *
631    * Color temperature parameter for manual white balance.
632    * Control color temperature in Kelvin units.
633    */
634   g_object_interface_install_property (g_class,
635       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE,
636           "Color temperature in Kelvin units",
637           "Color temperature in Kelvin units for manual white balance",
638           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
639
640   /**
641    * GstPhotography:white-point:
642    *
643    * White point parameter for manual white balance.
644    * Describes the color "white" as raw values.
645    *
646    * FIXME: check and document correct representation for white point
647    */
648   g_object_interface_install_property (g_class,
649       g_param_spec_value_array (GST_PHOTOGRAPHY_PROP_WHITE_POINT,
650           "White point",
651           "Describe color white as raw values",
652           g_param_spec_uint ("raw-value", "Raw value",
653               "Raw value", 0, G_MAXUINT, 0,
654               G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
655           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
656
657   /**
658    * GstPhotography:analog-gain:
659    *
660    * Linear multiplicative value how much amplification is applied to the signal
661    * before A-D conversion.
662    */
663   g_object_interface_install_property (g_class,
664       g_param_spec_float (GST_PHOTOGRAPHY_PROP_ANALOG_GAIN,
665           "Analog gain applied to the sensor",
666           "Analog gain applied to the sensor",
667           1.0f, G_MAXFLOAT, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
668
669   /**
670    * GstPhotography:lens-focus:
671    *
672    * Manual changing of lens focus in diopter units.
673    * Inteded use with GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL focus mode, otherwise
674    * to be ignored.
675    *
676    */
677   g_object_interface_install_property (g_class,
678       g_param_spec_float (GST_PHOTOGRAPHY_PROP_LENS_FOCUS,
679           "Manual lens focus",
680           "Focus point in diopter units",
681           0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
682
683   /**
684    * GstPhotography:min-exposure-time:
685    *
686    * Minimum exposure time for automatic exposure mode.
687    */
688   g_object_interface_install_property (g_class,
689       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME,
690           "Minimum exposure time",
691           "Minimum exposure time for automatic exposure mode",
692           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
693
694   /**
695    * GstPhotography:max-exposure-time:
696    *
697    * Maximum exposure time for automatic exposure mode.
698    */
699   g_object_interface_install_property (g_class,
700       g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME,
701           "Maximum exposure time",
702           "Maximum exposure time for automatic exposure mode",
703           0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
704
705   /* Noise Reduction, Bayer an YCC noise reduction are enabled by default */
706   g_object_interface_install_property (g_class,
707       g_param_spec_flags (GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION,
708           "Noise Reduction settings",
709           "Which noise reduction modes are enabled (0 = disabled)",
710           GST_TYPE_PHOTOGRAPHY_NOISE_REDUCTION,
711           0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
712 }