diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-05 17:20:27 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-05 17:20:27 +0100 |
commit | 03739354e074c547d99a6992a7774c3643d17da1 (patch) | |
tree | 37091acf1b6101493f9243fbd5b5201be951fdce /test/test-gobject.c | |
parent | 0483c86add2f496021560b82476d22e2497006be (diff) | |
download | libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.gz libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.bz2 libuca-03739354e074c547d99a6992a7774c3643d17da1.tar.xz libuca-03739354e074c547d99a6992a7774c3643d17da1.zip |
Add factory method to create new cameras
Diffstat (limited to 'test/test-gobject.c')
-rw-r--r-- | test/test-gobject.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/test/test-gobject.c b/test/test-gobject.c index 3ff77bf..e8b14a8 100644 --- a/test/test-gobject.c +++ b/test/test-gobject.c @@ -6,19 +6,11 @@ int main(int argc, char **argv) { g_type_init(); - GError *error = NULL; - UcaMockCamera *cam = uca_mock_camera_new(&error); + gchar **types = uca_camera_get_types(); - if (cam == NULL) { - g_error("Camera could not be initialized\n"); + for (guint i = 0; i < g_strv_length(types); i++) { + g_print("Camera: %s\n", types[i]); } - guint width, height; - g_object_get(cam, - "sensor-width", &width, - "sensor-height", &height, - NULL); - g_print("resolution %ix%i\n", width, height); - - g_object_unref(cam); + g_strfreev(types); } |