diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-04-02 17:51:35 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-04-02 17:51:35 +0200 |
commit | d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1 (patch) | |
tree | 79bbfe426bce6539b8bd19794d360fa0083c68ed /src | |
parent | c61f2b6a2e88aa6ccea1525b6de165fad6db8541 (diff) | |
download | uca-d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1.tar.gz uca-d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1.tar.bz2 uca-d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1.tar.xz uca-d4791c5758e5c2cc1bd6f08a2bda5abc0eb9c4b1.zip |
Add test to measure lib overhead
Diffstat (limited to 'src')
-rw-r--r-- | src/cameras/uca-mock-camera.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); |