PROP_CAPTURE_CORRECTION_BRIGHTNESS,
PROP_DUMP_RAW,
PROP_DUMP_IMAGE,
+ PROP_DEBUG_FLAGS,
} GstV4L2CamSrcProperties;
#define DEFAULT_PROP_DEVICE_FD -1
#define DEFAULT_PROP_AE_WINDOW "x_left=0,x_right=0,y_bottom=0,y_top=0"
#define DEFAULT_PROP_AF_WINDOW "x_left=0,x_right=0,y_bottom=0,y_top=0"
+#define DEFAULT_DEBUG_FLAGS 0
+#define C_FLAGS(v) ((guint) v)
GType
gst_camera_input_sensor_get_type (void)
return gst_camera_af_metering_mode_type;
}
+GType
+gst_camerasrc_debug_flags_get_type (void)
+{
+ static GType gst_camerasrc_debug_flags = 0;
+ static const GFlagsValue values [] = {
+ {C_FLAGS (GST_CAMERASRC_DEBUG_FLAGS_PERFORMANCE), "Debug flags for performance tuning",
+ "performance"},
+ {C_FLAGS (GST_CAMERASRC_DEBUG_FLAGS_MAKER_NOTE), "Debug flags for maker note",
+ "maker-note"},
+ {0, NULL, NULL},
+ };
+
+ if (G_UNLIKELY (!gst_camerasrc_debug_flags)) {
+ gst_camerasrc_debug_flags =
+ g_flags_register_static ("GstCameraSrcDebugFlags", values);
+ }
+ return gst_camerasrc_debug_flags;
+}
+
GST_IMPLEMENT_V4L2CAMSRC_VIDORIENT_METHODS (GstMFLDV4l2CamSrc, gst_v4l2camsrc);
g_object_class_install_property (gobject_class, PROP_DUMP_IMAGE,
g_param_spec_boolean ("dump-image", "Dump images simultanious in pipeline",
- "Whether dump the images as output when pipeline, debug only,"
+ "Whether dump the images as output in pipeline, debug only,"
"output the image in current directory",
FALSE, G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, PROP_DEBUG_FLAGS,
+ g_param_spec_flags ("debug-flags", "debug flags",
+ "debug flags for development and performance tuning usage",
+ GST_TYPE_CAMERASRC_DEBUG_FLAGS, DEFAULT_DEBUG_FLAGS,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
camera_class->is_open = GST_DEBUG_FUNCPTR (gst_v4l2camsrc_is_open);
camera_class->open = GST_DEBUG_FUNCPTR (gst_v4l2camsrc_open);
camera_class->close = GST_DEBUG_FUNCPTR (gst_v4l2camsrc_close);
v4l2camsrc->dump_raw = FALSE;
v4l2camsrc->dump_image = FALSE;
v4l2camsrc->raw_output_size = 0;
+ v4l2camsrc->debug_flags = DEFAULT_DEBUG_FLAGS;
v4l2camsrc->device_mutex = g_mutex_new ();
case PROP_DUMP_IMAGE:
v4l2camsrc->dump_image = g_value_get_boolean (value);
break;
+ case PROP_DEBUG_FLAGS:
+ v4l2camsrc->debug_flags = g_value_get_flags (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_DUMP_IMAGE:
g_value_set_boolean (value, v4l2camsrc->dump_image);
break;
+ case PROP_DEBUG_FLAGS:
+ g_value_set_flags (value, v4l2camsrc->debug_flags);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;