summaryrefslogtreecommitdiffstats
path: root/ext/esd
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2004-01-14 00:53:52 +0000
committerBenjamin Otte <otte@gnome.org>2004-01-14 00:53:52 +0000
commit9a9f767369ed4ddc8803e62bfcdb9403813220d5 (patch)
tree46d7e710a9ae199b81fe480b33e21223c778176b /ext/esd
parentf4c6604e6c4295d1c580860386f7e69ea50dcdaa (diff)
use element time.
Original commit message from CVS: 2004-01-14 Benjamin Otte <in7y118@public.uni-hamburg.de> * ext/aalib/gstaasink.c: (gst_aasink_chain): * ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event): * ext/esd/esdsink.c: (gst_esdsink_chain): * ext/libcaca/gstcacasink.c: (gst_cacasink_chain): * ext/mas/massink.c: (gst_massink_chain): * ext/sdl/sdlvideosink.c: (gst_sdlvideosink_chain): * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_index), (gst_matroska_demux_parse_metadata): * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_loop), (gst_mpeg_parse_release_locks): * gst/tcp/gsttcpsink.c: (gst_tcpsink_chain): * gst/udp/gstudpsink.c: (gst_udpsink_chain): * gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_get): * sys/oss/gstosssink.c: (gst_osssink_init), (gst_osssink_chain), (gst_osssink_change_state): * sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_chain): * sys/ximage/ximagesink.c: (gst_ximagesink_chain): * sys/xvideo/xvideosink.c: (gst_xvideosink_chain), (gst_xvideosink_release_locks): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_chain): use element time. * ext/alsa/gstalsaclock.c: (gst_alsa_clock_start), (gst_alsa_clock_stop): * gst-libs/gst/audio/audioclock.c: (gst_audio_clock_set_active), (gst_audio_clock_get_internal_time): simplify for use with new clocking code. * testsuite/alsa/Makefile.am: * testsuite/alsa/sinesrc.c: (sinesrc_init), (sinesrc_force_caps): fix testsuite for new caps system
Diffstat (limited to 'ext/esd')
-rw-r--r--ext/esd/esdsink.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c
index f6c46222..1ea55453 100644
--- a/ext/esd/esdsink.c
+++ b/ext/esd/esdsink.c
@@ -280,10 +280,7 @@ gst_esdsink_chain (GstPad *pad, GstData *_data)
gint64 value;
if (gst_event_discont_get_value (event, GST_FORMAT_TIME, &value)) {
- if (!gst_clock_handle_discont (esdsink->clock, value)){
- gst_audio_clock_set_active (GST_AUDIO_CLOCK (esdsink->provided_clock),
- FALSE);
- }
+ gst_element_set_time (GST_ELEMENT (esdsink), value);
esdsink->handled = 0;
}
esdsink->resync = TRUE;
@@ -306,25 +303,13 @@ gst_esdsink_chain (GstPad *pad, GstData *_data)
if (esdsink->clock){
gint delay = 0;
gint64 queued;
- GstClockTimeDiff jitter;
delay = gst_esdsink_get_latency (esdsink);
queued = delay * GST_SECOND / esdsink->frequency;
if (esdsink->resync && esdsink->sync) {
- GstClockID id = gst_clock_new_single_shot_id (esdsink->clock,
- GST_BUFFER_TIMESTAMP (buf) - queued);
-
- gst_element_clock_wait (GST_ELEMENT (esdsink), id, &jitter);
- gst_clock_id_free (id);
-
- if (jitter >= 0){
- gst_clock_handle_discont (esdsink->clock,
- GST_BUFFER_TIMESTAMP (buf) - queued + jitter);
- to_write = size;
- gst_audio_clock_set_active ((GstAudioClock *)esdsink->provided_clock, TRUE);
- esdsink->resync = FALSE;
- }
+ gst_element_wait (GST_ELEMENT (esdsink), GST_BUFFER_TIMESTAMP (buf) - queued);
+
}else{
to_write = size;
}