summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/aalib/gstaasink.c6
-rw-r--r--ext/esd/esdsink.c21
-rw-r--r--ext/libcaca/gstcacasink.c12
3 files changed, 7 insertions, 32 deletions
diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c
index 74cd167d..521bb713 100644
--- a/ext/aalib/gstaasink.c
+++ b/ext/aalib/gstaasink.c
@@ -356,10 +356,8 @@ gst_aasink_chain (GstPad *pad, GstData *_data)
GST_DEBUG ("videosink: clock wait: %" G_GUINT64_FORMAT, GST_BUFFER_TIMESTAMP(buf));
- if (aasink->clock) {
- GstClockID id = gst_clock_new_single_shot_id (aasink->clock, GST_BUFFER_TIMESTAMP(buf));
- gst_element_clock_wait (GST_ELEMENT (aasink), id, NULL);
- gst_clock_id_free (id);
+ if (aasink->clock && GST_BUFFER_TIMESTAMP_IS_VALID (buf)) {
+ gst_element_wait (GST_ELEMENT (aasink), GST_BUFFER_TIMESTAMP (buf));
}
aa_render (aasink->context, &aasink->ascii_parms,
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;
}
diff --git a/ext/libcaca/gstcacasink.c b/ext/libcaca/gstcacasink.c
index 1cd674e5..dfd66519 100644
--- a/ext/libcaca/gstcacasink.c
+++ b/ext/libcaca/gstcacasink.c
@@ -335,19 +335,11 @@ gst_cacasink_chain (GstPad *pad, GstData *_data)
cacasink = GST_CACASINK (gst_pad_get_parent (pad));
- if (GST_VIDEOSINK_CLOCK (cacasink) && time != -1) {
- GstClockReturn ret;
-
- cacasink->id = gst_clock_new_single_shot_id (
- GST_VIDEOSINK_CLOCK (cacasink), time);
-
+ if (cacasink->clock && GST_CLOCK_TIME_IS_VALID (time)) {
GST_DEBUG ("videosink: clock %s wait: %" G_GUINT64_FORMAT " %u",
GST_OBJECT_NAME (GST_VIDEOSINK_CLOCK (cacasink)),
time, GST_BUFFER_SIZE (buf));
-
- ret = gst_clock_id_wait (cacasink->id, &jitter);
- gst_clock_id_free (cacasink->id);
- cacasink->id = NULL;
+ gst_element_wait (GST_ELEMENT (cacasink), GST_BUFFER_TIMESTAMP (buf));
}
caca_clear ();