summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-02-03 16:14:18 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-02-03 16:14:18 +0100
commit85546868f4df692803d21ddbaa20673fd8b5be0b (patch)
tree8a8079c69adf483b6ab2dd435faf1ba72191287c /test
parent0da06d904850330f583e1e8cdededcf6aa8cbe29 (diff)
downloaduca-85546868f4df692803d21ddbaa20673fd8b5be0b.tar.gz
uca-85546868f4df692803d21ddbaa20673fd8b5be0b.tar.bz2
uca-85546868f4df692803d21ddbaa20673fd8b5be0b.tar.xz
uca-85546868f4df692803d21ddbaa20673fd8b5be0b.zip
Typedef types
Diffstat (limited to 'test')
-rw-r--r--test/benchmark.c6
-rw-r--r--test/control.c18
-rw-r--r--test/enum.c6
-rw-r--r--test/grab-async.c6
-rw-r--r--test/grab.c4
5 files changed, 20 insertions, 20 deletions
diff --git a/test/benchmark.c b/test/benchmark.c
index 60d030d..0d7962a 100644
--- a/test/benchmark.c
+++ b/test/benchmark.c
@@ -35,7 +35,7 @@ void grab_callback_raw(uint32_t image_number, void *buffer, void *meta_data, voi
*count = image_number;
}
-void benchmark_cam(struct uca_camera *cam)
+void benchmark_cam(uca_camera *cam)
{
char name[256];
uca_cam_get_property(cam, UCA_PROP_NAME, name, 256);
@@ -81,7 +81,7 @@ void benchmark_cam(struct uca_camera *cam)
int main(int argc, char *argv[])
{
- struct uca *u = uca_init(NULL);
+ uca *u = uca_init(NULL);
if (u == NULL) {
printf("Couldn't find a camera\n");
return 1;
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
printf("# camera;width;height;experiment;frames-per-second;throughput in MB/s\n");
/* take first camera */
- struct uca_camera *cam = u->cameras;
+ uca_camera *cam = u->cameras;
while (cam != NULL) {
benchmark_cam(cam);
cam = cam->next;
diff --git a/test/control.c b/test/control.c
index 372acf6..4397dbe 100644
--- a/test/control.c
+++ b/test/control.c
@@ -40,8 +40,8 @@ typedef struct {
int width;
int height;
int pixel_size;
- struct uca_camera *cam;
- struct uca *u;
+ uca_camera *cam;
+ uca *u;
float scale;
} ThreadData;
@@ -103,7 +103,7 @@ void reallocate_buffers(ThreadData *td, int width, int height)
void *grab_thread(void *args)
{
ThreadData *data = (ThreadData *) args;
- struct uca_camera *cam = data->cam;
+ uca_camera *cam = data->cam;
char filename[FILENAME_MAX] = {0,};
int counter = 0;
@@ -210,7 +210,7 @@ void on_valuecell_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_
GtkTreeIter iter;
if (gtk_tree_model_get_iter(tree_model, &iter, tree_path)) {
- struct uca_camera *cam = value_data->thread_data->cam;
+ uca_camera *cam = value_data->thread_data->cam;
uint32_t prop_id;
gtk_tree_model_get(tree_model, &iter, COLUMN_UCA_ID, &prop_id, -1);
@@ -297,10 +297,10 @@ static void find_recursively(GtkTreeStore *store, GtkTreeIter *root, GtkTreeIter
find_recursively(store, &iter, result, tokens, depth+1);
}
-static void fill_tree_store(GtkTreeStore *tree_store, struct uca_camera *cam)
+static void fill_tree_store(GtkTreeStore *tree_store, uca_camera *cam)
{
GtkTreeIter iter, child;
- struct uca_property *property;
+ uca_property *property;
const size_t num_bytes = 256;
gchar *value_string = g_malloc(num_bytes);
guint8 value_8;
@@ -354,7 +354,7 @@ static void value_cell_data_func(GtkTreeViewColumn *column, GtkCellRenderer *cel
uint32_t prop_id;
gtk_tree_model_get(model, iter, COLUMN_UCA_ID, &prop_id, -1);
- struct uca_property *property = uca_get_full_property(prop_id);
+ uca_property *property = uca_get_full_property(prop_id);
if (property->access & uca_write) {
g_object_set(cell, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
g_object_set(GTK_CELL_RENDERER_TEXT(cell), "editable", TRUE, NULL);
@@ -369,14 +369,14 @@ static void value_cell_data_func(GtkTreeViewColumn *column, GtkCellRenderer *cel
int main(int argc, char *argv[])
{
- struct uca *u = uca_init(NULL);
+ uca *u = uca_init(NULL);
if (u == NULL) {
g_print("Couldn't initialize frame grabber and/or cameras\n");
return 1;
}
int width, height, bits_per_sample;
- struct uca_camera *cam = u->cameras;
+ uca_camera *cam = u->cameras;
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_per_sample, 0);
diff --git a/test/enum.c b/test/enum.c
index 148304c..17b595f 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -36,14 +36,14 @@ void print_level(int depth)
int main(int argc, char *argv[])
{
- struct uca *u = uca_init(NULL);
+ uca *u = uca_init(NULL);
if (u == NULL) {
printf("Couldn't find a camera\n");
return 1;
}
/* take first camera */
- struct uca_camera *cam = u->cameras;
+ uca_camera *cam = u->cameras;
const size_t num_bytes = 256;
char string_value[num_bytes];
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
while (cam != NULL) {
for (int i = 0; i < UCA_PROP_LAST; i++) {
- struct uca_property *prop = uca_get_full_property(i);
+ uca_property *prop = uca_get_full_property(i);
print_level(count_dots(prop->name));
printf("%s = ", prop->name);
switch (prop->type) {
diff --git a/test/grab-async.c b/test/grab-async.c
index 7bcd5f7..53cf9ad 100644
--- a/test/grab-async.c
+++ b/test/grab-async.c
@@ -26,7 +26,7 @@ struct image_props {
uint32_t bits;
};
-enum uca_buffer_status grab_callback(uint64_t image_number, void *buffer, void *meta_data, void *user)
+uca_buffer_status grab_callback(uint64_t image_number, void *buffer, void *meta_data, void *user)
{
struct image_props *props = (struct image_props *) user;
const int pixel_size = props->bits == 8 ? 1 : 2;
@@ -46,14 +46,14 @@ enum uca_buffer_status grab_callback(uint64_t image_number, void *buffer, void *
int main(int argc, char *argv[])
{
- struct uca *u = uca_init(NULL);
+ uca *u = uca_init(NULL);
if (u == NULL) {
printf("Couldn't find a camera\n");
return 1;
}
/* take first camera */
- struct uca_camera *cam = u->cameras;
+ uca_camera *cam = u->cameras;
uint32_t val = 5000;
uca_cam_set_property(cam, UCA_PROP_EXPOSURE, &val);
diff --git a/test/grab.c b/test/grab.c
index 54e6955..16bafb1 100644
--- a/test/grab.c
+++ b/test/grab.c
@@ -24,7 +24,7 @@
#define handle_error(errno) {if ((errno) != UCA_NO_ERROR) printf("error at <%s:%i>\n", \
__FILE__, __LINE__);}
-static struct uca *u = NULL;
+uca *u = NULL;
void sigint_handler(int signal)
{
@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
}
/* take first camera */
- struct uca_camera *cam = u->cameras;
+ uca_camera *cam = u->cameras;
uint32_t val = 5000;
handle_error(uca_cam_set_property(cam, UCA_PROP_EXPOSURE, &val));