From e26a093b4036083f13265bcbde5eae442d502377 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 1 Mar 2012 17:23:14 +0100 Subject: First draft at clean pco object construction --- test/test-gobject.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'test/test-gobject.c') diff --git a/test/test-gobject.c b/test/test-gobject.c index 392a4f3..44a13cb 100644 --- a/test/test-gobject.c +++ b/test/test-gobject.c @@ -1,20 +1,24 @@ #include #include "uca-camera.h" -#include "uca-mock-camera.h" +#include "uca-pco-camera.h" int main(int argc, char **argv) { g_type_init(); - UcaMockCamera *cam = (UcaMockCamera *) g_object_new(UCA_TYPE_MOCK_CAMERA, NULL); + GError *error = NULL; + UcaPcoCamera *cam = uca_pco_camera_new(&error); - guint width; + if (cam == NULL) { + g_error("Camera could not be initialized\n"); + } + + guint width, height; g_object_get(cam, "sensor-width", &width, + "sensor-height", &height, NULL); - g_print("width = %i\n", width); - - uca_camera_start_recording(UCA_CAMERA(cam)); + g_print("resolution %ix%i\n", width, height); g_object_unref(cam); } -- cgit v1.2.3