From c62995f2fc0bb404616311c43e9e4177d4c18dc1 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sun, 2 Mar 2003 21:58:52 +0000 Subject: Unification of the way to speak to v4l2 and v4l elements... Also fix a segfautl when doing gst-inspect v4l2src Original commit message from CVS: Unification of the way to speak to v4l2 and v4l elements... Also fix a segfautl when doing gst-inspect v4l2src --- sys/v4l2/gstv4l2element.h | 53 ++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 30 deletions(-) (limited to 'sys/v4l2/gstv4l2element.h') diff --git a/sys/v4l2/gstv4l2element.h b/sys/v4l2/gstv4l2element.h index 87ebaad9..0e462036 100644 --- a/sys/v4l2/gstv4l2element.h +++ b/sys/v4l2/gstv4l2element.h @@ -41,28 +41,6 @@ typedef struct _GstV4l2Element GstV4l2Element; typedef struct _GstV4l2ElementClass GstV4l2ElementClass; -typedef enum { - GST_V4L2_ATTRIBUTE_VALUE_TYPE_INTEGER = V4L2_CTRL_TYPE_INTEGER, - GST_V4L2_ATTRIBUTE_VALUE_TYPE_BOOLEAN = V4L2_CTRL_TYPE_BOOLEAN, - GST_V4L2_ATTRIBUTE_VALUE_TYPE_MENU = V4L2_CTRL_TYPE_MENU, - GST_V4L2_ATTRIBUTE_VALUE_TYPE_BUTTON = V4L2_CTRL_TYPE_BUTTON, -} GstV4l2AttributeValueType; - -typedef enum { - GST_V4L2_ATTRIBUTE_TYPE_VIDEO, - GST_V4L2_ATTRIBUTE_TYPE_AUDIO, - GST_V4L2_ATTRIBUTE_TYPE_OTHER, -} GstV4l2AttributeType; - -typedef struct _GstV4l2Attribute { - gint index; - gchar *name; - GstV4l2AttributeType type; - GstV4l2AttributeValueType val_type; - gint min, max, value; - GList *list_items; /* in case of 'list' */ -} GstV4l2Attribute; - struct _GstV4l2Element { GstElement element; @@ -79,10 +57,10 @@ struct _GstV4l2Element { struct v4l2_capability vcap; /* the toys available to us */ - GList /*v4l2_input*/ *inputs; - GList /*v4l2_output*/ *outputs; - GList /*v4l2_enumstd*/ *norms; - GList /*v4l2_queryctrl*/ *controls; + GList /*v4l2_input*/ *inputs, *input_names; + GList /*v4l2_output*/ *outputs, *output_names; + GList /*v4l2_enumstd*/ *norms, *norm_names; + GList /*v4l2_queryctrl*/ *controls, *control_specs; GList /*GList:v4l2_querymenu*/ *menus; /* caching values */ @@ -96,10 +74,25 @@ struct _GstV4l2ElementClass { GstElementClass parent_class; /* signals */ - void (*open) (GstElement *element, - const gchar *device); - void (*close) (GstElement *element, - const gchar *device); + void (*open) (GstElement *element, + const gchar *device); + void (*close) (GstElement *element, + const gchar *device); + + /* actions */ + gboolean (*set_videowindow) (GstElement *element, + gint x_offset, + gint y_offset, + gint height, + gint width, + struct v4l2_clip *clips, + gint num_clips); + gboolean (*get_attribute) (GstElement *element, + const gchar *attr_name, + int *value); + gboolean (*set_attribute) (GstElement *element, + const gchar *attr_name, + const int value); }; -- cgit v1.2.1