2 * Copyright (C) 2005 Andy Wingo <wingo@pobox.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 #include <gst/check/gstcheck.h>
24 GST_START_TEST (test_stress)
26 GstElement *fakesrc, *fakesink, *pipeline;
29 fakesrc = gst_element_factory_make ("fakesrc", NULL);
30 fakesink = gst_element_factory_make ("fakesink", NULL);
31 pipeline = gst_element_factory_make ("pipeline", NULL);
33 g_return_if_fail (fakesrc && fakesink && pipeline);
35 gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
36 gst_element_link (fakesrc, fakesink);
40 gst_element_set_state (pipeline, GST_STATE_PAUSED);
41 gst_element_set_state (pipeline, GST_STATE_PLAYING);
43 gst_element_set_state (pipeline, GST_STATE_PAUSED);
44 gst_element_set_state (pipeline, GST_STATE_PLAYING);
45 gst_element_set_state (pipeline, GST_STATE_PAUSED);
46 gst_element_set_state (pipeline, GST_STATE_READY);
47 gst_element_set_state (pipeline, GST_STATE_PLAYING);
48 gst_element_set_state (pipeline, GST_STATE_PAUSED);
49 gst_element_set_state (pipeline, GST_STATE_READY);
50 gst_element_set_state (pipeline, GST_STATE_PAUSED);
51 gst_element_set_state (pipeline, GST_STATE_NULL);
54 gst_object_unref (pipeline);
62 Suite *s = suite_create ("stress");
63 TCase *tc_chain = tcase_create ("linear");
65 /* time out after 20s, not the default 3 */
66 tcase_set_timeout (tc_chain, 0);
68 suite_add_tcase (s, tc_chain);
69 tcase_add_test (tc_chain, test_stress);
73 GST_CHECK_MAIN (stress);