Original commit message from CVS:
2006-04-07 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* tests/icles/ximagesrc-test.c: (main):
Actually assert that pipeline goes to playing
{
GstElement *pipeline;
GstBus *bus;
+ GstState state, pending;
GError *error = NULL;
gst_init (&argc, &argv);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
+ /* lets check it gets to PLAYING */
+ g_assert (gst_element_get_state (pipeline, &state, &pending,
+ GST_CLOCK_TIME_NONE) != GST_STATE_CHANGE_FAILURE);
+ g_assert (state == GST_STATE_PLAYING || pending == GST_STATE_PLAYING);
+
/* We want to get out after 5 seconds */
g_timeout_add (5000, (GSourceFunc) terminate_playback, pipeline);