update tizen 2.0 patches for camera interface 2.0alpha-wayland accepted/2.0alpha-wayland/20121212.175258 submit/2.0alpha-wayland/20121212.084523
authorYan Yin <yan.yin@intel.com>
Wed, 12 Dec 2012 08:33:11 +0000 (16:33 +0800)
committerYan Yin <yan.yin@intel.com>
Wed, 12 Dec 2012 08:43:28 +0000 (16:43 +0800)
Change-Id: I040b1f38c00b86c63010fedb09a0151b6cfb878a

gst-libs/gst/interfaces/cameracontrol.c
gst-libs/gst/interfaces/cameracontrol.h
gst-libs/gst/interfaces/cameracontrolchannel.c
gst-libs/gst/interfaces/cameracontrolchannel.h

index 56dc444..73ba697 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * GStreamer Camera Control
+ * GStreamer Camera Control Interface
  *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * Contact: Jeongmo Yang <jm80.yang@samsung.com>
  *
  *
  */
 
-/* ===========================================================================================
+/*============================================================================================
 EDIT HISTORY FOR MODULE
 
-       This section contains comments describing changes made to the module.
-       Notice that changes are listed in reverse chronological order.
+This section contains comments describing changes made to the module.
+Notice that changes are listed in reverse chronological order.
 
-when           who                                                     what, where, why
----------      ------------------------        ------------------------------------------------------
-12/09/08       jm80.yang@samsung.com           Created
+when            who                             what, where, why
+---------       ------------------------        ----------------------------------------------
+12/09/08        jm80.yang@samsung.com           Created
 
-=========================================================================================== */
+============================================================================================*/
 
 
 #ifdef HAVE_CONFIG_H
@@ -46,27 +46,24 @@ when                who                                                     what, where, why
  * @short_description: Interface for camera control
  */
 
