From 4067f381734d6e13e997d47f5a4e7fa5939979c7 Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Thu, 22 Apr 2010 13:48:03 +0300 Subject: [PATCH] camerabin,photography: Add autofocus interface property Add autofocus interface property to start and stop autofocus sequence. Implement the property in camerabin. --- gst-libs/gst/interfaces/photography.c | 6 ++++++ gst-libs/gst/interfaces/photography.h | 1 + gst/camerabin/gstcamerabin-enum.h | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/interfaces/photography.c b/gst-libs/gst/interfaces/photography.c index d8a9b50..bd858b3 100644 --- a/gst-libs/gst/interfaces/photography.c +++ b/gst-libs/gst/interfaces/photography.c @@ -677,4 +677,10 @@ gst_photography_iface_class_init (gpointer g_class) "Which noise reduction modes are enabled (0 = disabled)", GST_TYPE_PHOTOGRAPHY_NOISE_REDUCTION, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /* Autofocus */ + g_object_interface_install_property (g_class, + g_param_spec_boolean (GST_PHOTOGRAPHY_PROP_AUTOFOCUS, "autofocus", + "Set true to start autofocus sequence and false to interrupt it", + FALSE, G_PARAM_READWRITE)); } diff --git a/gst-libs/gst/interfaces/photography.h b/gst-libs/gst/interfaces/photography.h index 82a9843..348b74c 100644 --- a/gst-libs/gst/interfaces/photography.h +++ b/gst-libs/gst/interfaces/photography.h @@ -71,6 +71,7 @@ G_BEGIN_DECLS #define GST_PHOTOGRAPHY_PROP_FLICKER_MODE "flicker-mode" #define GST_PHOTOGRAPHY_PROP_FOCUS_MODE "focus-mode" #define GST_PHOTOGRAPHY_PROP_ZOOM "zoom" +#define GST_PHOTOGRAPHY_PROP_AUTOFOCUS "autofocus" /** * GstPhotography: diff --git a/gst/camerabin/gstcamerabin-enum.h b/gst/camerabin/gstcamerabin-enum.h index b848047..7fbe6c8 100644 --- a/gst/camerabin/gstcamerabin-enum.h +++ b/gst/camerabin/gstcamerabin-enum.h @@ -70,7 +70,8 @@ enum ARG_VIDEO_CAPTURE_FRAMERATE, ARG_PREVIEW_SOURCE_FILTER, ARG_READY_FOR_CAPTURE, - ARG_IDLE + ARG_IDLE, + ARG_AUTOFOCUS }; /** -- 2.7.4