[aravis] Add arv_camera_get_available_pixel_formats_as_strings.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] Add arv_camera_get_available_pixel_formats_as_strings.
- Date: Mon, 9 Jul 2012 08:54:50 +0000 (UTC)
commit 59a372b69c8adc7215f2b91c73b3b54855d992a4
Author: Jure Varlec <jure varlec ad-vega si>
Date: Sun Jul 1 18:55:35 2012 +0200
Add arv_camera_get_available_pixel_formats_as_strings.
src/arvcamera.c | 18 ++++++++++++++++++
src/arvcamera.h | 11 ++++++-----
2 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/src/arvcamera.c b/src/arvcamera.c
index cecb927..aae85b9 100644
--- a/src/arvcamera.c
+++ b/src/arvcamera.c
@@ -391,6 +391,24 @@ arv_camera_get_available_pixel_formats (ArvCamera *camera, guint *n_pixel_format
return arv_device_get_enumeration_feature_available_values (camera->priv->device, "PixelFormat", n_pixel_formats);
}
+/**
+ * arv_camera_get_available_pixel_formats_as_strings:
+ * @camera: a #ArvCamera
+ * @n_pixel_formats: (out): number of different pixel formats
+ *
+ * Retrieves the list of all available pixel formats as strings.
+ *
+ * Returns: (array length=n_pixel_formats) (transfer full): a newly allocated array of strings.
+ */
+
+const char **
+arv_camera_get_available_pixel_formats_as_strings (ArvCamera *camera, guint *n_pixel_formats)
+{
+ g_return_val_if_fail (ARV_IS_CAMERA (camera), NULL);
+
+ return arv_device_get_enumeration_feature_available_strings (camera->priv->device, "PixelFormat", n_pixel_formats);
+}
+
/* Acquisition control */
/**
diff --git a/src/arvcamera.h b/src/arvcamera.h
index 7e0b9e8..20afebb 100644
--- a/src/arvcamera.h
+++ b/src/arvcamera.h
@@ -71,11 +71,12 @@ void arv_camera_get_height_bounds (ArvCamera *camera, gint *min, gint *max);
void arv_camera_set_binning (ArvCamera *camera, gint dx, gint dy);
void arv_camera_get_binning (ArvCamera *camera, gint *dx, gint *dy);
-void arv_camera_set_pixel_format (ArvCamera *camera, ArvPixelFormat format);
-void arv_camera_set_pixel_format_from_string (ArvCamera *camera, const char * format);
-ArvPixelFormat arv_camera_get_pixel_format (ArvCamera *camera);
-const char * arv_camera_get_pixel_format_as_string (ArvCamera *camera);
-gint64 * arv_camera_get_available_pixel_formats (ArvCamera *camera, guint *n_pixel_formats);
+void arv_camera_set_pixel_format (ArvCamera *camera, ArvPixelFormat format);
+void arv_camera_set_pixel_format_from_string (ArvCamera *camera, const char * format);
+ArvPixelFormat arv_camera_get_pixel_format (ArvCamera *camera);
+const char * arv_camera_get_pixel_format_as_string (ArvCamera *camera);
+gint64 * arv_camera_get_available_pixel_formats (ArvCamera *camera, guint *n_pixel_formats);
+const char ** arv_camera_get_available_pixel_formats_as_strings (ArvCamera *camera, guint *n_pixel_formats);
/* Acquisition control */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]