+2004-01-31 Benjamin Otte <in7y118@public.uni-hamburg.de>
+
+ * ext/alsa/gstalsa.c: (gst_alsa_change_state), (gst_alsa_start),
+ (gst_alsa_drain_audio), (gst_alsa_stop_audio):
+ really start/stop clock only on PLAYING <=> PAUSED
+ * ext/alsa/gstalsasink.c: (gst_alsa_sink_loop):
+ remove \n from debugging lines
+ * ext/ogg/gstoggdemux.c: (gst_ogg_demux_chain):
+ make it work when seeking does not
+ * ext/vorbis/vorbisdec.c: (vorbis_dec_event):
+ reset on DISCONT
+
2004-01-31 Benjamin Otte <in7y118@public.uni-hamburg.de>
* ext/alsa/gstalsa.c: (gst_alsa_change_state), (gst_alsa_start):
GST_ERROR_OBJECT (this, "Error unpausing sound: %s", snd_strerror (err));
return GST_STATE_FAILURE;
}
+ } else if (! (GST_FLAG_IS_SET (element, GST_ALSA_RUNNING) ||
+ gst_alsa_start_audio (this))) {
+ return GST_STATE_FAILURE;
}
gst_alsa_clock_start (this->clock);
break;
GST_ERROR_OBJECT (this, "Error pausing sound: %s", snd_strerror (err));
return GST_STATE_FAILURE;
}
- gst_alsa_clock_stop (this->clock);
}
break;
}
+ gst_alsa_clock_stop (this->clock);
/* if device doesn't know how to pause, we just stop */
+ if (GST_FLAG_IS_SET (element, GST_ALSA_RUNNING)) gst_alsa_stop_audio (this);
+ break;
case GST_STATE_PAUSED_TO_READY:
if (GST_FLAG_IS_SET (element, GST_ALSA_RUNNING)) gst_alsa_stop_audio (this);
g_free (this->format);
g_assert_not_reached ();
break;
}
- /* gst_alsa_clock_start (this->clock); */
return TRUE;
}
void
switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN:
case SND_PCM_STATE_RUNNING:
- gst_alsa_clock_stop (this->clock);
/* fall through - clock is already stopped when paused */
case SND_PCM_STATE_PAUSED:
/* snd_pcm_drain only works in blocking mode */
switch (snd_pcm_state (this->handle)) {
case SND_PCM_STATE_XRUN:
case SND_PCM_STATE_RUNNING:
- gst_alsa_clock_stop (this->clock);
/* fall through - clock is already stopped when paused */
case SND_PCM_STATE_PAUSED:
ERROR_CHECK (snd_pcm_drop (this->handle),
int samples = MIN (bytes, sample_diff) *
(element->numpads == 1 ? this->format->channels : 1);
int size = samples * snd_pcm_format_physical_width (this->format->format) / 8;
- GST_INFO_OBJECT (this, "Allocating %d bytes (%ld samples) now to resync: sample %ld expected, but got %ld\n",
+ GST_INFO_OBJECT (this, "Allocating %d bytes (%ld samples) now to resync: sample %ld expected, but got %ld",
size, MIN (bytes, sample_diff), time_sample, samplestamp);
sink->data[i] = g_try_malloc (size);
if (!sink->data[i]) {
}
sink->behaviour[i] = 1;
} else if (gst_alsa_samples_to_bytes (this, -sample_diff) >= sink->buf[i]->size) {
- GST_INFO_OBJECT (this, "Skipping %lu samples to resync (complete buffer): sample %ld expected, but got %ld\n",
+ GST_INFO_OBJECT (this, "Skipping %lu samples to resync (complete buffer): sample %ld expected, but got %ld",
gst_alsa_bytes_to_samples (this, sink->buf[i]->size), time_sample, samplestamp);
/* this buffer is way behind */
gst_buffer_unref (sink->buf[i]);
continue;
} else if (sample_diff < 0) {
gint difference = gst_alsa_samples_to_bytes (this, -samplestamp);
- GST_INFO_OBJECT (this, "Skipping %lu samples to resync: sample %ld expected, but got %ld\n",
+ GST_INFO_OBJECT (this, "Skipping %lu samples to resync: sample %ld expected, but got %ld",
(gulong) -sample_diff, time_sample, samplestamp);
/* this buffer is only a bit behind */
sink->size[i] = sink->buf[i]->size - difference;
GST_FLAG_SET (ogg, GST_OGG_FLAG_WAIT_FOR_DISCONT);
goto out;
}
+ gst_ogg_add_chain (ogg);
GST_OGG_SET_STATE (ogg, GST_OGG_STATE_PLAY);
/* fall through */
case GST_OGG_STATE_SEEK:
} else {
GST_ERROR_OBJECT (dec, "failed to parse data for DISCONT event, not sending any");
}
+ vorbis_synthesis_restart (&dec->vd);
}
break;
default: