v4l2: remove unused properties
This commit is contained in:
parent
e59498c33d
commit
e6ce9c226f
@ -123,7 +123,6 @@ struct _GstV4l2Object {
|
|||||||
GstV4l2IOMode req_mode;
|
GstV4l2IOMode req_mode;
|
||||||
|
|
||||||
/* optional pool */
|
/* optional pool */
|
||||||
gboolean always_copy;
|
|
||||||
GstBufferPool *pool;
|
GstBufferPool *pool;
|
||||||
|
|
||||||
/* the video device's capabilities */
|
/* the video device's capabilities */
|
||||||
|
@ -67,17 +67,13 @@
|
|||||||
GST_DEBUG_CATEGORY (v4l2src_debug);
|
GST_DEBUG_CATEGORY (v4l2src_debug);
|
||||||
#define GST_CAT_DEFAULT v4l2src_debug
|
#define GST_CAT_DEFAULT v4l2src_debug
|
||||||
|
|
||||||
#define PROP_DEF_ALWAYS_COPY TRUE
|
|
||||||
#define PROP_DEF_DECIMATE 1
|
|
||||||
|
|
||||||
#define DEFAULT_PROP_DEVICE "/dev/video0"
|
#define DEFAULT_PROP_DEVICE "/dev/video0"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
V4L2_STD_OBJECT_PROPS,
|
V4L2_STD_OBJECT_PROPS,
|
||||||
PROP_ALWAYS_COPY,
|
PROP_LAST
|
||||||
PROP_DECIMATE
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* signals and args */
|
/* signals and args */
|
||||||
@ -162,21 +158,6 @@ gst_v4l2src_class_init (GstV4l2SrcClass * klass)
|
|||||||
|
|
||||||
gst_v4l2_object_install_properties_helper (gobject_class,
|
gst_v4l2_object_install_properties_helper (gobject_class,
|
||||||
DEFAULT_PROP_DEVICE);
|
DEFAULT_PROP_DEVICE);
|
||||||
g_object_class_install_property (gobject_class, PROP_ALWAYS_COPY,
|
|
||||||
g_param_spec_boolean ("always-copy", "Always Copy",
|
|
||||||
"If the buffer will or not be used directly from mmap",
|
|
||||||
PROP_DEF_ALWAYS_COPY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
||||||
/**
|
|
||||||
* GstV4l2Src:decimate
|
|
||||||
*
|
|
||||||
* Only use every nth frame
|
|
||||||
*
|
|
||||||
* Since: 0.10.26
|
|
||||||
*/
|
|
||||||
g_object_class_install_property (gobject_class, PROP_DECIMATE,
|
|
||||||
g_param_spec_int ("decimate", "Decimate",
|
|
||||||
"Only use every nth frame", 1, G_MAXINT,
|
|
||||||
PROP_DEF_DECIMATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstV4l2Src::prepare-format:
|
* GstV4l2Src::prepare-format:
|
||||||
@ -240,9 +221,6 @@ gst_v4l2src_init (GstV4l2Src * v4l2src)
|
|||||||
V4L2_BUF_TYPE_VIDEO_CAPTURE, DEFAULT_PROP_DEVICE,
|
V4L2_BUF_TYPE_VIDEO_CAPTURE, DEFAULT_PROP_DEVICE,
|
||||||
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
|
gst_v4l2_get_input, gst_v4l2_set_input, NULL);
|
||||||
|
|
||||||
v4l2src->v4l2object->always_copy = PROP_DEF_ALWAYS_COPY;
|
|
||||||
v4l2src->decimate = PROP_DEF_DECIMATE;
|
|
||||||
|
|
||||||
gst_base_src_set_format (GST_BASE_SRC (v4l2src), GST_FORMAT_TIME);
|
gst_base_src_set_format (GST_BASE_SRC (v4l2src), GST_FORMAT_TIME);
|
||||||
gst_base_src_set_live (GST_BASE_SRC (v4l2src), TRUE);
|
gst_base_src_set_live (GST_BASE_SRC (v4l2src), TRUE);
|
||||||
}
|
}
|
||||||
@ -278,12 +256,6 @@ gst_v4l2src_set_property (GObject * object,
|
|||||||
if (!gst_v4l2_object_set_property_helper (v4l2src->v4l2object,
|
if (!gst_v4l2_object_set_property_helper (v4l2src->v4l2object,
|
||||||
prop_id, value, pspec)) {
|
prop_id, value, pspec)) {
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_ALWAYS_COPY:
|
|
||||||
v4l2src->v4l2object->always_copy = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
case PROP_DECIMATE:
|
|
||||||
v4l2src->decimate = g_value_get_int (value);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -300,12 +272,6 @@ gst_v4l2src_get_property (GObject * object,
|
|||||||
if (!gst_v4l2_object_get_property_helper (v4l2src->v4l2object,
|
if (!gst_v4l2_object_get_property_helper (v4l2src->v4l2object,
|
||||||
prop_id, value, pspec)) {
|
prop_id, value, pspec)) {
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_ALWAYS_COPY:
|
|
||||||
g_value_set_boolean (value, v4l2src->v4l2object->always_copy);
|
|
||||||
break;
|
|
||||||
case PROP_DECIMATE:
|
|
||||||
g_value_set_int (value, v4l2src->decimate);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -801,18 +767,6 @@ gst_v4l2src_fill (GstPushSrc * src, GstBuffer * buf)
|
|||||||
GstClockTime abs_time, base_time, timestamp, duration;
|
GstClockTime abs_time, base_time, timestamp, duration;
|
||||||
GstClockTime delay;
|
GstClockTime delay;
|
||||||
|
|
||||||
#if 0
|
|
||||||
int i;
|
|
||||||
/* decimate, just capture and throw away frames */
|
|
||||||
for (i = 0; i < v4l2src->decimate - 1; i++) {
|
|
||||||
ret = gst_v4l2_buffer_pool_process (obj, buf);
|
|
||||||
if (ret != GST_FLOW_OK) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
gst_buffer_unref (*buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL_CAST (obj->pool), buf);
|
gst_v4l2_buffer_pool_process (GST_V4L2_BUFFER_POOL_CAST (obj->pool), buf);
|
||||||
|
|
||||||
|
@ -60,8 +60,6 @@ struct _GstV4l2Src
|
|||||||
/* pads */
|
/* pads */
|
||||||
GstCaps *probed_caps;
|
GstCaps *probed_caps;
|
||||||
|
|
||||||
int decimate;
|
|
||||||
|
|
||||||
guint64 offset;
|
guint64 offset;
|
||||||
|
|
||||||
GstClockTime ctrl_time;
|
GstClockTime ctrl_time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user