*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
/**
* clock and run the calibration functions. #GstClock:window-size defines the
* number of samples to use when calibrating and #GstClock:window-threshold
* defines the minimum number of samples before the calibration is performed.
- *
- * Last reviewed on 2012-03-28 (0.11.3)
*/
GST_OBJECT_UNLOCK (clock); \
} G_STMT_END;
+#ifndef GST_DISABLE_GST_DEBUG
+static const gchar *
+gst_clock_return_get_name (GstClockReturn ret)
+{
+ switch (ret) {
+ case GST_CLOCK_OK:
+ return "ok";
+ case GST_CLOCK_EARLY:
+ return "early";
+ case GST_CLOCK_UNSCHEDULED:
+ return "unscheduled";
+ case GST_CLOCK_BUSY:
+ return "busy";
+ case GST_CLOCK_BADTIME:
+ return "bad-time";
+ case GST_CLOCK_ERROR:
+ return "error";
+ case GST_CLOCK_UNSUPPORTED:
+ return "unsupported";
+ case GST_CLOCK_DONE:
+ return "done";
+ default:
+ break;
+ }
+
+ return "unknown";
+}
+#endif /* GST_DISABLE_GST_DEBUG */
+
static void gst_clock_dispose (GObject * object);
static void gst_clock_finalize (GObject * object);
*
* Returns: %TRUE if the GstClockID could be reinitialized to the provided
* @time, else %FALSE.
- *
- * Since: 0.10.32
*/
gboolean
gst_clock_single_shot_id_reinit (GstClock * clock, GstClockID id,
*
* Returns: %TRUE if the GstClockID could be reinitialized to the provided
* @time, else %FALSE.
- *
- * Since: 0.10.33
- *
*/
gboolean
gst_clock_periodic_id_reinit (GstClock * clock, GstClockID id,
res = cclass->wait (clock, entry, jitter);
GST_CAT_DEBUG_OBJECT (GST_CAT_CLOCK, clock,
- "done waiting entry %p, res: %d", id, res);
+ "done waiting entry %p, res: %d (%s)", id, res,
+ gst_clock_return_get_name (res));
if (entry->type == GST_CLOCK_ENTRY_PERIODIC)
entry->time = requested + entry->interval;
* Returns: the result of the non blocking wait.
*
* MT safe.
- *
- * Since: 0.10.30
*/
GstClockReturn
gst_clock_id_wait_async (GstClockID id,
* GstClock abstract base class implementation
*/
#define gst_clock_parent_class parent_class
-G_DEFINE_TYPE (GstClock, gst_clock, GST_TYPE_OBJECT);
+G_DEFINE_ABSTRACT_TYPE (GstClock, gst_clock, GST_TYPE_OBJECT);
static void
gst_clock_class_init (GstClockClass * klass)
priv->time_index = 0;
priv->timeout = DEFAULT_TIMEOUT;
priv->times = g_new0 (GstClockTime, 4 * priv->window_size);
+
+ /* clear floating flag */
+ gst_object_ref_sink (clock);
}
static void
* This function is the reverse of gst_clock_adjust_unlocked().
*
* Returns: the internal time of the clock corresponding to @external.
- *
- * Since: 0.10.13
*/
GstClockTime
gst_clock_unadjust_unlocked (GstClock * clock, GstClockTime external)