summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-09-09 16:25:06 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-09-09 16:25:06 +0200
commit42ee5e22a2e696e2d8390e89f90d78b149417944 (patch)
treec52c9470aee4c36ddc58fdd6a34c99a313bd9ccd
parent75a48e238a6e71d6d8e86644407c9892fde43325 (diff)
pulsesink: remove ringbuffer reset compensation
Remove the code to deal with a ringbuffer reset as this code is now in the base class. Bump the -base requirement as we need the new baseaudiosink code to function properly.
-rw-r--r--configure.ac2
-rw-r--r--ext/pulse/pulsesink.c30
2 files changed, 2 insertions, 30 deletions
diff --git a/configure.ac b/configure.ac
index 080eae38d..e76491409 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,7 @@ AM_PROG_LIBTOOL
dnl *** required versions of GStreamer stuff ***
GST_REQ=0.10.24.1
-GSTPB_REQ=0.10.24
+GSTPB_REQ=0.10.24.1
dnl *** autotools stuff ****
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 7ead4fedd..2ce538a10 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -105,7 +105,6 @@ struct _GstPulseRingBuffer
pa_stream *stream;
pa_sample_spec sample_spec;
- gint64 offset;
gboolean corked;
gboolean in_commit;
@@ -572,7 +571,6 @@ gst_pulseringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
pa_stream_flags_t flags;
const gchar *name;
GstAudioClock *clock;
- gint64 time_offset;
psink = GST_PULSESINK_CAST (GST_OBJECT_PARENT (buf));
pbuf = GST_PULSERING_BUFFER_CAST (buf);
@@ -666,19 +664,6 @@ gst_pulseringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec)
/* our clock will now start from 0 again */
clock = GST_AUDIO_CLOCK (GST_BASE_AUDIO_SINK (psink)->provided_clock);
gst_audio_clock_reset (clock, 0);
- time_offset = clock->abidata.ABI.time_offset;
-
- GST_LOG_OBJECT (psink, "got time offset %" GST_TIME_FORMAT,
- GST_TIME_ARGS (time_offset));
-
- /* calculate the sample offset for 0 */
- if (time_offset > 0)
- pbuf->offset = gst_util_uint64_scale_int (time_offset,
- pbuf->sample_spec.rate, GST_SECOND);
- else
- pbuf->offset = -gst_util_uint64_scale_int (-time_offset,
- pbuf->sample_spec.rate, GST_SECOND);
- GST_LOG_OBJECT (psink, "sample offset %" G_GINT64_FORMAT, pbuf->offset);
for (;;) {
pa_stream_state_t state;
@@ -1139,21 +1124,8 @@ gst_pulseringbuffer_commit (GstRingBuffer * buf, guint64 * sample,
if (pbuf->paused)
goto was_paused;
- /* correct for sample offset against the internal clock */
- offset = *sample;
- if (pbuf->offset >= 0) {
- if (offset > pbuf->offset)
- offset -= pbuf->offset;
- else
- offset = 0;
- } else {
- if (offset > -pbuf->offset)
- offset += pbuf->offset;
- else
- offset = 0;
- }
/* offset is in bytes */
- offset *= bps;
+ offset = *sample * bps;
while (*toprocess > 0) {
size_t avail;