summaryrefslogtreecommitdiffstats
path: root/src/uca-camera.h
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-04 20:30:31 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-04 20:30:31 +0100
commitc0c5007a5424b0668886bdc62ff74b275cd8be60 (patch)
tree878aa3cb603ef29deaa110e8681de1ed956fed43 /src/uca-camera.h
parentcf05bc395e1604dab0ad9ae7f0c70f7bd5aa09a7 (diff)
downloadlibuca-c0c5007a5424b0668886bdc62ff74b275cd8be60.tar.gz
libuca-c0c5007a5424b0668886bdc62ff74b275cd8be60.tar.bz2
libuca-c0c5007a5424b0668886bdc62ff74b275cd8be60.tar.xz
libuca-c0c5007a5424b0668886bdc62ff74b275cd8be60.zip
Add callback func and change data to gpointer
Diffstat (limited to 'src/uca-camera.h')
-rw-r--r--src/uca-camera.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/uca-camera.h b/src/uca-camera.h
index 59a0670..b09e12b 100644
--- a/src/uca-camera.h
+++ b/src/uca-camera.h
@@ -37,6 +37,15 @@ typedef struct _UcaCamera UcaCamera;
typedef struct _UcaCameraClass UcaCameraClass;
typedef struct _UcaCameraPrivate UcaCameraPrivate;
+/**
+ * UcaCameraGrabFunc:
+ * @data: a pointer to the raw data
+ * @user_data: user data passed to the function
+ *
+ * A function receiving the data when streaming in asynchronous mode.
+ */
+typedef void (*UcaCameraGrabFunc) (gpointer data, gpointer user_data);
+
struct _UcaCamera {
/*< private >*/
GObject parent;
@@ -55,7 +64,7 @@ struct _UcaCameraClass {
void (*start_recording) (UcaCamera *camera, GError **error);
void (*stop_recording) (UcaCamera *camera, GError **error);
- void (*grab) (UcaCamera *camera, gchar *data, GError **error);
+ void (*grab) (UcaCamera *camera, gpointer data, GError **error);
void (*recording_started) (UcaCamera *camera);
void (*recording_stopped) (UcaCamera *camera);
@@ -63,7 +72,8 @@ struct _UcaCameraClass {
void uca_camera_start_recording(UcaCamera *camera, GError **error);
void uca_camera_stop_recording(UcaCamera *camera, GError **error);
-void uca_camera_grab(UcaCamera *camera, gchar *data, GError **error);
+void uca_camera_grab(UcaCamera *camera, gpointer data, GError **error);
+void uca_camera_set_grab_func(UcaCamera *camera, UcaCameraGrabFunc func);
GType uca_camera_get_type(void);