void
gst_test_clock_set_time (GstTestClock * test_clock, GstClockTime new_time)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
+
+ g_return_if_fail (GST_IS_TEST_CLOCK (test_clock));
+
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
- g_assert (GST_IS_TEST_CLOCK (test_clock));
g_assert_cmpuint (new_time, !=, GST_CLOCK_TIME_NONE);
GST_OBJECT_LOCK (test_clock);
void
gst_test_clock_advance_time (GstTestClock * test_clock, GstClockTimeDiff delta)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
+
+ g_return_if_fail (GST_IS_TEST_CLOCK (test_clock));
+
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
- g_assert (GST_IS_TEST_CLOCK (test_clock));
g_assert_cmpint (delta, >=, 0);
g_assert_cmpuint (delta, <, G_MAXUINT64 - delta);
{
guint result;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_val_if_fail (GST_IS_TEST_CLOCK (test_clock), 0);
GST_OBJECT_LOCK (test_clock);
result = gst_test_clock_peek_id_count_unlocked (test_clock);
{
gboolean result;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_val_if_fail (GST_IS_TEST_CLOCK (test_clock), FALSE);
g_assert (id != NULL);
GST_OBJECT_LOCK (test_clock);
{
gboolean result;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_val_if_fail (GST_IS_TEST_CLOCK (test_clock), FALSE);
GST_OBJECT_LOCK (test_clock);
result = gst_test_clock_peek_next_pending_id_unlocked (test_clock,
gst_test_clock_wait_for_next_pending_id (GstTestClock * test_clock,
GstClockID * pending_id)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
+
+ g_return_if_fail (GST_IS_TEST_CLOCK (test_clock));
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
GST_OBJECT_LOCK (test_clock);
gst_test_clock_wait_for_pending_id_count (GstTestClock * test_clock,
guint count)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_if_fail (GST_IS_TEST_CLOCK (test_clock));
+
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
GST_OBJECT_LOCK (test_clock);
GstClockID
gst_test_clock_process_next_clock_id (GstTestClock * test_clock)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
GstClockID result = NULL;
GstClockEntryContext *ctx = NULL;
GList *cur;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_val_if_fail (GST_IS_TEST_CLOCK (test_clock), NULL);
+
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
GST_OBJECT_LOCK (test_clock);
GstClockTime
gst_test_clock_get_next_entry_time (GstTestClock * test_clock)
{
- GstTestClockPrivate *priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
+ GstTestClockPrivate *priv;
GstClockTime result = GST_CLOCK_TIME_NONE;
GList *imminent_clock_id;
- g_assert (GST_IS_TEST_CLOCK (test_clock));
+ g_return_val_if_fail (GST_IS_TEST_CLOCK (test_clock), GST_CLOCK_TIME_NONE);
+
+ priv = GST_TEST_CLOCK_GET_PRIVATE (test_clock);
GST_OBJECT_LOCK (test_clock);