summaryrefslogtreecommitdiffstats
path: root/src/cameras/dummy.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/cameras/dummy.c
parent56d716f47fac506ccaca0cdd934dc2bc1ee6644a (diff)
downloaduca-bf265341fea65c31992497338eccfab5bfdf217f.tar.gz
uca-bf265341fea65c31992497338eccfab5bfdf217f.tar.bz2
uca-bf265341fea65c31992497338eccfab5bfdf217f.tar.xz
uca-bf265341fea65c31992497338eccfab5bfdf217f.zip
Make uca_camera really private and thus breaks API
Diffstat (limited to 'src/cameras/dummy.c')
-rw-r--r--src/cameras/dummy.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/cameras/dummy.c b/src/cameras/dummy.c
index 2bb0400..0283989 100644
--- a/src/cameras/dummy.c
+++ b/src/cameras/dummy.c
@@ -106,7 +106,7 @@ static void uca_dummy_print_number(char *buffer, int number, int x, int y, int w
}
}
-static void uca_dummy_memcpy(struct uca_camera *cam, char *buffer)
+static void uca_dummy_memcpy(struct uca_camera_priv *cam, char *buffer)
{
/* print current frame number */
unsigned int number = cam->current_frame;
@@ -127,7 +127,7 @@ static __suseconds_t uca_dummy_time_diff(struct timeval *start, struct timeval *
static void *uca_dummy_grab_thread(void *arg)
{
- struct uca_camera *cam = ((struct uca_camera *) arg);
+ struct uca_camera_priv *cam = ((struct uca_camera_priv *) arg);
struct dummy_cam *dc = GET_DUMMY(cam);
assert(dc->frame_rate > 0);
@@ -156,7 +156,7 @@ static void *uca_dummy_grab_thread(void *arg)
/*
* --- interface implementations ----------------------------------------------
*/
-static uint32_t uca_dummy_set_property(struct uca_camera *cam, enum uca_property_ids property, void *data)
+static uint32_t uca_dummy_set_property(struct uca_camera_priv *cam, enum uca_property_ids property, void *data)
{
uint32_t err = UCA_ERR_CAMERA | UCA_ERR_PROP;
if (cam->state == UCA_CAM_RECORDING)
@@ -182,7 +182,7 @@ static uint32_t uca_dummy_set_property(struct uca_camera *cam, enum uca_property
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_get_property(struct uca_camera *cam, enum uca_property_ids property, void *data, size_t num)
+static uint32_t uca_dummy_get_property(struct uca_camera_priv *cam, enum uca_property_ids property, void *data, size_t num)
{
switch (property) {
case UCA_PROP_NAME:
@@ -223,7 +223,7 @@ static uint32_t uca_dummy_get_property(struct uca_camera *cam, enum uca_property
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_start_recording(struct uca_camera *cam)
+static uint32_t uca_dummy_start_recording(struct uca_camera_priv *cam)
{
if (cam->callback != NULL) {
#ifdef HAVE_PTHREADS
@@ -239,7 +239,7 @@ static uint32_t uca_dummy_start_recording(struct uca_camera *cam)
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_stop_recording(struct uca_camera *cam)
+static uint32_t uca_dummy_stop_recording(struct uca_camera_priv *cam)
{
struct dummy_cam *dc = GET_DUMMY(cam);
if (cam->callback != NULL) {
@@ -251,7 +251,7 @@ static uint32_t uca_dummy_stop_recording(struct uca_camera *cam)
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_register_callback(struct uca_camera *cam, uca_cam_grab_callback cb, void *user)
+static uint32_t uca_dummy_register_callback(struct uca_camera_priv *cam, uca_cam_grab_callback cb, void *user)
{
if (cam->callback == NULL) {
cam->callback = cb;
@@ -263,7 +263,7 @@ static uint32_t uca_dummy_register_callback(struct uca_camera *cam, uca_cam_grab
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_grab(struct uca_camera *cam, char *buffer, void *meta_data)
+static uint32_t uca_dummy_grab(struct uca_camera_priv *cam, char *buffer, void *meta_data)
{
if (cam->callback != NULL)
return UCA_ERR_CAMERA | UCA_ERR_CALLBACK | UCA_ERR_ALREADY_REGISTERED;
@@ -273,7 +273,7 @@ static uint32_t uca_dummy_grab(struct uca_camera *cam, char *buffer, void *meta_
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_destroy(struct uca_camera *cam)
+static uint32_t uca_dummy_destroy(struct uca_camera_priv *cam)
{
struct dummy_cam *dc = GET_DUMMY(cam);
free(dc->buffer);
@@ -281,14 +281,14 @@ static uint32_t uca_dummy_destroy(struct uca_camera *cam)
return UCA_NO_ERROR;
}
-static uint32_t uca_dummy_ignore(struct uca_camera *cam)
+static uint32_t uca_dummy_ignore(struct uca_camera_priv *cam)
{
return UCA_NO_ERROR;
}
-uint32_t uca_dummy_init(struct uca_camera **cam, struct uca_grabber *grabber)
+uint32_t uca_dummy_init(struct uca_camera_priv **cam, struct uca_grabber_priv *grabber)
{
- struct uca_camera *uca = uca_cam_new();
+ struct uca_camera_priv *uca = uca_cam_new();
uca->destroy = &uca_dummy_destroy;
uca->set_property = &uca_dummy_set_property;