[aravis] gst: changes the type of gst_aravis->gain from int to double.



commit 88265009da5c1326c04fe477a2232ea1e131dd86
Author: Edgar Thier <edgarthier gmail com>
Date:   Fri Jul 26 16:25:32 2013 +0200

    gst: changes the type of gst_aravis->gain from int to double.
    
    Since arv_camera returns double when gain is queried, it makes sense that gain handles this value 
accordingly.

 gst/gstaravis.c |    8 ++++----
 gst/gstaravis.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gst/gstaravis.c b/gst/gstaravis.c
index c414655..6c16de9 100644
--- a/gst/gstaravis.c
+++ b/gst/gstaravis.c
@@ -492,7 +492,7 @@ gst_aravis_set_property (GObject * object, guint prop_id,
 
                        break;
                case PROP_GAIN:
-                       gst_aravis->gain = g_value_get_int (value);
+                       gst_aravis->gain = g_value_get_double (value);
                        break;
                case PROP_GAIN_AUTO:
                        gst_aravis->gain_auto = g_value_get_boolean (value);
@@ -532,7 +532,7 @@ gst_aravis_get_property (GObject * object, guint prop_id, GValue * value,
                        g_value_set_string (value, gst_aravis->camera_name);
                        break;
                case PROP_GAIN:
-                       g_value_set_int (value, gst_aravis->gain);
+                       g_value_set_double (value, gst_aravis->gain);
                        break;
                case PROP_GAIN_AUTO:
                        g_value_set_boolean (value, gst_aravis->gain_auto);
@@ -597,10 +597,10 @@ gst_aravis_class_init (GstAravisClass * klass)
        g_object_class_install_property
                (gobject_class,
                 PROP_GAIN,
-                g_param_spec_int ("gain",
+                g_param_spec_double ("gain",
                                   "Gain",
                                   "Gain (dB)",
-                                  -1, 500, 0,
+                                  -1.0, 500.0, 0.0,
                                   G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
        g_object_class_install_property
                (gobject_class,
diff --git a/gst/gstaravis.h b/gst/gstaravis.h
index 3cf0ac2..9273a15 100644
--- a/gst/gstaravis.h
+++ b/gst/gstaravis.h
@@ -43,7 +43,7 @@ struct _GstAravis {
 
        char *camera_name;
 
-       gint64 gain;
+       double gain;
        gboolean gain_auto;
        double exposure_time_us;
        gboolean exposure_auto;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]