summaryrefslogtreecommitdiffstats
path: root/src/uca-camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uca-camera.c')
-rw-r--r--src/uca-camera.c122
1 files changed, 6 insertions, 116 deletions
diff --git a/src/uca-camera.c b/src/uca-camera.c
index 78adae3..e34bf62 100644
--- a/src/uca-camera.c
+++ b/src/uca-camera.c
@@ -20,26 +20,6 @@
#include "uca-camera.h"
#include "uca-enums.h"
-#ifdef HAVE_PCO_CL
-#include "cameras/uca-pco-camera.h"
-#endif
-
-#ifdef HAVE_PYLON_CAMERA
-#include "cameras/uca-pylon-camera.h"
-#endif
-
-#ifdef HAVE_MOCK_CAMERA
-#include "cameras/uca-mock-camera.h"
-#endif
-
-#ifdef HAVE_UFO_CAMERA
-#include "cameras/uca-ufo-camera.h"
-#endif
-
-#ifdef HAVE_PHOTON_FOCUS
-#include "cameras/uca-pf-camera.h"
-#endif
-
#define UCA_CAMERA_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), UCA_TYPE_CAMERA, UcaCameraPrivate))
G_DEFINE_TYPE(UcaCamera, uca_camera, G_TYPE_OBJECT)
@@ -65,25 +45,6 @@ GQuark uca_camera_error_quark()
return g_quark_from_static_string("uca-camera-error-quark");
}
-static gchar *uca_camera_types[] = {
-#ifdef HAVE_PCO_CL
- "pco",
-#endif
-#ifdef HAVE_PYLON_CAMERA
- "pylon",
-#endif
-#ifdef HAVE_MOCK_CAMERA
- "mock",
-#endif
-#ifdef HAVE_UFO_CAMERA
- "ufo",
-#endif
-#ifdef HAVE_PHOTON_FOCUS
- "pf",
-#endif
- NULL
-};
-
enum {
LAST_SIGNAL
};
@@ -126,7 +87,8 @@ struct _UcaCameraPrivate {
gboolean transfer_async;
};
-static void uca_camera_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+static void
+uca_camera_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
UcaCameraPrivate *priv = UCA_CAMERA_GET_PRIVATE(object);
@@ -145,7 +107,8 @@ static void uca_camera_set_property(GObject *object, guint property_id, const GV
}
}
-static void uca_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+static void
+uca_camera_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
UcaCameraPrivate *priv = UCA_CAMERA_GET_PRIVATE(object);
@@ -167,7 +130,8 @@ static void uca_camera_get_property(GObject *object, guint property_id, GValue *
}
}
-static void uca_camera_class_init(UcaCameraClass *klass)
+static void
+uca_camera_class_init(UcaCameraClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
gobject_class->set_property = uca_camera_set_property;
@@ -370,80 +334,6 @@ static void uca_camera_init(UcaCamera *camera)
*/
}
-static UcaCamera *uca_camera_new_from_type(const gchar *type, GError **error)
-{
-#ifdef HAVE_MOCK_CAMERA
- if (!g_strcmp0(type, "mock"))
- return UCA_CAMERA(uca_mock_camera_new(error));
-#endif
-
-#ifdef HAVE_PCO_CL
- if (!g_strcmp0(type, "pco"))
- return UCA_CAMERA(uca_pco_camera_new(error));
-#endif
-
-#ifdef HAVE_PYLON_CAMERA
- if (!g_strcmp0(type, "pylon"))
- return UCA_CAMERA(uca_pylon_camera_new(error));
-#endif
-
-#ifdef HAVE_UFO_CAMERA
- if (!g_strcmp0(type, "ufo"))
- return UCA_CAMERA(uca_ufo_camera_new(error));
-#endif
-
-#ifdef HAVE_PHOTON_FOCUS
- if (!g_strcmp0(type, "pf"))
- return UCA_CAMERA(uca_pf_camera_new(error));
-#endif
-
- return NULL;
-}
-
-/**
- * uca_camera_get_types:
- *
- * Enumerate all camera types that can be instantiated with uca_camera_new().
- *
- * Returns: An array of strings with camera types. The list should be freed with
- * g_strfreev().
- */
-gchar **uca_camera_get_types()
-{
- return g_strdupv(uca_camera_types);
-}
-
-/**
- * uca_camera_new:
- * @type: Type name of the camera
- * @error: Location to store an error or %NULL
- *
- * Factory method for instantiating cameras by names listed in
- * uca_camera_get_types().
- *
- * Returns: A new #UcaCamera of the correct type or %NULL if type was not found
- */
-UcaCamera *uca_camera_new(const gchar *type, GError **error)
-{
- UcaCamera *camera = NULL;
- GError *tmp_error = NULL;
-
- camera = uca_camera_new_from_type(type, &tmp_error);
-
- if (tmp_error != NULL) {
- g_propagate_error(error, tmp_error);
- return NULL;
- }
-
- if ((tmp_error == NULL) && (camera == NULL)) {
- g_set_error(error, UCA_CAMERA_ERROR, UCA_CAMERA_ERROR_NOT_FOUND,
- "Camera type %s not found", type);
- return NULL;
- }
-
- return camera;
-}
-
/**
* uca_camera_start_recording:
* @camera: A #UcaCamera object