summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-09 10:10:13 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de>2011-03-09 10:10:13 +0100
commit876c0214e6f341d071929026a08e1b127e8a0b7f (patch)
treedfdd2b510ed02409a989917d9aeeaebae6dcc376 /src
parent12ebb0471719b2993c6dd49c58a5965018737320 (diff)
downloaduca-876c0214e6f341d071929026a08e1b127e8a0b7f.tar.gz
uca-876c0214e6f341d071929026a08e1b127e8a0b7f.tar.bz2
uca-876c0214e6f341d071929026a08e1b127e8a0b7f.tar.xz
uca-876c0214e6f341d071929026a08e1b127e8a0b7f.zip
Almost real video playback
Diffstat (limited to 'src')
-rw-r--r--src/cameras/pco.c6
-rw-r--r--src/grabbers/me4.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/cameras/pco.c b/src/cameras/pco.c
index b84ee01..ccf7d90 100644
--- a/src/cameras/pco.c
+++ b/src/cameras/pco.c
@@ -48,6 +48,7 @@ static uint32_t uca_pco_acquire_image(struct uca_camera_t *cam, void *buffer)
static uint32_t uca_pco_destroy(struct uca_camera_t *cam)
{
+ pco_set_rec_state(GET_PCO(cam), 0);
pco_destroy(GET_PCO(cam));
return UCA_NO_ERROR;
}
@@ -231,7 +232,8 @@ uint32_t uca_pco_grab(struct uca_camera_t *cam, char *buffer)
if (err != UCA_NO_ERROR)
return err;
/* FIXME: choose according to data format */
- pco_reorder_image_5x16((uint16_t *) buffer, frame, cam->frame_width, cam->frame_height);
+ //pco_reorder_image_5x16((uint16_t *) buffer, frame, cam->frame_width, cam->frame_height);
+ memcpy(buffer, frame, cam->frame_width*cam->frame_height*2);
return UCA_NO_ERROR;
}
@@ -251,7 +253,7 @@ uint32_t uca_pco_init(struct uca_camera_t **cam, struct uca_grabber_t *grabber)
struct uca_camera_t *uca = (struct uca_camera_t *) malloc(sizeof(struct uca_camera_t));
uca->user = pco;
uca->grabber = grabber;
- uca->grabber->asynchronous = false;
+ uca->grabber->asynchronous = true;
/* Camera found, set function pointers... */
uca->destroy = &uca_pco_destroy;
diff --git a/src/grabbers/me4.c b/src/grabbers/me4.c
index 17b46e3..a833c07 100644
--- a/src/grabbers/me4.c
+++ b/src/grabbers/me4.c
@@ -18,8 +18,10 @@ struct uca_me4_grabber_t {
uint32_t uca_me4_destroy(struct uca_grabber_t *grabber)
{
- if (grabber != NULL)
+ if (grabber != NULL) {
+ Fg_FreeMemEx(GET_FG(grabber), GET_MEM(grabber));
Fg_FreeGrabber(GET_FG(grabber));
+ }
}
uint32_t uca_me4_set_property(struct uca_grabber_t *grabber, enum uca_property_ids property, void *data)