summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-08 17:19:05 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-07-08 17:19:05 +0200
commit399d4fcbe778388e0852612d4853a0da332294a6 (patch)
treee0d43f46ec6f6fae6620afbccbdb4cf832749e03
parent3116198fc37c831499fc178d471bb73465071b72 (diff)
gio: Try to reuse the pipeline with the same stream objects
-rw-r--r--tests/check/pipelines/gio.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/check/pipelines/gio.c b/tests/check/pipelines/gio.c
index c4b17f2a4..b7bbc199e 100644
--- a/tests/check/pipelines/gio.c
+++ b/tests/check/pipelines/gio.c
@@ -109,6 +109,7 @@ GST_START_TEST (test_memory_stream)
gst_object_unref (bus);
gst_element_set_state (bin, GST_STATE_PAUSED);
+ gst_element_get_state (bin, NULL, NULL, -1);
fail_unless (gst_element_query_duration (bin, &fmt, &duration));
fail_unless_equals_int (duration, 512);
@@ -118,15 +119,30 @@ GST_START_TEST (test_memory_stream)
g_main_loop_run (loop);
gst_element_set_state (bin, GST_STATE_NULL);
- gst_object_unref (bin);
fail_unless (got_eos);
+ got_eos = FALSE;
out_data = g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (output));
for (i = 0; i < 512; i++)
fail_unless_equals_int (in_data[i], out_data[i]);
+ gst_element_set_state (bin, GST_STATE_PAUSED);
+ gst_element_get_state (bin, NULL, NULL, -1);
+
+ fail_unless (gst_element_query_duration (bin, &fmt, &duration));
+ fail_unless_equals_int (duration, 512);
+
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ g_main_loop_run (loop);
+
+ gst_element_set_state (bin, GST_STATE_NULL);
+ gst_object_unref (bin);
+
+ fail_unless (got_eos);
+
g_object_unref (input);
g_object_unref (output);