+ * gst_system_clock_set_default:
+ * @new_clock: (allow-none): a #GstClock
+ *
+ * Sets the default system clock that can be obtained with
+ * gst_system_clock_obtain().
+ *
+ * This is mostly used for testing and debugging purposes when you
+ * want to have control over the time reported by the default system
+ * clock.
+ *
+ * MT safe.
+ *
+ * Since: 1.4
+ */
+void
+gst_system_clock_set_default (GstClock * new_clock)
+{
+ GstClock *clock;
+
+ g_mutex_lock (&_gst_sysclock_mutex);
+ clock = _the_system_clock;
+
+ if (clock != NULL)
+ g_object_unref (clock);
+
+ if (new_clock == NULL) {
+ GST_CAT_DEBUG (GST_CAT_CLOCK, "resetting default system clock");
+ _external_default_clock = FALSE;
+ } else {
+ GST_CAT_DEBUG (GST_CAT_CLOCK, "setting new default system clock to %p",
+ new_clock);
+ _external_default_clock = TRUE;
+ g_object_ref (new_clock);
+ }
+ _the_system_clock = new_clock;
+ g_mutex_unlock (&_gst_sysclock_mutex);
+}
+
+/**