From d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Mon, 2 Apr 2012 17:51:35 +0200 Subject: Add test to measure lib overhead --- src/cameras/uca-mock-camera.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cameras/uca-mock-camera.c b/src/cameras/uca-mock-camera.c index e885475..0198b9f 100644 --- a/src/cameras/uca-mock-camera.c +++ b/src/cameras/uca-mock-camera.c @@ -68,7 +68,7 @@ struct _UcaMockCameraPrivate { guint height; gfloat frame_rate; gfloat max_frame_rate; - guint16 *dummy_data; + guint8 *dummy_data; gboolean thread_running; @@ -100,7 +100,7 @@ static gpointer mock_grab_func(gpointer data) const gulong sleep_time = (gulong) G_USEC_PER_SEC / priv->frame_rate; while (priv->thread_running) { - camera->grab_func(NULL, camera->user_data); + camera->grab_func(priv->dummy_data, camera->user_data); g_usleep(sleep_time); } @@ -282,8 +282,8 @@ static void uca_mock_camera_init(UcaMockCamera *self) self->priv = UCA_MOCK_CAMERA_GET_PRIVATE(self); self->priv->width = 640; self->priv->height = 480; - self->priv->frame_rate = self->priv->max_frame_rate = 100.0f; - self->priv->dummy_data = (guint16 *) g_malloc0(self->priv->width * self->priv->height); + self->priv->frame_rate = self->priv->max_frame_rate = 100000.0f; + self->priv->dummy_data = (guint8 *) g_malloc0(self->priv->width * self->priv->height); self->priv->grab_thread = NULL; self->priv->binnings = g_value_array_new(1); -- cgit v1.2.3