remove num-buffers property before moving it

Original commit message from CVS:
remove num-buffers property before moving it
This commit is contained in:
Thomas Vander Stichele 2005-07-11 12:40:15 +00:00
parent d6a5e62b65
commit 93614e5f09
3 changed files with 9 additions and 25 deletions

View file

@ -1,3 +1,12 @@
2005-07-11 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init),
(gst_sinesrc_init), (gst_sinesrc_create),
(gst_sinesrc_set_property), (gst_sinesrc_get_property),
(gst_sinesrc_start):
* gst/sine/gstsinesrc.h:
removing num-buffers property before moving it
2005-07-10 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:

View file

@ -55,7 +55,6 @@ enum
ARG_FREQ,
ARG_VOLUME,
ARG_SYNC,
ARG_NUM_BUFFERS,
ARG_TIMESTAMP_OFFSET,
};
@ -162,10 +161,6 @@ gst_sinesrc_class_init (GstSineSrcClass * klass)
g_object_class_install_property (gobject_class, ARG_SYNC,
g_param_spec_boolean ("sync", "Sync", "Synchronize to clock",
FALSE, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_NUM_BUFFERS,
g_param_spec_int ("num-buffers", "num-buffers",
"Number of buffers to output before sending EOS", -1, G_MAXINT,
0, G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_TIMESTAMP_OFFSET,
g_param_spec_int64 ("timestamp-offset", "Timestamp offset",
"An offset added to timestamps set on buffers (in ns)", G_MININT64,
@ -199,8 +194,6 @@ gst_sinesrc_init (GstSineSrc * src)
src->timestamp = G_GINT64_CONSTANT (0);
src->offset = G_GINT64_CONSTANT (0);
src->timestamp_offset = G_GINT64_CONSTANT (0);
src->num_buffers = -1;
src->num_buffers_left = -1;
src->seq = 0;
@ -361,15 +354,6 @@ gst_sinesrc_create (GstBaseSrc * basesrc, guint64 offset,
buf = gst_buffer_new_and_alloc (src->samples_per_buffer * 2);
gst_buffer_set_caps (buf, GST_PAD_CAPS (basesrc->srcpad));
if (src->num_buffers_left == 0) {
/* FIXME: there's no GST_FLOW_ applicable for EOS, so we return ERROR
* even though nothing's wrong */
return GST_FLOW_ERROR;
} else {
if (src->num_buffers_left > 0)
src->num_buffers_left--;
}
GST_BUFFER_TIMESTAMP (buf) = src->timestamp + src->timestamp_offset;
/* offset is the number of samples */
GST_BUFFER_OFFSET (buf) = src->offset;
@ -454,9 +438,6 @@ gst_sinesrc_set_property (GObject * object, guint prop_id,
case ARG_SYNC:
src->sync = g_value_get_boolean (value);
break;
case ARG_NUM_BUFFERS:
src->num_buffers = g_value_get_int (value);
break;
case ARG_TIMESTAMP_OFFSET:
src->timestamp_offset = g_value_get_int64 (value);
break;
@ -490,9 +471,6 @@ gst_sinesrc_get_property (GObject * object, guint prop_id,
case ARG_SYNC:
g_value_set_boolean (value, src->sync);
break;
case ARG_NUM_BUFFERS:
g_value_set_int (value, src->num_buffers);
break;
case ARG_TIMESTAMP_OFFSET:
g_value_set_int64 (value, src->timestamp_offset);
break;
@ -509,7 +487,6 @@ gst_sinesrc_start (GstBaseSrc * basesrc)
src->timestamp = G_GINT64_CONSTANT (0);
src->offset = G_GINT64_CONSTANT (0);
src->num_buffers_left = src->num_buffers;
return TRUE;
}

View file

@ -84,8 +84,6 @@ struct _GstSineSrc {
GstClock *clock;
GstClockTimeDiff timestamp_offset;
gint num_buffers, num_buffers_left;
};
struct _GstSineSrcClass {