}
static GstClockTime
+gst_audio_clock_func_invalid (GstClock * clock, gpointer user_data)
+{
+ return GST_CLOCK_TIME_NONE;
+}
+
+static GstClockTime
gst_audio_clock_get_internal_time (GstClock * clock)
{
GstAudioClock *aclock;
return result;
}
+
+/**
+ * gst_audio_clock_invalidate:
+ * @clock: a #GstAudioClock
+ *
+ * Invalidate the clock function. Call this function when the provided
+ * #GstAudioClockGetTimeFunc cannot be called anymore, for example, when the
+ * user_data becomes invalid.
+ *
+ * After calling this function, @clock will return the last returned time for
+ * the rest of its lifetime.
+ *
+ * Since: 0.10.31
+ */
+void
+gst_audio_clock_invalidate (GstClock * clock)
+{
+ GstAudioClock *aclock;
+
+ aclock = GST_AUDIO_CLOCK_CAST (clock);
+
+ aclock->func = gst_audio_clock_func_invalid;
+}
GstClockTime gst_audio_clock_get_time (GstClock * clock);
GstClockTime gst_audio_clock_adjust (GstClock * clock, GstClockTime time);
+void gst_audio_clock_invalidate (GstClock * clock);
+
G_END_DECLS
#endif /* __GST_AUDIO_CLOCK_H__ */