mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
benchmarks: Fix the complexity and mass-elements benchmarks
This commit is contained in:
parent
077ca39def
commit
8a8408846a
2 changed files with 24 additions and 2 deletions
|
@ -114,7 +114,10 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
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",
|
||||
|
@ -128,6 +131,14 @@ main (gint argc, gchar * argv[])
|
|||
g_print ("%" GST_TIME_FORMAT " - putting %u buffers through\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 ();
|
||||
|
|
|
@ -92,7 +92,10 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
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",
|
||||
|
@ -106,6 +109,14 @@ main (gint argc, gchar * argv[])
|
|||
g_print ("%" GST_TIME_FORMAT " - putting %u buffers through\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 ();
|
||||
|
|
Loading…
Reference in a new issue