summaryrefslogtreecommitdiffstats
path: root/src/uca-cam.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-04-26 17:20:03 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-04-26 17:20:03 +0200
commitbf265341fea65c31992497338eccfab5bfdf217f (patch)
tree6937b7e1383a44014256833545e7b79a22a878a2 /src/uca-cam.c
parent56d716f47fac506ccaca0cdd934dc2bc1ee6644a (diff)
downloadlibuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.gz
libuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.bz2
libuca-bf265341fea65c31992497338eccfab5bfdf217f.tar.xz
libuca-bf265341fea65c31992497338eccfab5bfdf217f.zip
Make uca_camera really private and thus breaks API
Diffstat (limited to 'src/uca-cam.c')
-rw-r--r--src/uca-cam.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/uca-cam.c b/src/uca-cam.c
index 7b80f56..0225fa1 100644
--- a/src/uca-cam.c
+++ b/src/uca-cam.c
@@ -5,28 +5,14 @@
#include "uca-cam.h"
#include "uca-grabber.h"
-uint32_t uca_cam_alloc(struct uca_camera *cam, uint32_t n_buffers)
-{
- uint32_t bitdepth;
- cam->get_property(cam, UCA_PROP_BITDEPTH, &bitdepth, 0);
- const int pixel_size = bitdepth == 8 ? 1 : 2;
- if (cam->grabber != NULL)
- return cam->grabber->alloc(cam->grabber, pixel_size, n_buffers);
- return UCA_NO_ERROR;
-}
-
-enum uca_cam_state uca_cam_get_state(struct uca_camera *cam)
-{
- return cam->state;
-}
-struct uca_camera *uca_cam_new(void)
+struct uca_camera_priv *uca_cam_new(void)
{
- struct uca_camera *cam = (struct uca_camera *) malloc(sizeof(struct uca_camera));
+ struct uca_camera_priv *cam = (struct uca_camera_priv *) malloc(sizeof(struct uca_camera_priv));
/* Set all function pointers to NULL so we know early on, if something has
* not been implemented. */
- memset(cam, 0, sizeof(struct uca_camera));
+ memset(cam, 0, sizeof(struct uca_camera_priv));
cam->state = UCA_CAM_CONFIGURABLE;
cam->current_frame = 0;