From 8c3e91c8ea47006d5527c6d623cc3557ac0c5b41 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 14 Mar 2006 19:28:20 +0000 Subject: [PATCH] gst/gstclock.c: Marked the stats property as unimplemented so people don't get wild ideas. Original commit message from CVS: * gst/gstclock.c: (gst_clock_class_init), (do_linear_regression): Marked the stats property as unimplemented so people don't get wild ideas. Add debug message when regression goes wrong. Added some more docs. --- ChangeLog | 8 ++++++++ gst/gstclock.c | 12 ++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb706cb93b..9b0de0efe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-14 Wim Taymans + + * gst/gstclock.c: (gst_clock_class_init), (do_linear_regression): + Marked the stats property as unimplemented so people don't get + wild ideas. + Add debug message when regression goes wrong. + Added some more docs. + 2006-03-14 Wim Taymans * gst/gstsegment.c: (gst_segment_to_stream_time): diff --git a/gst/gstclock.c b/gst/gstclock.c index 5fccbdb74c..a3ac921862 100644 --- a/gst/gstclock.c +++ b/gst/gstclock.c @@ -578,8 +578,9 @@ gst_clock_class_init (GstClockClass * klass) gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_clock_get_property); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_STATS, - g_param_spec_boolean ("stats", "Stats", "Enable clock stats", - DEFAULT_STATS, G_PARAM_READWRITE)); + g_param_spec_boolean ("stats", "Stats", + "Enable clock stats (unimplemented)", DEFAULT_STATS, + G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WINDOW_SIZE, g_param_spec_int ("window-size", "Window size", "The size of the window used to calculate rate and offset", 2, 1024, @@ -1114,6 +1115,7 @@ do_linear_regression (GstClock * clock, GstClockTime * m_num, invalid: { + GST_DEBUG_OBJECT (clock, "sxx == 0, regression failed"); return FALSE; } } @@ -1130,6 +1132,12 @@ invalid: * are available, a linear regression algorithm is run on the * observations and @clock is recalibrated. * + * If this functions returns %TRUE, @r_squared will contain the sum + * of squared distances from the interpolated values. Lower values + * means the regression yielded a more accurate result. This value can + * be used to control the sampling frequency of the master and slave + * clocks. + * * Returns: TRUE if enough observations were added to run the * regression algorithm. * -- 2.34.1