sys/v4l/gstv4lsrc.c (gst_v4lsrc_get_property) (gst_v4lsrc_set_property, gst_v4lsrc_class_init, gst_v4lsrc_init)

Original commit message from CVS:
2005-07-12  Andy Wingo  <wingo@pobox.com>

* sys/v4l/gstv4lsrc.c (gst_v4lsrc_get_property)
(gst_v4lsrc_set_property, gst_v4lsrc_class_init, gst_v4lsrc_init)
(gst_v4lsrc_create): Re-add the copy-mode property, default to
TRUE to avoid deadlocks if an element holds on to our buffers.
This commit is contained in:
Andy Wingo 2005-07-12 17:14:33 +00:00
parent 93614e5f09
commit c9c9cdd7e3
9 changed files with 43 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2005-07-12 Andy Wingo <wingo@pobox.com>
* sys/v4l/gstv4lsrc.c (gst_v4lsrc_get_property)
(gst_v4lsrc_set_property, gst_v4lsrc_class_init, gst_v4lsrc_init)
(gst_v4lsrc_create): Re-add the copy-mode property, default to
TRUE to avoid deadlocks if an element holds on to our buffers.
2005-07-11 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init),

View file

@ -14,6 +14,9 @@ a support library for audio elements
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### ENUM GstAudioFieldFlag ##### -->
<para>

View file

@ -14,6 +14,9 @@ interface for elements that provide color balance operations
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstColorBalance ##### -->
<para>

View file

@ -14,6 +14,9 @@ gconf default elements support
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### FUNCTION gst_gconf_get_string ##### -->
<para>

View file

@ -14,6 +14,9 @@ gstmixer
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstMixer ##### -->
<para>

View file

@ -14,6 +14,9 @@ an implementation of an audio ringbuffer
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstRingBuffer ##### -->
<para>

View file

@ -14,6 +14,9 @@ interface for elements that provide tuner operations
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstTuner ##### -->
<para>

View file

@ -46,6 +46,7 @@ enum
PROP_0,
PROP_AUTOPROBE,
PROP_AUTOPROBE_FPS,
PROP_COPY_MODE,
PROP_TIMESTAMP_OFFSET
};
@ -102,6 +103,10 @@ gst_v4lsrc_class_init (GstV4lSrcClass * klass)
g_param_spec_boolean ("autoprobe-fps", "Autoprobe FPS",
"Whether the device should be probed for framerates",
TRUE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_COPY_MODE,
g_param_spec_boolean ("copy-mode", "Copy mode",
"Whether to send out copies of buffers, or direct pointers to the mmap region",
TRUE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_TIMESTAMP_OFFSET, g_param_spec_int64 ("timestamp-offset",
"Timestamp offset",
@ -129,6 +134,7 @@ gst_v4lsrc_init (GstV4lSrc * v4lsrc)
v4lsrc->is_capturing = FALSE;
v4lsrc->autoprobe = TRUE;
v4lsrc->autoprobe_fps = TRUE;
v4lsrc->copy_mode = TRUE;
v4lsrc->timestamp_offset = 0;
@ -155,6 +161,9 @@ gst_v4lsrc_set_property (GObject * object,
g_return_if_fail (!GST_V4L_IS_ACTIVE (GST_V4LELEMENT (v4lsrc)));
v4lsrc->autoprobe_fps = g_value_get_boolean (value);
break;
case PROP_COPY_MODE:
v4lsrc->copy_mode = g_value_get_boolean (value);
break;
case PROP_TIMESTAMP_OFFSET:
v4lsrc->timestamp_offset = g_value_get_int (value);
break;
@ -178,6 +187,9 @@ gst_v4lsrc_get_property (GObject * object,
case PROP_AUTOPROBE_FPS:
g_value_set_boolean (value, v4lsrc->autoprobe_fps);
break;
case PROP_COPY_MODE:
g_value_set_boolean (value, v4lsrc->copy_mode);
break;
case PROP_TIMESTAMP_OFFSET:
g_value_set_int (value, v4lsrc->timestamp_offset);
break;
@ -638,12 +650,12 @@ gst_v4lsrc_create (GstPushSrc * src, GstBuffer ** buf)
*buf = gst_v4lsrc_buffer_new (v4lsrc, num);
#if 0
GstBuffer *copy = gst_buffer_copy (buf);
if (v4lsrc->copy_mode) {
GstBuffer *copy = gst_buffer_copy (*buf);
gst_buffer_unref (buf);
buf = copy;
#endif
gst_buffer_unref (*buf);
*buf = copy;
}
return GST_FLOW_OK;
}

View file

@ -89,6 +89,7 @@ struct _GstV4lSrc
gboolean autoprobe; /* probe features on startup ? */
gboolean autoprobe_fps; /* probe fps on startup ? */
gboolean copy_mode;
GValue *fps_list; /* list of fps probed */
};