start = gst_get_current_time ();
if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE)
+ g_assert_not_reached ();
+ if (gst_element_get_state (pipeline, NULL, NULL,
+ GST_CLOCK_TIME_NONE) == GST_STATE_CHANGE_FAILURE)
g_assert_not_reached ();
end = gst_get_current_time ();
g_print ("%" GST_TIME_FORMAT " - setting pipeline to playing\n",
GST_TIME_ARGS (end - start), BUFFER_COUNT);
start = gst_get_current_time ();
+ if (gst_element_set_state (pipeline,
+ GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS)
+ g_assert_not_reached ();
+ end = gst_get_current_time ();
+ g_print ("%" GST_TIME_FORMAT " - setting pipeline to NULL\n",
+ GST_TIME_ARGS (end - start));
+
+ start = gst_get_current_time ();
g_object_unref (pipeline);
end = gst_get_current_time ();
g_print ("%" GST_TIME_FORMAT " - unreffing pipeline\n",
start = gst_get_current_time ();
if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
+ GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE)
+ g_assert_not_reached ();
+ if (gst_element_get_state (pipeline, NULL, NULL,
+ GST_CLOCK_TIME_NONE) == GST_STATE_CHANGE_FAILURE)
g_assert_not_reached ();
end = gst_get_current_time ();
g_print ("%" GST_TIME_FORMAT " - setting pipeline to playing\n",
GST_TIME_ARGS (end - start), buffers);
start = gst_get_current_time ();
+ if (gst_element_set_state (pipeline,
+ GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS)
+ g_assert_not_reached ();
+ end = gst_get_current_time ();
+ g_print ("%" GST_TIME_FORMAT " - setting pipeline to NULL\n",
+ GST_TIME_ARGS (end - start));
+
+ start = gst_get_current_time ();
g_object_unref (pipeline);
end = gst_get_current_time ();
g_print ("%" GST_TIME_FORMAT " - unreffing pipeline\n",