From f096b8a8d81239e22477f222d774f8c48a03b06e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 6 Dec 2011 15:06:12 +0100 Subject: [PATCH] ringbuffer: remove old _full version --- gst-libs/gst/audio/gstaudiobasesink.c | 2 +- gst-libs/gst/audio/gstaudioringbuffer.c | 35 ++++----------------------------- gst-libs/gst/audio/gstaudioringbuffer.h | 4 +--- 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c index 763f043..6efe926 100644 --- a/gst-libs/gst/audio/gstaudiobasesink.c +++ b/gst-libs/gst/audio/gstaudiobasesink.c @@ -1854,7 +1854,7 @@ no_sync: data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ); do { written = - gst_audio_ring_buffer_commit_full (ringbuf, &sample_offset, + gst_audio_ring_buffer_commit (ringbuf, &sample_offset, data + offset, samples, out_samples, &accum); GST_DEBUG_OBJECT (sink, "wrote %u of %u", written, samples); diff --git a/gst-libs/gst/audio/gstaudioringbuffer.c b/gst-libs/gst/audio/gstaudioringbuffer.c index 3c331e1..c6b561d 100644 --- a/gst-libs/gst/audio/gstaudioringbuffer.c +++ b/gst-libs/gst/audio/gstaudioringbuffer.c @@ -1491,7 +1491,7 @@ not_started: } /** - * gst_audio_ring_buffer_commit_full: + * gst_audio_ring_buffer_commit: * @buf: the #GstAudioRingBuffer to commit * @sample: the sample position of the data * @data: the data to commit @@ -1499,7 +1499,7 @@ not_started: * @out_samples: the number of samples to write to the ringbuffer * @accum: accumulator for rate conversion. * - * Commit @in_samples samples pointed to by @data to the ringbuffer @buf. + * Commit @in_samples samples pointed to by @data to the ringbuffer @buf. * * @in_samples and @out_samples define the rate conversion to perform on the * samples in @data. For negative rates, @out_samples must be negative and @@ -1510,7 +1510,7 @@ not_started: * @sample in reverse order. * * @out_samples does not need to be a multiple of the segment size of the ringbuffer - * although it is recommended for optimal performance. + * although it is recommended for optimal performance. * * @accum will hold a temporary accumulator used in rate conversion and should be * set to 0 when this function is first called. In case the commit operation is @@ -1526,7 +1526,7 @@ not_started: * Since: 0.10.11. */ guint -gst_audio_ring_buffer_commit_full (GstAudioRingBuffer * buf, guint64 * sample, +gst_audio_ring_buffer_commit (GstAudioRingBuffer * buf, guint64 * sample, guchar * data, gint in_samples, gint out_samples, gint * accum) { GstAudioRingBufferClass *rclass; @@ -1546,33 +1546,6 @@ gst_audio_ring_buffer_commit_full (GstAudioRingBuffer * buf, guint64 * sample, } /** - * gst_audio_ring_buffer_commit: - * @buf: the #GstAudioRingBuffer to commit - * @sample: the sample position of the data - * @data: the data to commit - * @len: the number of samples in the data to commit - * - * Same as gst_audio_ring_buffer_commit_full() but with a in_samples and out_samples - * equal to @len, ignoring accum. - * - * Returns: The number of samples written to the ringbuffer or -1 on - * error. - * - * MT safe. - */ -guint -gst_audio_ring_buffer_commit (GstAudioRingBuffer * buf, guint64 sample, - guchar * data, guint len) -{ - guint res; - guint64 samplep = sample; - - res = gst_audio_ring_buffer_commit_full (buf, &samplep, data, len, len, NULL); - - return res; -} - -/** * gst_audio_ring_buffer_read: * @buf: the #GstAudioRingBuffer to read from * @sample: the sample position of the data diff --git a/gst-libs/gst/audio/gstaudioringbuffer.h b/gst-libs/gst/audio/gstaudioringbuffer.h index dc0e501..79f84df 100644 --- a/gst-libs/gst/audio/gstaudioringbuffer.h +++ b/gst-libs/gst/audio/gstaudioringbuffer.h @@ -313,9 +313,7 @@ void gst_audio_ring_buffer_set_sample (GstAudioRingBuffer *buf, void gst_audio_ring_buffer_clear_all (GstAudioRingBuffer *buf); /* commit samples */ -guint gst_audio_ring_buffer_commit (GstAudioRingBuffer *buf, guint64 sample, - guchar *data, guint len); -guint gst_audio_ring_buffer_commit_full (GstAudioRingBuffer * buf, guint64 *sample, +guint gst_audio_ring_buffer_commit (GstAudioRingBuffer * buf, guint64 *sample, guchar * data, gint in_samples, gint out_samples, gint * accum); -- 2.7.4