summaryrefslogtreecommitdiffstats
path: root/test/benchmark.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-04-26 17:20:03 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-04-26 17:20:03 +0200
commitbf265341fea65c31992497338eccfab5bfdf217f (patch)
tree6937b7e1383a44014256833545e7b79a22a878a2 /test/benchmark.c
parent56d716f47fac506ccaca0cdd934dc2bc1ee6644a (diff)
downloadlibuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.gz
libuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.bz2
libuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.xz
libuca-bf265341fea65c31992497338eccfab5bfdf217f.zip
Make uca_camera really private and thus breaks API
Diffstat (limited to 'test/benchmark.c')
-rw-r--r--test/benchmark.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/benchmark.c b/test/benchmark.c
index 900b66a..ae7593a 100644
--- a/test/benchmark.c
+++ b/test/benchmark.c
@@ -23,35 +23,35 @@ void grab_callback_raw(uint32_t image_number, void *buffer, void *meta_data, voi
void benchmark_cam(struct uca_camera *cam)
{
char name[256];
- cam->get_property(cam, UCA_PROP_NAME, name, 256);
+ uca_cam_get_property(cam, UCA_PROP_NAME, name, 256);
uint32_t val = 5000;
- cam->set_property(cam, UCA_PROP_EXPOSURE, &val);
+ uca_cam_set_property(cam, UCA_PROP_EXPOSURE, &val);
val = 0;
- cam->set_property(cam, UCA_PROP_DELAY, &val);
+ uca_cam_set_property(cam, UCA_PROP_DELAY, &val);
uint32_t width, height, bits;
- cam->get_property(cam, UCA_PROP_WIDTH, &width, 0);
- cam->get_property(cam, UCA_PROP_HEIGHT, &height, 0);
- cam->get_property(cam, UCA_PROP_BITDEPTH, &bits, 0);
+ uca_cam_get_property(cam, UCA_PROP_WIDTH, &width, 0);
+ uca_cam_get_property(cam, UCA_PROP_HEIGHT, &height, 0);
+ uca_cam_get_property(cam, UCA_PROP_BITDEPTH, &bits, 0);
int pixel_size = bits == 8 ? 1 : 2;
struct timeval start, stop;
for (int i = 0; i < 2; i++) {
char *buffer = (char *) malloc(width*height*pixel_size);
- cam->set_property(cam, UCA_PROP_HEIGHT, &height);
+ uca_cam_set_property(cam, UCA_PROP_HEIGHT, &height);
uca_cam_alloc(cam, 20);
/*
* Experiment 1: Grab n frames manually
*/
gettimeofday(&start, NULL);
- cam->start_recording(cam);
+ uca_cam_start_recording(cam);
for (int i = 0; i < 1000; i++)
- cam->grab(cam, (char *) buffer, NULL);
+ uca_cam_grab(cam, (char *) buffer, NULL);
- cam->stop_recording(cam);
+ uca_cam_stop_recording(cam);
gettimeofday(&stop, NULL);
float seconds = time_diff(&start, &stop) / 1000000.0;