Update to new element sync API
authorWim Taymans <wim.taymans@gmail.com>
Fri, 27 Dec 2002 23:00:36 +0000 (23:00 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 27 Dec 2002 23:00:36 +0000 (23:00 +0000)
Original commit message from CVS:
Update to new element sync API

ext/aalib/gstaasink.c
gst/udp/gstudpsink.c
sys/oss/gstosssink.c

index ad255fa..045831e 100644 (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, 
index d4aca9c..fc92484 100644 (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);
index ba86f91..86ca1f3 100644 (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);