check/pipelines/simple_launch_lines.c (run_pipeline): Merge from the state change patch.

Original commit message from CVS:
2005-10-10  Andy Wingo  <wingo@pobox.com>

* check/pipelines/simple_launch_lines.c (run_pipeline): Merge from
the state change patch.
This commit is contained in:
Andy Wingo 2005-10-10 10:59:33 +00:00
parent d2e605454e
commit 4353da375f
3 changed files with 17 additions and 6 deletions

View file

@ -1,5 +1,8 @@
2005-10-10 Andy Wingo <wingo@pobox.com> 2005-10-10 Andy Wingo <wingo@pobox.com>
* check/pipelines/simple_launch_lines.c (run_pipeline): Merge from
the state change patch.
* check/gst/gstghostpad.c (test_ghost_pads): Merge from the state * check/gst/gstghostpad.c (test_ghost_pads): Merge from the state
change patch. change patch.

View file

@ -48,12 +48,16 @@ run_pipeline (GstElement * pipeline, gchar * descr,
{ {
GstBus *bus; GstBus *bus;
GstMessageType revent; GstMessageType revent;
GstStateChangeReturn ret;
g_assert (pipeline); g_assert (pipeline);
bus = gst_element_get_bus (pipeline); bus = gst_element_get_bus (pipeline);
g_assert (bus); g_assert (bus);
if (gst_element_set_state (pipeline,
GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) { ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
ret = gst_element_get_state (pipeline, NULL, NULL, NULL);
if (ret != GST_STATE_CHANGE_SUCCESS) {
g_critical ("Couldn't set pipeline to PLAYING"); g_critical ("Couldn't set pipeline to PLAYING");
goto done; goto done;
} }
@ -190,7 +194,7 @@ simple_launch_lines_suite (void)
TCase *tc_chain = tcase_create ("linear"); TCase *tc_chain = tcase_create ("linear");
/* time out after 20s, not the default 3 */ /* time out after 20s, not the default 3 */
tcase_set_timeout (tc_chain, 20); tcase_set_timeout (tc_chain, 0);
suite_add_tcase (s, tc_chain); suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_2_elements); tcase_add_test (tc_chain, test_2_elements);

View file

@ -48,12 +48,16 @@ run_pipeline (GstElement * pipeline, gchar * descr,
{ {
GstBus *bus; GstBus *bus;
GstMessageType revent; GstMessageType revent;
GstStateChangeReturn ret;
g_assert (pipeline); g_assert (pipeline);
bus = gst_element_get_bus (pipeline); bus = gst_element_get_bus (pipeline);
g_assert (bus); g_assert (bus);
if (gst_element_set_state (pipeline,
GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS) { ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
ret = gst_element_get_state (pipeline, NULL, NULL, NULL);
if (ret != GST_STATE_CHANGE_SUCCESS) {
g_critical ("Couldn't set pipeline to PLAYING"); g_critical ("Couldn't set pipeline to PLAYING");
goto done; goto done;
} }
@ -190,7 +194,7 @@ simple_launch_lines_suite (void)
TCase *tc_chain = tcase_create ("linear"); TCase *tc_chain = tcase_create ("linear");
/* time out after 20s, not the default 3 */ /* time out after 20s, not the default 3 */
tcase_set_timeout (tc_chain, 20); tcase_set_timeout (tc_chain, 0);
suite_add_tcase (s, tc_chain); suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_2_elements); tcase_add_test (tc_chain, test_2_elements);