diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-06 15:07:32 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-06 15:07:32 +0100 |
commit | 09d05f26269799e643c171849f22d24c30836d00 (patch) | |
tree | de03376e0f66289fe3b4f843e246de0609e422d4 /test/test-all.c | |
parent | 67f9f44a2b42314617368705805e8e3c6c00256e (diff) | |
download | libuca-09d05f26269799e643c171849f22d24c30836d00.tar.gz libuca-09d05f26269799e643c171849f22d24c30836d00.tar.bz2 libuca-09d05f26269799e643c171849f22d24c30836d00.tar.xz libuca-09d05f26269799e643c171849f22d24c30836d00.zip |
pco: Implement mandatory properties
Diffstat (limited to 'test/test-all.c')
-rw-r--r-- | test/test-all.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test-all.c b/test/test-all.c index ee84d24..3fb81e7 100644 --- a/test/test-all.c +++ b/test/test-all.c @@ -14,7 +14,7 @@ static void fixture_setup(Fixture *fixture, gconstpointer data) const gchar *type = (gchar *) data; GError *error = NULL; fixture->camera = uca_camera_new(type, &error); - g_assert(error == NULL); + g_assert_no_error(error); g_assert(fixture->camera); } @@ -81,8 +81,13 @@ static void test_recording_async(Fixture *fixture, gconstpointer data) gboolean success = FALSE; uca_camera_set_grab_func(camera, grab_func, &success); + gfloat max_frame_rate = 1.0f; + g_object_get(G_OBJECT(camera), + "max-frame-rate", &max_frame_rate, + NULL); + g_assert(max_frame_rate != 0.0f); + g_object_set(G_OBJECT(camera), - "framerate", 10, "transfer-asynchronously", TRUE, NULL); @@ -90,7 +95,7 @@ static void test_recording_async(Fixture *fixture, gconstpointer data) uca_camera_start_recording(camera, &error); g_assert_no_error(error); - g_usleep(G_USEC_PER_SEC / 8); + g_usleep(G_USEC_PER_SEC / ((gulong) (max_frame_rate / 2.0f))); uca_camera_stop_recording(camera, &error); g_assert_no_error(error); |