-enum
-{
+enum {
        CONTROL_VALUE_CHANGED,
        CONTROL_LAST_SIGNAL
 };
 
-static void gst_camera_control_class_init( GstCameraControlClass *klass );
+static void gst_camera_control_class_init(GstCameraControlClass *klass);
 
 static guint gst_camera_control_signals[CONTROL_LAST_SIGNAL] = { 0 };
 
-GType
-gst_camera_control_get_type( void )
+GType gst_camera_control_get_type(void)
 {
        static GType gst_camera_control_type = 0;
 
-       if( !gst_camera_control_type )
-       {
+       if (!gst_camera_control_type) {
                static const GTypeInfo gst_camera_control_info =
                {
-                       sizeof( GstCameraControlClass ),
-                       (GBaseInitFunc) gst_camera_control_class_init,
+                       sizeof(GstCameraControlClass),
+                       (GBaseInitFunc)gst_camera_control_class_init,
                        NULL,
                        NULL,
                        NULL,
@@ -76,101 +73,98 @@ gst_camera_control_get_type( void )
                        NULL,
                };
 
-               gst_camera_control_type = g_type_register_static( G_TYPE_INTERFACE, "GstCameraControl", &gst_camera_control_info, 0 );
-               g_type_interface_add_prerequisite( gst_camera_control_type, GST_TYPE_IMPLEMENTS_INTERFACE );
+               gst_camera_control_type = g_type_register_static(G_TYPE_INTERFACE,
+                                                                "GstCameraControl",
+                                                                &gst_camera_control_info,
+                                                                0);
+               g_type_interface_add_prerequisite(gst_camera_control_type, GST_TYPE_IMPLEMENTS_INTERFACE);
        }
 
        return gst_camera_control_type;
 }
 
-static void
-gst_camera_control_class_init( GstCameraControlClass *klass )
+static void gst_camera_control_class_init(GstCameraControlClass *klass)
 {
        static gboolean initialized = FALSE;
 
-       if( !initialized )
-       {
+       if (!initialized) {
                gst_camera_control_signals[CONTROL_VALUE_CHANGED] =
-                       g_signal_new ( "control-value-changed",
-                                      GST_TYPE_CAMERA_CONTROL, G_SIGNAL_RUN_LAST,
-                                      G_STRUCT_OFFSET( GstCameraControlClass, value_changed ),
-                                      NULL, NULL,
-                                      gst_interfaces_marshal_VOID__OBJECT_INT,
-                                      G_TYPE_NONE, 2, GST_TYPE_CAMERA_CONTROL_CHANNEL, G_TYPE_INT);
+                       g_signal_new("control-value-changed",
+                                    GST_TYPE_CAMERA_CONTROL, G_SIGNAL_RUN_LAST,
+                                    G_STRUCT_OFFSET(GstCameraControlClass, value_changed),
+                                    NULL, NULL,
+                                    gst_interfaces_marshal_VOID__OBJECT_INT,
+                                    G_TYPE_NONE, 2, GST_TYPE_CAMERA_CONTROL_CHANNEL, G_TYPE_INT);
 
                initialized = TRUE;
        }
 
-       // TODO : 
-       klass->camera_control_type      = 0;
+       // TODO :
+       klass->camera_control_type = 0;
 
        /* defauld virtual functions */
-       klass->list_channels            = NULL;
-       klass->set_exposure                     = NULL;
-       klass->get_exposure                     = NULL;
-       klass->set_capture_mode         = NULL;
-       klass->get_capture_mode         = NULL;
-       klass->set_strobe                       = NULL;
-       klass->get_strobe                       = NULL;
-       klass->set_detect                       = NULL;
-       klass->get_detect                       = NULL;
-       klass->set_value                        = NULL;
-       klass->get_value                        = NULL;
-       klass->set_zoom                         = NULL;
-       klass->get_zoom                         = NULL;
-       klass->set_focus                        = NULL;
-       klass->get_focus                        = NULL;
-       klass->start_auto_focus         = NULL;
-       klass->stop_auto_focus          = NULL;
-       klass->set_focus_level          = NULL;
-       klass->get_focus_level          = NULL; 
-       klass->set_auto_focus_area      = NULL;
-       klass->get_auto_focus_area      = NULL;
-       klass->set_wdr                          = NULL;
-       klass->get_wdr                          = NULL; 
-       klass->set_ahs                          = NULL;
-       klass->get_ahs                          = NULL;
-       klass->set_part_color           = NULL;
-       klass->get_part_color           = NULL;
-       klass->get_exif_info        = NULL;
-       klass->set_capture_command      = NULL;
-}
-
-const GList*
-gst_camera_control_list_channels( GstCameraControl *control )
-{
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
-
-       if( klass->list_channels )
-       {
-               return klass->list_channels( control );
+       klass->list_channels = NULL;
+       klass->set_exposure = NULL;
+       klass->get_exposure = NULL;
+       klass->set_capture_mode = NULL;
+       klass->get_capture_mode = NULL;
+       klass->set_strobe = NULL;
+       klass->get_strobe = NULL;
+       klass->set_detect = NULL;
+       klass->get_detect = NULL;
+       klass->set_value = NULL;
+       klass->get_value = NULL;
+       klass->set_zoom  = NULL;
+       klass->get_zoom  = NULL;
+       klass->set_focus = NULL;
+       klass->get_focus = NULL;
+       klass->start_auto_focus = NULL;
+       klass->stop_auto_focus = NULL;
+       klass->set_focus_level = NULL;
+       klass->get_focus_level = NULL;
+       klass->set_auto_focus_area = NULL;
+       klass->get_auto_focus_area = NULL;
+       klass->set_wdr = NULL;
+       klass->get_wdr = NULL;
+       klass->set_ahs = NULL;
+       klass->get_ahs = NULL;
+       klass->set_part_color = NULL;
+       klass->get_part_color = NULL;
+       klass->get_exif_info = NULL;
+       klass->set_capture_command = NULL;
+       klass->start_face_zoom = NULL;
+       klass->stop_face_zoom = NULL;
+}
+
+const GList* gst_camera_control_list_channels(GstCameraControl *control)
+{
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
+
+       if (klass->list_channels) {
+               return klass->list_channels(control);
        }
 
        return NULL;
 }
 
 
-gboolean
-gst_camera_control_set_value( GstCameraControl *control, GstCameraControlChannel *control_channel )
+gboolean gst_camera_control_set_value(GstCameraControl *control, GstCameraControlChannel *control_channel)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_value )
-       {
-               return klass->set_value( control, control_channel );
+       if (klass->set_value) {
+               return klass->set_value(control, control_channel);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_value( GstCameraControl *control, GstCameraControlChannel *control_channel )
+gboolean gst_camera_control_get_value(GstCameraControl *control, GstCameraControlChannel *control_channel)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_value )
-       {
-               return klass->get_value( control, control_channel );
+       if (klass->get_value) {
+               return klass->get_value(control, control_channel);
        }
 
        return FALSE;
@@ -178,349 +172,295 @@ gst_camera_control_get_value( GstCameraControl *control, GstCameraControlChannel
 
 
 
-gboolean
-gst_camera_control_set_exposure( GstCameraControl *control, gint type, gint value1, gint value2 )
+gboolean gst_camera_control_set_exposure(GstCameraControl *control, gint type, gint value1, gint value2)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_exposure )
-       {
-               return klass->set_exposure( control, type, value1, value2 );
+       if (klass->set_exposure) {
+               return klass->set_exposure(control, type, value1, value2);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_exposure( GstCameraControl *control, gint type, gint* value1, gint* value2 )
+gboolean gst_camera_control_get_exposure(GstCameraControl *control, gint type, gint *value1, gint *value2)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_exposure )
-       {
-               return klass->get_exposure( control, type, value1, value2 );
+       if (klass->get_exposure) {
+               return klass->get_exposure(control, type, value1, value2);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_capture_mode( GstCameraControl *control, gint type, gint value )
+gboolean gst_camera_control_set_capture_mode(GstCameraControl *control, gint type, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_capture_mode )
-       {
-               return klass->set_capture_mode( control, type, value );
+       if (klass->set_capture_mode) {
+               return klass->set_capture_mode(control, type, value);
        }
 
-       return FALSE;   
+       return FALSE;
 }
 
-gboolean
-gst_camera_control_get_capture_mode( GstCameraControl *control, gint type, gint *value )
+gboolean gst_camera_control_get_capture_mode(GstCameraControl *control, gint type, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_capture_mode )
-       {
-               return klass->get_capture_mode( control, type, value );
+       if (klass->get_capture_mode) {
+               return klass->get_capture_mode(control, type, value);
        }
 
-       return FALSE;   
+       return FALSE;
 }
 
-gboolean
-gst_camera_control_set_strobe( GstCameraControl *control, gint type, gint value )
+gboolean gst_camera_control_set_strobe(GstCameraControl *control, gint type, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_strobe )
-       {
-               return klass->set_strobe( control, type, value );
+       if (klass->set_strobe) {
+               return klass->set_strobe(control, type, value);
        }
 
-       return FALSE;           
+       return FALSE;
 }
 
-gboolean
-gst_camera_control_get_strobe( GstCameraControl *control, gint type, gint *value )
+gboolean gst_camera_control_get_strobe(GstCameraControl *control, gint type, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_strobe )
-       {
-               return klass->get_strobe( control, type, value );
+       if (klass->get_strobe) {
+               return klass->get_strobe(control, type, value);
        }
 
-       return FALSE;           
+       return FALSE;
 }
 
-gboolean
-gst_camera_control_set_detect( GstCameraControl *control, gint type, gint value )
+gboolean gst_camera_control_set_detect(GstCameraControl *control, gint type, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_detect )
-       {
-               return klass->set_detect( control, type, value );
+       if (klass->set_detect) {
+               return klass->set_detect(control, type, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_detect( GstCameraControl *control, gint type, gint *value )
+gboolean gst_camera_control_get_detect(GstCameraControl *control, gint type, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_detect )
-       {
-               return klass->get_detect( control, type, value );
+       if (klass->get_detect) {
+               return klass->get_detect(control, type, value);
        }
 
-       //for prevent MISSING_RETURN :+: yoserb.yi 2009-06-25
-       
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_zoom( GstCameraControl *control, gint type, gint value )
+gboolean gst_camera_control_set_zoom(GstCameraControl *control, gint type, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_zoom )
-       {
-               return klass->set_zoom( control, type, value );
+       if (klass->set_zoom) {
+               return klass->set_zoom(control, type, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_zoom( GstCameraControl *control, gint type, gint *value )
+gboolean gst_camera_control_get_zoom(GstCameraControl *control, gint type, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_zoom )
-       {
-               return klass->get_zoom( control, type, value );
+       if (klass->get_zoom) {
+               return klass->get_zoom(control, type, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_focus( GstCameraControl *control, gint mode, gint range )
+gboolean gst_camera_control_set_focus(GstCameraControl *control, gint mode, gint range)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_focus )
-       {
-               return klass->set_focus( control, mode, range );
+       if (klass->set_focus) {
+               return klass->set_focus(control, mode, range);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_focus( GstCameraControl *control, gint *mode, gint *range )
+gboolean gst_camera_control_get_focus(GstCameraControl *control, gint *mode, gint *range)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_focus )
-       {
-               return klass->get_focus( control, mode, range );
+       if (klass->get_focus) {
+               return klass->get_focus(control, mode, range);
        }
 
        return FALSE;
 }
 
-gboolean       
-gst_camera_control_start_auto_focus( GstCameraControl *control )
+gboolean gst_camera_control_start_auto_focus(GstCameraControl *control)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->start_auto_focus )
-       {
-               return klass->start_auto_focus( control );
+       if (klass->start_auto_focus) {
+               return klass->start_auto_focus(control);
        }
 
        return FALSE;
 }
 
-gboolean       
-gst_camera_control_stop_auto_focus( GstCameraControl *control )
+gboolean gst_camera_control_stop_auto_focus(GstCameraControl *control)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->stop_auto_focus )
-       {
-               return klass->stop_auto_focus( control );
+       if (klass->stop_auto_focus) {
+               return klass->stop_auto_focus(control);
        }
 
        return FALSE;
 }
 
-gboolean       
-gst_camera_control_set_focus_level( GstCameraControl *control, gint manual_level)
+gboolean gst_camera_control_set_focus_level(GstCameraControl *control, gint manual_level)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_focus_level )
-       {
-               return klass->set_focus_level( control, manual_level );
+       if (klass->set_focus_level) {
+               return klass->set_focus_level(control, manual_level);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_focus_level( GstCameraControl *control, gint *manual_level)
+gboolean gst_camera_control_get_focus_level(GstCameraControl *control, gint *manual_level)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_focus_level )
-       {
-               return klass->get_focus_level( control, manual_level );
+       if (klass->get_focus_level) {
+               return klass->get_focus_level(control, manual_level);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_auto_focus_area( GstCameraControl *control, GstCameraControlRectType rect )
+gboolean gst_camera_control_set_auto_focus_area(GstCameraControl *control, GstCameraControlRectType rect)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_auto_focus_area )
-       {
-               return klass->set_auto_focus_area( control, rect );
+       if (klass->set_auto_focus_area) {
+               return klass->set_auto_focus_area(control, rect);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_auto_focus_area( GstCameraControl *control, GstCameraControlRectType* rect )
+gboolean gst_camera_control_get_auto_focus_area(GstCameraControl *control, GstCameraControlRectType *rect)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_auto_focus_area )
-       {
-               return klass->get_auto_focus_area( control, rect );
+       if (klass->get_auto_focus_area) {
+               return klass->get_auto_focus_area(control, rect);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_wdr( GstCameraControl *control, gint value)
+gboolean gst_camera_control_set_wdr(GstCameraControl *control, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_wdr )
-       {
-               return klass->set_wdr( control, value );
+       if (klass->set_wdr) {
+               return klass->set_wdr(control, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_wdr( GstCameraControl *control, gint *value)
+gboolean gst_camera_control_get_wdr(GstCameraControl *control, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_wdr )
-       {
-               return klass->get_wdr( control, value );
+       if (klass->get_wdr) {
+               return klass->get_wdr(control, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_ahs( GstCameraControl *control, gint value)
+gboolean gst_camera_control_set_ahs(GstCameraControl *control, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_ahs )
-       {
-               return klass->set_ahs( control, value );
+       if (klass->set_ahs) {
+               return klass->set_ahs(control, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_ahs( GstCameraControl *control, gint *value)
+gboolean gst_camera_control_get_ahs(GstCameraControl *control, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_ahs )
-       {
-               return klass->get_ahs( control, value );
+       if (klass->get_ahs) {
+               return klass->get_ahs(control, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_set_part_color( GstCameraControl *control, gint type, gint value)
+gboolean gst_camera_control_set_part_color(GstCameraControl *control, gint type, gint value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_part_color )
-       {
-               return klass->set_part_color( control, type, value );
+       if (klass->set_part_color) {
+               return klass->set_part_color(control, type, value);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_part_color( GstCameraControl *control, gint type, gint *value)
+gboolean gst_camera_control_get_part_color(GstCameraControl *control, gint type, gint *value)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_part_color )
-       {
-               return klass->get_part_color( control, type, value );
+       if (klass->get_part_color) {
+               return klass->get_part_color(control, type, value);
        }
 
        return FALSE;
 }
 
 gboolean
-gst_camera_control_get_exif_info     ( GstCameraControl* control, GstCameraControlExifInfo* info)
+gst_camera_control_get_exif_info(GstCameraControl *control, GstCameraControlExifInfo *info)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_exif_info )
-       {
-               return klass->get_exif_info( control, info );
+       if (klass->get_exif_info) {
+               return klass->get_exif_info(control, info);
        }
 
        return FALSE;
 }
 
 
-gboolean
-gst_camera_control_get_basic_dev_info     ( GstCameraControl* control, gint dev_id, GstCameraControlCapsInfoType* info)
+gboolean gst_camera_control_get_basic_dev_info(GstCameraControl *control, gint dev_id, GstCameraControlCapsInfoType *info)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_basic_dev_info )
-       {
-               return klass->get_basic_dev_info( control, dev_id, info );
+       if (klass->get_basic_dev_info) {
+               return klass->get_basic_dev_info(control, dev_id, info);
        }
 
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_misc_dev_info     ( GstCameraControl* control, gint dev_id, GstCameraControlCtrlListInfoType* info)
+gboolean gst_camera_control_get_misc_dev_info(GstCameraControl *control, gint dev_id, GstCameraControlCtrlListInfoType *info)
 {
        GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
 
@@ -532,37 +472,52 @@ gst_camera_control_get_misc_dev_info     ( GstCameraControl* control, gint dev_i
        return FALSE;
 }
 
-gboolean
-gst_camera_control_get_extra_dev_info     ( GstCameraControl* control, gint dev_id, GstCameraControlExtraInfoType* info)
+gboolean gst_camera_control_get_extra_dev_info(GstCameraControl *control, gint dev_id, GstCameraControlExtraInfoType *info)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->get_extra_dev_info )
-       {
-               return klass->get_extra_dev_info( control, dev_id, info );
+       if (klass->get_extra_dev_info) {
+               return klass->get_extra_dev_info(control, dev_id, info);
        }
 
        return FALSE;
 }
 
-void
-gst_camera_control_set_capture_command( GstCameraControl* control, GstCameraControlCaptureCommand cmd )
+void gst_camera_control_set_capture_command(GstCameraControl *control, GstCameraControlCaptureCommand cmd)
 {
-       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS( control );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
 
-       if( klass->set_capture_command )
-       {
-               klass->set_capture_command( control, cmd );
+       if (klass->set_capture_command) {
+               klass->set_capture_command(control, cmd);
        }
 
        return;
 }
 
-void
-gst_camera_control_value_changed( GstCameraControl *control, GstCameraControlChannel *control_channel, gint value )
+gboolean gst_camera_control_start_face_zoom(GstCameraControl *control, gint x, gint y, gint zoom_level)
 {
-       g_signal_emit( G_OBJECT( control ), gst_camera_control_signals[CONTROL_VALUE_CHANGED], 0, control_channel, value );
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
+
+       if (klass->start_face_zoom) {
+               return klass->start_face_zoom(control, x, y, zoom_level);
+       }
 
-       g_signal_emit_by_name( G_OBJECT( control_channel ), "control-value-changed", value );
+       return FALSE;
 }
 
+gboolean gst_camera_control_stop_face_zoom(GstCameraControl *control)
+{
+       GstCameraControlClass *klass = GST_CAMERA_CONTROL_GET_CLASS(control);
+
+       if (klass->stop_face_zoom) {
+               return klass->stop_face_zoom(control);
+       }
+
+       return FALSE;
+}
+
+void gst_camera_control_value_changed(GstCameraControl *control, GstCameraControlChannel *control_channel, gint value)
+{
+       g_signal_emit(G_OBJECT(control), gst_camera_control_signals[CONTROL_VALUE_CHANGED], 0, control_channel, value);
+       g_signal_emit_by_name(G_OBJECT(control_channel), "control-value-changed", value);
+}
index 0b4400b..f5ec544 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * GStreamer Camera Control
+ * GStreamer Camera Control Interface
  *
  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
@@ -172,6 +172,7 @@ typedef enum
 #define MAX_NUM_AVAILABLE_FPS   16
 #define MAX_NUM_CTRL_LIST_INFO  64
 #define MAX_NUM_CTRL_MENU       64
+#define MAX_NUM_DETECTED_FACES  16
 #define MAX_SZ_CTRL_NAME_STRING 32
 #define MAX_SZ_DEV_NAME_STRING  32
 
@@ -179,25 +180,25 @@ typedef enum
  *  @brief For timeperframe as fraction type
  *  Elapse time consumed by one frame, reverse of FPS
  */
-typedef struct {
-    gint num;
-    gint den;
-}GstCameraControlFracType;
+typedef struct _GstCameraControlFracType {
+       gint num;
+       gint den;
+} GstCameraControlFracType;
 
 /*! @struct GstCameraControlRectType
- *  @brief For touch auto focusing area
+ *  @brief For touch auto focusing area and face detection area
  */
-typedef struct {
+typedef struct _GstCameraControlRectType {
        gint x;
        gint y;
        gint width;
        gint height;
-}GstCameraControlRectType;
+} GstCameraControlRectType;
 
 /*! @struct GstCameraControlResolutionType
  *  @brief For querying supported resolutions
  */
-typedef struct {
+typedef struct _GstCameraControlResolutionType {
     gint w;
     gint h;
 
@@ -210,7 +211,7 @@ typedef struct {
  *  @brief Time per frame or frame per second will be expressed by this structure
  *  Time per frame or frame per second will be expressed by this structure
  */
-typedef struct {
+typedef struct _GstCameraControlFraction {
     int numerator;             /**< Upper number of fraction*/
     int denominator;           /**< Lower number of fraction*/
 } GstCameraControlFraction;
@@ -218,7 +219,7 @@ typedef struct {
 /*! @struct GstCameraControlFmtDescType
  *  @brief For querying supported format type
  */
-typedef struct {
+typedef struct _GstCameraControlFmtDescType {
     /* fourcc name of each pixelformat */
     guint fcc;
     gint fcc_use;
@@ -231,7 +232,7 @@ typedef struct {
 /*! @struct GstCameraControlCapsInfoType
  *  @brief For querying image input capabilities
  */
-typedef struct {
+typedef struct _GstCameraControlCapsInfoType {
     char dev_name[MAX_SZ_DEV_NAME_STRING];
     int input_idx;
     gint num_fmt_desc;
@@ -255,6 +256,23 @@ typedef struct {
     GstCameraControlFraction fps[MAX_NUM_AVAILABLE_FPS];
 } GstCameraControlCapsInfoType;
 
+/*! @struct GstCameraControlFaceInfo
+ *  @brief For face information
+ */
+typedef struct _GstCameraControlFaceInfo {
+       int id;
+       int score;
+       GstCameraControlRectType rect;
+} GstCameraControlFaceInfo;
+
+/*! @struct GstCameraControlFaceDetectInfo
+ *  @brief For face detect information
+ */
+typedef struct _GstCameraControlFaceDetectInfo {
+       int num_of_faces;
+       GstCameraControlFaceInfo face_info[MAX_NUM_DETECTED_FACES];
+} GstCameraControlFaceDetectInfo;
+
 /////////////////////////////
 //  For Querying controls  //
 /////////////////////////////
@@ -269,15 +287,15 @@ enum {
 /*! @struct GstCameraControlCtrlMenuType
  *  @brief For querying menu of specified controls
  */
-typedef struct {
+typedef struct _GstCameraControlCtrlMenuType {
     gint menu_index;
     gchar menu_name[MAX_SZ_CTRL_NAME_STRING];
-}GstCameraControlCtrlMenuType;
+} GstCameraControlCtrlMenuType;
 
 /*! @struct GstCameraControlCtrlInfoType
  *  @brief For querying controls detail
  */
-typedef struct {
+typedef struct _GstCameraControlCtrlInfoType {
     gint avsys_ctrl_id;
     gint v4l2_ctrl_id;
     gint ctrl_type;
@@ -293,7 +311,7 @@ typedef struct {
 /*! @struct GstCameraControlCtrlListInfoType
  *  @brief For querying controls
  */
-typedef struct {
+typedef struct _GstCameraControlCtrlListInfoType {
     gint num_ctrl_list_info;
     GstCameraControlCtrlInfoType ctrl_info[MAX_NUM_CTRL_LIST_INFO];
 } GstCameraControlCtrlListInfoType;
@@ -310,7 +328,7 @@ typedef struct {
 #define GST_CAMERA_STROBE_CAP_PERMANENT         0x0080 /* keep turned on until turning off */
 #define GST_CAMERA_STROBE_CAP_EXTERNAL          0x0100 /* use external strobe */
 
-typedef struct {
+typedef struct _GstCameraControlExtraInfoType {
     guint strobe_caps;                                   /**< Use above caps field */
     guint detection_caps;                                /**< Just boolean */
     guint reserved[4];
@@ -323,33 +341,31 @@ typedef struct {
 /**
  * Enumerations for Camera control Part color.
  */
-typedef struct _GstCameraControlExifInfo
-{
-    /* Dynamic value */
-    guint32 exposure_time_numerator;       //Exposure time, given in seconds
-    guint32 exposure_time_denominator;
-    gint shutter_speed_numerator;                //Shutter speed, given in APEX(Additive System Photographic Exposure)
-    gint shutter_speed_denominator;
-    gint brigtness_numerator;                    //Value of brightness, before firing flash, given in APEX value
-    gint brightness_denominator;
-    guint16 iso;                     //Sensitivity value of sensor
-    guint16 flash;                   //Whether flash is fired(1) or not(0)
-    gint metering_mode;                          //metering mode in EXIF 2.2
-    gint exif_image_width;                       //Size of image
-    gint exif_image_height;                      //
-    gint exposure_bias_in_APEX;                  //Exposure bias in APEX standard
-    gint software_used;                          //Firmware S/W version
-
-
-    /* Fixed value */
-    gint component_configuration;                //color components arrangement (YCbCr = 1230)
-    gint colorspace;                             //colorspace information (sRGB=1)
-    gint focal_len_numerator;                    //Lens focal length (f = 4.5mm)
-    gint focal_len_denominator;
-    gint aperture_f_num_numerator;               //Aperture value (f_num = 2.8)
-    gint aperture_f_num_denominator;
-    gint aperture_in_APEX;                       //Aperture value in APEX standard
-    gint max_lens_aperture_in_APEX;              //Max aperture value in APEX standard
+typedef struct _GstCameraControlExifInfo {
+       /* Dynamic value */
+       guint32 exposure_time_numerator;    /* Exposure time, given in seconds */
+       guint32 exposure_time_denominator;
+       gint shutter_speed_numerator;       /* Shutter speed, given in APEX(Additive System Photographic Exposure) */
+       gint shutter_speed_denominator;
+       gint brigtness_numerator;           /* Value of brightness, before firing flash, given in APEX value */
+       gint brightness_denominator;
+       guint16 iso;                        /* Sensitivity value of sensor */
+       guint16 flash;                      /* Whether flash is fired(1) or not(0) */
+       gint metering_mode;                 /* metering mode in EXIF 2.2 */
+       gint exif_image_width;              /* Size of image */
+       gint exif_image_height;
+       gint exposure_bias_in_APEX;         /* Exposure bias in APEX standard */
+       gint software_used;                 /* Firmware S/W version */
+
+       /* Fixed value */
+       gint component_configuration;       /* color components arrangement */
+       gint colorspace;                    /* colorspace information */
+       gint focal_len_numerator;           /* Lens focal length */
+       gint focal_len_denominator;
+       gint aperture_f_num_numerator;      /* Aperture value */
+       gint aperture_f_num_denominator;
+       gint aperture_in_APEX;              /* Aperture value in APEX standard */
+       gint max_lens_aperture_in_APEX;     /* Max aperture value in APEX standard */
 } GstCameraControlExifInfo;
 
 
@@ -358,84 +374,88 @@ typedef struct _GstCameraControlClass {
        GstCameraControlType camera_control_type;
 
        /* virtual functions */
-       const GList*(* list_channels)           ( GstCameraControl* control );
-
-       gboolean        (* set_value)                   ( GstCameraControl* control, GstCameraControlChannel* control_channel );
-       gboolean        (* get_value)                   ( GstCameraControl* control, GstCameraControlChannel* control_channel );
-       gboolean        (* set_exposure)                ( GstCameraControl* control, gint type, gint value1, gint value2 );
-       gboolean        (* get_exposure)                ( GstCameraControl* control, gint type, gint* value1, gint* value2 );
-       gboolean        (* set_capture_mode)    ( GstCameraControl* control, gint type, gint value );
-       gboolean        (* get_capture_mode)    ( GstCameraControl* control, gint type, gint* value );  
-       gboolean        (* set_strobe)                  ( GstCameraControl* control, gint type, gint value );
-       gboolean        (* get_strobe)                  ( GstCameraControl* control, gint type, gint *value );
-       gboolean        (* set_detect)                  ( GstCameraControl* control, gint type, gint value );
-       gboolean        (* get_detect)                  ( GstCameraControl* control, gint type, gint* value );  
-       gboolean        (* set_zoom)                    ( GstCameraControl* control, gint type, gint value );
-       gboolean        (* get_zoom)                    ( GstCameraControl* control, gint type, gint* value );
-       gboolean        (* set_focus)                   ( GstCameraControl* control, gint mode, gint range );
-       gboolean        (* get_focus)                   ( GstCameraControl* control, gint* mode, gint* range );
-       gboolean        (* start_auto_focus)    ( GstCameraControl* control);
-       gboolean        (* stop_auto_focus)             ( GstCameraControl* control);
-       gboolean        (* set_focus_level)             ( GstCameraControl* control, gint manual_level);
-       gboolean        (* get_focus_level)             ( GstCameraControl* control, gint* manual_level);
-       gboolean        (* set_auto_focus_area) ( GstCameraControl* control, GstCameraControlRectType rect );
-       gboolean        (* get_auto_focus_area) ( GstCameraControl* control, GstCameraControlRectType* rect );
-       gboolean        (* set_wdr)                             ( GstCameraControl* control, gint value);
-       gboolean        (* get_wdr)                             ( GstCameraControl* control, gint *value);
-       gboolean        (* set_ahs)                             ( GstCameraControl* control, gint value);
-       gboolean        (* get_ahs)                             ( GstCameraControl* control, gint *value);
-       gboolean        (* set_part_color)              ( GstCameraControl* control, gint type, gint value);
-       gboolean        (* get_part_color)              ( GstCameraControl* control, gint type, gint* value);
-       gboolean        (* get_exif_info)               ( GstCameraControl* control, GstCameraControlExifInfo* info);
-       gboolean        (* get_basic_dev_info)          ( GstCameraControl* control, gint dev_id, GstCameraControlCapsInfoType* info);
-       gboolean        (* get_misc_dev_info)           ( GstCameraControl* control, gint dev_id, GstCameraControlCtrlListInfoType* info);
-       gboolean        (* get_extra_dev_info)          ( GstCameraControl* control, gint dev_id, GstCameraControlExtraInfoType* info);
-       void            (* set_capture_command)         ( GstCameraControl* control, GstCameraControlCaptureCommand cmd );
+       const GList*(*list_channels)                   (GstCameraControl *control);
+
+       gboolean        (*set_value)                   (GstCameraControl *control, GstCameraControlChannel *control_channel);
+       gboolean        (*get_value)                   (GstCameraControl *control, GstCameraControlChannel *control_channel);
+       gboolean        (*set_exposure)                (GstCameraControl *control, gint type, gint value1, gint value2);
+       gboolean        (*get_exposure)                (GstCameraControl *control, gint type, gint *value1, gint *value2);
+       gboolean        (*set_capture_mode)            (GstCameraControl *control, gint type, gint value);
+       gboolean        (*get_capture_mode)            (GstCameraControl *control, gint type, gint *value);
+       gboolean        (*set_strobe)                  (GstCameraControl *control, gint type, gint value);
+       gboolean        (*get_strobe)                  (GstCameraControl *control, gint type, gint *value);
+       gboolean        (*set_detect)                  (GstCameraControl *control, gint type, gint value);
+       gboolean        (*get_detect)                  (GstCameraControl *control, gint type, gint *value);
+       gboolean        (*set_zoom)                    (GstCameraControl *control, gint type, gint value);
+       gboolean        (*get_zoom)                    (GstCameraControl *control, gint type, gint *value);
+       gboolean        (*set_focus)                   (GstCameraControl *control, gint mode, gint range);
+       gboolean        (*get_focus)                   (GstCameraControl *control, gint *mode, gint *range);
+       gboolean        (*start_auto_focus)            (GstCameraControl *control);
+       gboolean        (*stop_auto_focus)             (GstCameraControl *control);
+       gboolean        (*set_focus_level)             (GstCameraControl *control, gint manual_level);
+       gboolean        (*get_focus_level)             (GstCameraControl *control, gint *manual_level);
+       gboolean        (*set_auto_focus_area)         (GstCameraControl *control, GstCameraControlRectType rect);
+       gboolean        (*get_auto_focus_area)         (GstCameraControl *control, GstCameraControlRectType *rect);
+       gboolean        (*set_wdr)                     (GstCameraControl *control, gint value);
+       gboolean        (*get_wdr)                     (GstCameraControl *control, gint *value);
+       gboolean        (*set_ahs)                     (GstCameraControl *control, gint value);
+       gboolean        (*get_ahs)                     (GstCameraControl *control, gint *value);
+       gboolean        (*set_part_color)              (GstCameraControl *control, gint type, gint value);
+       gboolean        (*get_part_color)              (GstCameraControl *control, gint type, gint *value);
+       gboolean        (*get_exif_info)               (GstCameraControl *control, GstCameraControlExifInfo *info);
+       gboolean        (*get_basic_dev_info)          (GstCameraControl *control, gint dev_id, GstCameraControlCapsInfoType *info);
+       gboolean        (*get_misc_dev_info)           (GstCameraControl *control, gint dev_id, GstCameraControlCtrlListInfoType *info);
+       gboolean        (*get_extra_dev_info)          (GstCameraControl *control, gint dev_id, GstCameraControlExtraInfoType *info);
+       void            (*set_capture_command)         (GstCameraControl *control, GstCameraControlCaptureCommand cmd);
+       gboolean        (*start_face_zoom)             (GstCameraControl *control, gint x, gint y, gint zoom_level);
+       gboolean        (*stop_face_zoom)              (GstCameraControl *control);
 
        /* signals */
-       void (* value_changed)                          ( GstCameraControl* control, GstCameraControlChannel* channel, gint value );
+       void (* value_changed)                          (GstCameraControl *control, GstCameraControlChannel *channel, gint value);
 } GstCameraControlClass;
 
-GType   gst_camera_control_get_type      (void);
+GType gst_camera_control_get_type(void);
 
 /* virtual class function wrappers */
-const GList*   gst_camera_control_list_channels        ( GstCameraControl* control );
-
-gboolean       gst_camera_control_set_value            ( GstCameraControl* control, GstCameraControlChannel* control_channel );
-gboolean       gst_camera_control_get_value            ( GstCameraControl* control, GstCameraControlChannel* control_channel );
-gboolean       gst_camera_control_set_exposure         ( GstCameraControl* control, gint type, gint value1, gint value2 );
-gboolean       gst_camera_control_get_exposure         ( GstCameraControl* control, gint type, gint* value1, gint* value2 );
-gboolean       gst_camera_control_set_capture_mode     ( GstCameraControl* control, gint type, gint value );
-gboolean       gst_camera_control_get_capture_mode     ( GstCameraControl* control, gint type, gint* value );
-gboolean       gst_camera_control_set_strobe           ( GstCameraControl* control, gint type, gint value );
-gboolean       gst_camera_control_get_strobe           ( GstCameraControl* control, gint type, gint *value );
-gboolean       gst_camera_control_set_detect           ( GstCameraControl* control, gint type, gint value );
-gboolean       gst_camera_control_get_detect           ( GstCameraControl* control, gint type, gint* value );
-gboolean       gst_camera_control_set_zoom                     ( GstCameraControl* control, gint type, gint value );
-gboolean       gst_camera_control_get_zoom                     ( GstCameraControl* control, gint type, gint* value );
-gboolean       gst_camera_control_set_focus            ( GstCameraControl* control, gint mode, gint range );
-gboolean       gst_camera_control_get_focus            ( GstCameraControl* control, gint* mode, gint* range );
-gboolean       gst_camera_control_start_auto_focus     ( GstCameraControl* control);
-gboolean       gst_camera_control_stop_auto_focus      ( GstCameraControl* control);
-gboolean       gst_camera_control_set_focus_level      ( GstCameraControl* control, gint manual_level );
-gboolean       gst_camera_control_get_focus_level      ( GstCameraControl* control, gint* manual_level );
-gboolean       gst_camera_control_set_auto_focus_area  ( GstCameraControl* control, GstCameraControlRectType rect );
-gboolean       gst_camera_control_get_auto_focus_area  ( GstCameraControl* control, GstCameraControlRectType* rect );
-gboolean       gst_camera_control_set_wdr                      ( GstCameraControl* control, gint value);
-gboolean       gst_camera_control_get_wdr                      ( GstCameraControl* control, gint* value);
-gboolean       gst_camera_control_set_ahs                      ( GstCameraControl* control, gint value);
-gboolean       gst_camera_control_get_ahs                      ( GstCameraControl* control, gint* value);
-gboolean       gst_camera_control_set_part_color       ( GstCameraControl* control, gint type, gint value);
-gboolean       gst_camera_control_get_part_color       ( GstCameraControl* control, gint type, gint* value);
-gboolean       gst_camera_control_get_exif_info        ( GstCameraControl* control, GstCameraControlExifInfo* info);
-gboolean       gst_camera_control_get_basic_dev_info   ( GstCameraControl* control, gint dev_id, GstCameraControlCapsInfoType* info);
-gboolean       gst_camera_control_get_misc_dev_info    ( GstCameraControl* control, gint dev_id, GstCameraControlCtrlListInfoType* info);
-gboolean       gst_camera_control_get_extra_dev_info   ( GstCameraControl* control, gint dev_id, GstCameraControlExtraInfoType* info);
-void           gst_camera_control_set_capture_command  ( GstCameraControl* control, GstCameraControlCaptureCommand cmd );
+const GList*   gst_camera_control_list_channels        (GstCameraControl *control);
+
+gboolean       gst_camera_control_set_value            (GstCameraControl *control, GstCameraControlChannel *control_channel);
+gboolean       gst_camera_control_get_value            (GstCameraControl *control, GstCameraControlChannel *control_channel);
+gboolean       gst_camera_control_set_exposure         (GstCameraControl *control, gint type, gint value1, gint value2);
+gboolean       gst_camera_control_get_exposure         (GstCameraControl *control, gint type, gint *value1, gint *value2);
+gboolean       gst_camera_control_set_capture_mode     (GstCameraControl *control, gint type, gint value);
+gboolean       gst_camera_control_get_capture_mode     (GstCameraControl *control, gint type, gint *value);
+gboolean       gst_camera_control_set_strobe           (GstCameraControl *control, gint type, gint value);
+gboolean       gst_camera_control_get_strobe           (GstCameraControl *control, gint type, gint *value);
+gboolean       gst_camera_control_set_detect           (GstCameraControl *control, gint type, gint value);
+gboolean       gst_camera_control_get_detect           (GstCameraControl *control, gint type, gint *value);
+gboolean       gst_camera_control_set_zoom             (GstCameraControl *control, gint type, gint value);
+gboolean       gst_camera_control_get_zoom             (GstCameraControl *control, gint type, gint *value);
+gboolean       gst_camera_control_set_focus            (GstCameraControl *control, gint mode, gint range);
+gboolean       gst_camera_control_get_focus            (GstCameraControl *control, gint *mode, gint *range);
+gboolean       gst_camera_control_start_auto_focus     (GstCameraControl *control);
+gboolean       gst_camera_control_stop_auto_focus      (GstCameraControl *control);
+gboolean       gst_camera_control_set_focus_level      (GstCameraControl *control, gint manual_level);
+gboolean       gst_camera_control_get_focus_level      (GstCameraControl *control, gint *manual_level);
+gboolean       gst_camera_control_set_auto_focus_area  (GstCameraControl *control, GstCameraControlRectType rect);
+gboolean       gst_camera_control_get_auto_focus_area  (GstCameraControl *control, GstCameraControlRectType *rect);
+gboolean       gst_camera_control_set_wdr              (GstCameraControl *control, gint value);
+gboolean       gst_camera_control_get_wdr              (GstCameraControl *control, gint *value);
+gboolean       gst_camera_control_set_ahs              (GstCameraControl *control, gint value);
+gboolean       gst_camera_control_get_ahs              (GstCameraControl *control, gint *value);
+gboolean       gst_camera_control_set_part_color       (GstCameraControl *control, gint type, gint value);
+gboolean       gst_camera_control_get_part_color       (GstCameraControl *control, gint type, gint *value);
+gboolean       gst_camera_control_get_exif_info        (GstCameraControl *control, GstCameraControlExifInfo *info);
+gboolean       gst_camera_control_get_basic_dev_info   (GstCameraControl *control, gint dev_id, GstCameraControlCapsInfoType *info);
+gboolean       gst_camera_control_get_misc_dev_info    (GstCameraControl *control, gint dev_id, GstCameraControlCtrlListInfoType *info);
+gboolean       gst_camera_control_get_extra_dev_info   (GstCameraControl *control, gint dev_id, GstCameraControlExtraInfoType *info);
+void           gst_camera_control_set_capture_command  (GstCameraControl *control, GstCameraControlCaptureCommand cmd);
+gboolean       gst_camera_control_start_face_zoom      (GstCameraControl *control, gint x, gint y, gint zoom_level);
+gboolean       gst_camera_control_stop_face_zoom       (GstCameraControl *control);
 
 
 /* trigger signal */
-void           gst_camera_control_value_changed        ( GstCameraControl* control, GstCameraControlChannel* control_channel, gint value );
+void           gst_camera_control_value_changed        (GstCameraControl *control, GstCameraControlChannel *control_channel, gint value);
 
 G_END_DECLS
 
index 92e632d..415210e 100644 (file)
@@ -1,4 +1,4 @@
-/* GStreamer Camera Control
+/* GStreamer Camera Control Channel Interface
  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
  *
  * cameracontrolchannel.c: cameracontrol channel object design
 
 #include "cameracontrolchannel.h"
 
-enum
-{
-  /* FILL ME */
-  SIGNAL_VALUE_CHANGED,
-  LAST_SIGNAL
+enum {
+       /* FILL ME */
+       SIGNAL_VALUE_CHANGED,
+       LAST_SIGNAL
 };
 
-static void gst_camera_control_channel_class_init( GstCameraControlChannelClass* klass );
-static void gst_camera_control_channel_init( GstCameraControlChannel* control_channel );
-static void gst_camera_control_channel_dispose( GObject* object );
+static void gst_camera_control_channel_class_init(GstCameraControlChannelClass* klass);
+static void gst_camera_control_channel_init(GstCameraControlChannel* control_channel);
+static void gst_camera_control_channel_dispose(GObject* object);
 
-static GObjectClassparent_class = NULL;
+static GObjectClass *parent_class = NULL;
 static guint signals[LAST_SIGNAL] = { 0 };
 
-GType
-gst_camera_control_channel_get_type (void)
+GType gst_camera_control_channel_get_type(void)
 {
-  static GType gst_camera_control_channel_type = 0;
-
-  if (!gst_camera_control_channel_type) {
-    static const GTypeInfo camera_control_channel_info = {
-      sizeof (GstCameraControlChannelClass),
-      NULL,
-      NULL,
-      (GClassInitFunc) gst_camera_control_channel_class_init,
-      NULL,
-      NULL,
-      sizeof (GstCameraControlChannel),
-      0,
-      (GInstanceInitFunc) gst_camera_control_channel_init,
-      NULL
-    };
-
-    gst_camera_control_channel_type =
-        g_type_register_static (G_TYPE_OBJECT,
-        "GstCameraControlChannel", &camera_control_channel_info, 0);
-  }
-
-  return gst_camera_control_channel_type;
+       static GType gst_camera_control_channel_type = 0;
+
+       if (!gst_camera_control_channel_type) {
+               static const GTypeInfo camera_control_channel_info = {
+                       sizeof (GstCameraControlChannelClass),
+                       NULL,
+                       NULL,
+                       (GClassInitFunc) gst_camera_control_channel_class_init,
+                       NULL,
+                       NULL,
+                       sizeof (GstCameraControlChannel),
+                       0,
+                       (GInstanceInitFunc) gst_camera_control_channel_init,
+                       NULL
+               };
+
+               gst_camera_control_channel_type = \
+                       g_type_register_static(G_TYPE_OBJECT,
+                                              "GstCameraControlChannel",
+                                              &camera_control_channel_info,
+                                              0);
+       }
+
+       return gst_camera_control_channel_type;
 }
 
-static void
-gst_camera_control_channel_class_init( GstCameraControlChannelClass* klass )
+static void gst_camera_control_channel_class_init(GstCameraControlChannelClass* klass)
 {
-  GObjectClass *object_klass = (GObjectClass*) klass;
-
-  parent_class = g_type_class_peek_parent (klass);
-
-  signals[SIGNAL_VALUE_CHANGED] =
-      g_signal_new ("control-value-changed", G_TYPE_FROM_CLASS (klass),
-      G_SIGNAL_RUN_LAST,
-      G_STRUCT_OFFSET (GstCameraControlChannelClass,
-          value_changed),
-      NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
-
-  object_klass->dispose = gst_camera_control_channel_dispose;
+       GObjectClass *object_klass = (GObjectClass*) klass;
+
+       parent_class = g_type_class_peek_parent (klass);
+
+       signals[SIGNAL_VALUE_CHANGED] = \
+               g_signal_new("control-value-changed",
+                            G_TYPE_FROM_CLASS (klass),
+                            G_SIGNAL_RUN_LAST,
+                            G_STRUCT_OFFSET (GstCameraControlChannelClass, value_changed),
+                            NULL,
+                            NULL,
+                            g_cclosure_marshal_VOID__INT,
+                            G_TYPE_NONE,
+                            1,
+                            G_TYPE_INT);
+
+       object_klass->dispose = gst_camera_control_channel_dispose;
 }
 
-static void
-gst_camera_control_channel_init( GstCameraControlChannel* control_channel )
+static void gst_camera_control_channel_init(GstCameraControlChannel* control_channel)
 {
-  control_channel->label = NULL;
-  control_channel->min_value = control_channel->max_value = 0;
+       control_channel->label = NULL;
+       control_channel->min_value = control_channel->max_value = 0;
 }
 
-static void
-gst_camera_control_channel_dispose( GObject* object )
+static void gst_camera_control_channel_dispose(GObject* object)
 {
-  GstCameraControlChannel *control_channel = GST_CAMERA_CONTROL_CHANNEL (object);
+       GstCameraControlChannel *control_channel = GST_CAMERA_CONTROL_CHANNEL(object);
 
-  if (control_channel->label)
-    g_free (control_channel->label);
+       if (control_channel->label) {
+               g_free (control_channel->label);
+       }
 
-  control_channel->label = NULL;
+       control_channel->label = NULL;
 
-  if (parent_class->dispose)
-    parent_class->dispose (object);
+       if (parent_class->dispose) {
+               parent_class->dispose (object);
+       }
 }
index 633f175..417debd 100644 (file)
@@ -1,4 +1,4 @@
-/* GStreamer Camera Control
+/* GStreamer Camera Control Channel Interface
  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
  *
  * cameracontrolchannel.h: individual channel object
@@ -40,24 +40,22 @@ G_BEGIN_DECLS
   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_CAMERA_CONTROL_CHANNEL))
 
 typedef struct _GstCameraControlChannel {
-  GObject parent;
-
-  gchar  *label;
-  gint    min_value,
-          max_value;
+       GObject parent;
+       gchar *label;
+       gint min_value;
+       gint max_value;
 } GstCameraControlChannel;
 
 typedef struct _GstCameraControlChannelClass {
-  GObjectClass parent;
+       GObjectClass parent;
 
-  /* signals */
-  void (* value_changed) (GstCameraControlChannel *control_channel,
-                          gint                    value);
+       /* signals */
+       void (*value_changed)(GstCameraControlChannel *control_channel, gint value);
 
-  gpointer _gst_reserved[GST_PADDING];
+       gpointer _gst_reserved[GST_PADDING];
 } GstCameraControlChannelClass;
 
-GType   gst_camera_control_channel_get_type (void);
+GType gst_camera_control_channel_get_type(void);
 
 G_END_DECLS