From 22b1839fe2746f5f6a2c759ed84d697d356e13ed Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 20 Feb 2004 14:17:57 +0000 Subject: gst/intfloat/, gst/oneton: Removed, replaced by audioconvert and interleave respectively. Original commit message from CVS: 2004-02-20 Andy Wingo * gst/intfloat/, gst/oneton: Removed, replaced by audioconvert and interleave respectively. * gst/interleave/deinterleave.c: New plugin: deinterleave (replaces on oneton). * gst/interleave/interleave.c: New plugin: interleave. * gst/interleave/plugin.h: Support file. * gst/interleave/plugin.c: Support file. * configure.ac: Remove intfloat and oneton, add interleave. * ext/sndfile/gstsf.c: Handle events better. * gst/audioconvert/gstaudioconvert.c: Change to support int2float and float2int operation. int2float has scheduling problems as noted in in2float_chain. --- ext/sndfile/gstsf.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'ext/sndfile') diff --git a/ext/sndfile/gstsf.c b/ext/sndfile/gstsf.c index 78b8480b..cc7e3d14 100644 --- a/ext/sndfile/gstsf.c +++ b/ext/sndfile/gstsf.c @@ -535,7 +535,7 @@ gst_sf_link (GstPad *pad, const GstCaps *caps) gst_structure_get_int (structure, "rate", &this->rate); gst_structure_get_int (structure, "buffer-frames", &this->buffer_frames); - INFO_OBJ (this, "linked pad %s:%s with fixed caps, frames=%d, rate=%d", + INFO_OBJ (this, "linked pad %s:%s with fixed caps, rate=%d, frames=%d", GST_DEBUG_PAD_NAME (pad), this->rate, this->buffer_frames); if (this->numchannels) { @@ -756,6 +756,7 @@ gst_sf_loop (GstElement *element) for (i=0,l=this->channels; l; l=l->next,i++) { channel = GST_SF_CHANNEL (l); + pull_again: in = GST_BUFFER (gst_pad_pull (channel->pad)); if (buffer_frames == 0) { @@ -776,13 +777,24 @@ gst_sf_loop (GstElement *element) return; /* we've already set gst_element_error */ if (GST_IS_EVENT (in)) { - num_to_write = 0; - } else { + switch (GST_EVENT_TYPE (in)) { + case GST_EVENT_EOS: + case GST_EVENT_INTERRUPT: + num_to_write = 0; + break; + default: + goto pull_again; + break; + } + } + + if (num_to_write) { data = (gfloat*)GST_BUFFER_DATA (in); num_to_write = MIN (num_to_write, GST_BUFFER_SIZE (in) / sizeof (gfloat)); for (j=0; j