testclock: add back gst_test_clock_wait_for_pending_id_count()
authorTim-Philipp Müller <tim@centricular.com>
Fri, 11 Apr 2014 23:28:51 +0000 (00:28 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 12 Apr 2014 14:33:43 +0000 (15:33 +0100)
.. but deprecate it. ABI stability and all that.
It's a dangerous and racy function to use.

libs/gst/check/Makefile.am
libs/gst/check/gsttestclock.c
libs/gst/check/gsttestclock.h

index 73c0cdf..cf1328b 100644 (file)
@@ -102,7 +102,7 @@ LIBGSTCHECK_EXPORTED_FUNCS = \
        gst_test_clock_has_id \
        gst_test_clock_peek_next_pending_id \
        gst_test_clock_wait_for_next_pending_id \
-       gst_test_clock_wait_for_multiple_pending_ids \
+       gst_test_clock_wait_for_pending_id_count \
        gst_test_clock_process_next_clock_id \
        gst_test_clock_get_next_entry_time \
        gst_test_clock_wait_for_multiple_pending_ids \
index bd94070..d610074 100644 (file)
@@ -876,6 +876,32 @@ gst_test_clock_wait_for_next_pending_id (GstTestClock * test_clock,
 }
 
 /**
+ * gst_test_clock_wait_for_pending_id_count:
+ * @test_clock: #GstTestClock for which to await having enough pending clock
+ * @count: the number of pending clock notifications to wait for
+ *
+ * Blocks until at least @count clock notifications have been requested from
+ * @test_clock. There is no timeout for this wait, see the main description of
+ * #GstTestClock.
+ *
+ * Since: 1.2
+ *
+ * Deprecated: use gst_test_clock_wait_for_multiple_pending_ids() instead.
+ */
+#ifndef GST_REMOVE_DEPRECATED
+#ifdef GST_DISABLE_DEPRECATED
+void gst_test_clock_wait_for_pending_id_count (GstTestClock * test_clock,
+    guint count);
+#endif
+void
+gst_test_clock_wait_for_pending_id_count (GstTestClock * test_clock,
+    guint count)
+{
+  gst_test_clock_wait_for_multiple_pending_ids (test_clock, count, NULL);
+}
+#endif
+
+/**
  * gst_test_clock_process_next_clock_id:
  * @test_clock: a #GstTestClock for which to retrieve the next pending clock
  * notification
index 2b54b22..6527194 100644 (file)
@@ -113,6 +113,11 @@ gboolean      gst_test_clock_peek_next_pending_id (GstTestClock * test_clock,
 void          gst_test_clock_wait_for_next_pending_id (GstTestClock * test_clock,
                                                        GstClockID   * pending_id);
 
+#ifndef GST_DISABLE_DEPRECATED
+void          gst_test_clock_wait_for_pending_id_count (GstTestClock * test_clock,
+                                                        guint          count);
+#endif
+
 GstClockID    gst_test_clock_process_next_clock_id (GstTestClock * test_clock);
 
 GstClockTime  gst_test_clock_get_next_entry_time   (GstTestClock * test_clock);