summaryrefslogtreecommitdiffstats
path: root/test/test-gobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-gobject.c')
-rw-r--r--test/test-gobject.c16
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);
}