Commit 8c3e91c8 authored by Wim Taymans's avatar Wim Taymans

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.
parent c8456d43
2006-03-14 Wim Taymans <wim@fluendo.com>
* 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 <wim@fluendo.com> 2006-03-14 Wim Taymans <wim@fluendo.com>
* gst/gstsegment.c: (gst_segment_to_stream_time): * gst/gstsegment.c: (gst_segment_to_stream_time):
......
...@@ -578,8 +578,9 @@ gst_clock_class_init (GstClockClass * klass) ...@@ -578,8 +578,9 @@ gst_clock_class_init (GstClockClass * klass)
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_clock_get_property); gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_clock_get_property);
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_STATS, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_STATS,
g_param_spec_boolean ("stats", "Stats", "Enable clock stats", g_param_spec_boolean ("stats", "Stats",
DEFAULT_STATS, G_PARAM_READWRITE)); "Enable clock stats (unimplemented)", DEFAULT_STATS,
G_PARAM_READWRITE));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WINDOW_SIZE, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_WINDOW_SIZE,
g_param_spec_int ("window-size", "Window size", g_param_spec_int ("window-size", "Window size",
"The size of the window used to calculate rate and offset", 2, 1024, "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, ...@@ -1114,6 +1115,7 @@ do_linear_regression (GstClock * clock, GstClockTime * m_num,
invalid: invalid:
{ {
GST_DEBUG_OBJECT (clock, "sxx == 0, regression failed");
return FALSE; return FALSE;
} }
} }
...@@ -1130,6 +1132,12 @@ invalid: ...@@ -1130,6 +1132,12 @@ invalid:
* are available, a linear regression algorithm is run on the * are available, a linear regression algorithm is run on the
* observations and @clock is recalibrated. * 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 * Returns: TRUE if enough observations were added to run the
* regression algorithm. * regression algorithm.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment