diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-01 17:23:14 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-03-01 17:23:14 +0100 |
commit | e26a093b4036083f13265bcbde5eae442d502377 (patch) | |
tree | 1fd30bbeba4eb7c7ee6d1c6d4f5e9593f30882da /test/test-gobject.c | |
parent | b29c78f818ac92f42621c69c29736fe5c8e32c6f (diff) | |
download | uca-e26a093b4036083f13265bcbde5eae442d502377.tar.gz uca-e26a093b4036083f13265bcbde5eae442d502377.tar.bz2 uca-e26a093b4036083f13265bcbde5eae442d502377.tar.xz uca-e26a093b4036083f13265bcbde5eae442d502377.zip |
First draft at clean pco object construction
Diffstat (limited to 'test/test-gobject.c')
-rw-r--r-- | test/test-gobject.c | 16 |
1 files changed, 10 insertions, 6 deletions
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 <glib-object.h> #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); } |