mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 21:12:26 +00:00
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.
This commit is contained in:
parent
9095ee429a
commit
6c7d7946f5
2 changed files with 2 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue