summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-11-29 11:31:26 -0300
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>2010-12-08 15:38:27 -0300
commit6c7d7946f53aed028d66cf48e81edd39b2a433e6 (patch)
tree30d69d600a11d1a0b576e364b515d1fe8a38e486
parent9095ee429a28c7f6c3033d0b0f353ca16d12130d (diff)
camerabin2: Keep mode definition at -enum file
Use 'mode' enum definition from gstcamerabin-enum file to avoid conflicts between v4l2camerasrc and gstcamerabin2 modes. For now there is a MODE_PREVIEW there that is only used on the camerasrc, not sure if we are keeping it at the future, but for now this works.
-rw-r--r--gst/camerabin2/gstcamerabin-enum.c2
-rw-r--r--gst/camerabin2/gstcamerabin2.c35
2 files changed, 2 insertions, 35 deletions
diff --git a/gst/camerabin2/gstcamerabin-enum.c b/gst/camerabin2/gstcamerabin-enum.c
index 8d1d0c92d..ac80d0b0a 100644
--- a/gst/camerabin2/gstcamerabin-enum.c
+++ b/gst/camerabin2/gstcamerabin-enum.c
@@ -72,7 +72,7 @@ gst_camerabin_mode_get_type (void)
{0, NULL, NULL}
};
- gtype = g_enum_register_static ("GstCameraBinMode", values);
+ gtype = g_enum_register_static ("GstCameraBin2Mode", values);
}
return gtype;
}
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index 9ea7bfb1d..b6705d803 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -27,6 +27,7 @@
#endif
#include "gstcamerabin2.h"
+#include "gstcamerabin-enum.h"
GST_DEBUG_CATEGORY_STATIC (gst_camera_bin_debug);
#define GST_CAT_DEFAULT gst_camera_bin_debug
@@ -56,40 +57,6 @@ static guint camerabin_signals[LAST_SIGNAL];
* and GObject types *
********************************/
-#define GST_TYPE_CAMERABIN_MODE (gst_camerabin_mode_get_type ())
-/**
- * GstCameraBinMode:
- * @MODE_PREVIEW: preview only (no capture) mode
- * @MODE_IMAGE: image capture
- * @MODE_VIDEO: video capture
- *
- * Capture mode to use.
- */
-typedef enum
-{
- MODE_PREVIEW = 0, /* TODO do we have an use for this? */
- MODE_IMAGE = 1,
- MODE_VIDEO = 2,
-} GstCameraBinMode;
-
-static GType
-gst_camerabin_mode_get_type (void)
-{
- static GType gtype = 0;
-
- if (gtype == 0) {
- static const GEnumValue values[] = {
- {MODE_IMAGE, "Still image capture (default)", "mode-image"},
- {MODE_VIDEO, "Video recording", "mode-video"},
- {0, NULL, NULL}
- };
-
- gtype = g_enum_register_static ("GstCameraBin2Mode", values);
- }
- return gtype;
-}
-
-
static GstPipelineClass *parent_class;
static void gst_camera_bin_class_init (GstCameraBinClass * klass);
static void gst_camera_bin_base_init (gpointer klass);