From: <tho...@fr...> - 2005-11-27 14:03:37
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Nov 27 2005 06:03:34 PST Log message: add some additional fail_if's Modified files: check/gst : gstminiobject.c gstpipeline.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/check/gst/gstminiobject.c.diff?r1=1.5&r2=1.6 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/check/gst/gstpipeline.c.diff?r1=1.16&r2=1.17 ====Begin Diffs==== Index: gstpipeline.c =================================================================== RCS file: /cvs/gstreamer/gstreamer/check/gst/gstpipeline.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gstpipeline.c 15 Nov 2005 17:57:51 -0000 1.16 +++ gstpipeline.c 27 Nov 2005 14:03:22 -0000 1.17 @@ -305,6 +305,7 @@ */ base = gst_element_get_base_time (pipeline); + fail_if (base == GST_CLOCK_TIME_NONE); /* set stream time */ gst_element_set_state (pipeline, GST_STATE_PAUSED); @@ -356,6 +357,7 @@ gst_clock_id_unref (clock_id); lower = gst_clock_get_time (clock); + fail_if (lower == GST_CLOCK_TIME_NONE); observed = GST_CLOCK_TIME_NONE; @@ -377,6 +379,7 @@ @@ -397,6 +400,7 @@ GST_TIME_FORMAT " > %" GST_TIME_FORMAT, GST_TIME_ARGS (base), GST_TIME_ARGS (upper)); + fail_unless (lower >= base); fail_unless (observed >= lower - base, "early timestamp: %" GST_TIME_FORMAT " < %" GST_TIME_FORMAT, GST_TIME_ARGS (observed), GST_TIME_ARGS (lower - base)); @@ -413,11 +417,13 @@ { GstClockID clock_id; GstClockTime oldbase = base, oldobserved = observed; + GstClockReturn ret; /* let some time pass */ clock_id = gst_clock_new_single_shot_id (clock, upper + WAIT_TIME); - fail_unless (gst_clock_id_wait (clock_id, NULL) == GST_CLOCK_OK, - "unexpected clock_id_wait return"); + ret = gst_clock_id_wait (clock_id, NULL); + fail_unless (ret == GST_CLOCK_OK, + "unexpected clock_id_wait return %d", ret); |