/* prepare playing */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res = gst_element_get_state (bin, NULL, NULL, GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (bin, seek_event);
fail_unless (res == TRUE, NULL);
/* run pipeline */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
+ GST_INFO ("running main loop");
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
- fail_unless (position == 2 * GST_SECOND, NULL);
+ ck_assert_int_eq (position, 2 * GST_SECOND);
/* cleanup */
g_main_loop_unref (main_loop);
play_count++;
if (play_count == 1) {
res = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* prepare playing again */
res = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (GST_ELEMENT (bin),
gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
res = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
} else {
g_main_loop_quit (main_loop);
}
/* prepare playing */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
/* run pipeline */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
- fail_unless (play_count == 2, NULL);
+ ck_assert_int_eq (play_count, 2);
/* cleanup */
g_main_loop_unref (main_loop);
/* prepare playing */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
fail_unless (res == TRUE, NULL);
/* run pipeline */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_READY);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
- fail_unless (play_count == 2, NULL);
+ ck_assert_int_eq (play_count, 2);
/* plug another source */
if (i == 0) {
}
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* cleanup */
g_main_loop_unref (main_loop);
/* prepare playing */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
res = gst_element_send_event (bin, gst_event_ref (play_seek_event));
#if 1
/* run pipeline */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
GST_INFO ("playing");
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
gst_consistency_checker_reset (consist);
}
/* prepare playing */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* add other element */
gst_bin_add_many (GST_BIN (bin), src2, NULL);
/* now play all */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* cleanup */
g_main_loop_unref (main_loop);
/* prepare playing, this will not preroll as adder is waiting
* on the unconnected sinkpad. */
res = gst_element_set_state (bin, GST_STATE_PAUSED);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* wait for completion for one second, will return ASYNC */
res = gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_SECOND);
- fail_unless (res == GST_STATE_CHANGE_ASYNC, NULL);
+ ck_assert_int_eq (res, GST_STATE_CHANGE_ASYNC);
/* get rid of the pad now, adder should stop waiting on it and
* continue the preroll */
res =
gst_element_get_state (GST_ELEMENT (bin), NULL, NULL,
GST_CLOCK_TIME_NONE);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* now play all */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
g_main_loop_run (main_loop);
res = gst_element_set_state (bin, GST_STATE_NULL);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* cleanup */
g_main_loop_unref (main_loop);
/* set to playing */
res = gst_element_set_state (bin, GST_STATE_PLAYING);
- fail_unless (res != GST_STATE_CHANGE_FAILURE, NULL);
+ ck_assert_int_ne (res, GST_STATE_CHANGE_FAILURE);
/* create an unconnected sinkpad in adder, should also automatically activate
* the pad */
GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
GST_DEBUG ("pushing buffer %p", buffer);
ret = gst_pad_chain (sinkpad, buffer);
- fail_unless (ret == GST_FLOW_OK);
+ ck_assert_int_eq (ret, GST_FLOW_OK);
fail_unless (handoff_buffer == NULL);
/* should be partially clipped */
GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
GST_DEBUG ("pushing buffer %p", buffer);
ret = gst_pad_chain (sinkpad, buffer);
- fail_unless (ret == GST_FLOW_OK);
+ ck_assert_int_eq (ret, GST_FLOW_OK);
fail_unless (handoff_buffer != NULL);
gst_buffer_replace (&handoff_buffer, NULL);
GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
GST_DEBUG ("pushing buffer %p", buffer);
ret = gst_pad_chain (sinkpad, buffer);
- fail_unless (ret == GST_FLOW_OK);
+ ck_assert_int_eq (ret, GST_FLOW_OK);
fail_unless (handoff_buffer != NULL);
gst_buffer_replace (&handoff_buffer, NULL);
GST_BUFFER_DURATION (buffer) = 250 * GST_MSECOND;
GST_DEBUG ("pushing buffer %p", buffer);
ret = gst_pad_chain (sinkpad, buffer);
- fail_unless (ret == GST_FLOW_OK);
+ ck_assert_int_eq (ret, GST_FLOW_OK);
fail_unless (handoff_buffer == NULL);
-
}
GST_END_TEST;