Update to new element sync API

Original commit message from CVS:
Update to new element sync API
This commit is contained in:
Wim Taymans 2002-12-27 23:00:36 +00:00
parent 9308e1e4b0
commit a06b9161dc
3 changed files with 11 additions and 5 deletions

View file

@ -353,7 +353,9 @@ gst_aasink_chain (GstPad *pad, GstBuffer *buf)
GST_DEBUG (0,"videosink: clock wait: %llu", GST_BUFFER_TIMESTAMP(buf));
if (aasink->clock) {
gst_element_clock_wait (GST_ELEMENT (aasink), aasink->clock, GST_BUFFER_TIMESTAMP(buf), NULL);
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);
}
aa_render (aasink->context, &aasink->ascii_parms,

View file

@ -259,7 +259,6 @@ gst_udpsink_chain (GstPad *pad, GstBuffer *buf)
{
GstUDPSink *udpsink;
guint tolen, i;
GstClockTimeDiff *jitter = NULL;
g_return_if_fail (pad != NULL);
g_return_if_fail (GST_IS_PAD (pad));
@ -268,8 +267,11 @@ gst_udpsink_chain (GstPad *pad, GstBuffer *buf)
udpsink = GST_UDPSINK (GST_OBJECT_PARENT (pad));
if (udpsink->clock) {
GstClockID id = gst_clock_new_single_shot_id (udpsink->clock, GST_BUFFER_TIMESTAMP (buf));
GST_DEBUG (0, "udpsink: clock wait: %llu\n", GST_BUFFER_TIMESTAMP (buf));
gst_element_clock_wait (GST_ELEMENT (udpsink), udpsink->clock, GST_BUFFER_TIMESTAMP (buf), jitter);
gst_element_clock_wait (GST_ELEMENT (udpsink), id, NULL);
gst_clock_id_free (id);
}
tolen = sizeof(udpsink->theiraddr);

View file

@ -375,8 +375,10 @@ gst_osssink_chain (GstPad *pad, GstBuffer *buf)
queued = delay * GST_SECOND / osssink->common.bps;
if (osssink->resync && osssink->sync) {
gst_element_clock_wait (GST_ELEMENT (osssink), osssink->clock,
buftime - queued, &jitter);
GstClockID id = gst_clock_new_single_shot_id (osssink->clock, buftime - queued);
gst_element_clock_wait (GST_ELEMENT (osssink), id, &jitter);
gst_clock_id_free (id);
if (jitter >= 0) {
gst_clock_handle_discont (osssink->clock, buftime - queued + jitter);