diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2012-01-19 15:32:52 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2012-09-11 01:54:44 +0100 |
commit | 0a817d23e68951664d196900a0b4dd0907ff95c7 (patch) | |
tree | cf62f2ebe5c784c2df1d88542936504d75991137 /tests/check | |
parent | 12ce1cb319fabecb16a7395a35cf5e27dd0326ab (diff) |
tests: fix some tests
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/pipelines/streamheader.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/check/pipelines/streamheader.c b/tests/check/pipelines/streamheader.c index 29bf41fe3..052a3b47a 100644 --- a/tests/check/pipelines/streamheader.c +++ b/tests/check/pipelines/streamheader.c @@ -26,13 +26,14 @@ #include <unistd.h> +#include <gio/gio.h> #include <gst/check/gstcheck.h> #include <gst/check/gstbufferstraw.h> #ifndef GST_DISABLE_PARSE /* this tests a gdp-serialized tag from audiotestsrc being sent only once - * to clients of multifdsink */ + * to clients of multisocketsink */ static int n_tags = 0; @@ -61,18 +62,19 @@ tag_event_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) return GST_PAD_PROBE_OK; } -GST_START_TEST (test_multifdsink_gdp_tag) +GST_START_TEST (test_multisocketsink_gdp_tag) { GstElement *p1, *p2; GstElement *src, *sink, *depay; GstPad *pad; GMainLoop *loop; int pfd[2]; + GSocket *s[2]; loop = g_main_loop_new (NULL, FALSE); p1 = gst_parse_launch ("audiotestsrc num-buffers=10 ! gdppay" - " ! multifdsink name=p1sink", NULL); + " ! multisocketsink name=p1sink", NULL); fail_if (p1 == NULL); p2 = gst_parse_launch ("fdsrc name=p2src ! gdpdepay name=depay" " ! fakesink name=p2sink signal-handoffs=True", NULL); @@ -80,11 +82,12 @@ GST_START_TEST (test_multifdsink_gdp_tag) fail_if (pipe (pfd) == -1); + s[0] = g_socket_new_from_fd (pfd[0], NULL); gst_element_set_state (p1, GST_STATE_READY); sink = gst_bin_get_by_name (GST_BIN (p1), "p1sink"); - g_signal_emit_by_name (sink, "add", pfd[1], NULL); + g_signal_emit_by_name (sink, "add", s[1], NULL); gst_object_unref (sink); src = gst_bin_get_by_name (GST_BIN (p2), "p2src"); @@ -118,7 +121,7 @@ GST_END_TEST; #ifdef HAVE_VORBIS /* this tests gdp-serialized Vorbis header pages being sent only once - * to clients of multifdsink; the gdp depayloader should deserialize + * to clients of multisocketsink; the gdp depayloader should deserialize * exactly three in_caps buffers for the three header packets */ static int n_in_caps = 0; @@ -177,18 +180,19 @@ buffer_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) return TRUE; } -GST_START_TEST (test_multifdsink_gdp_vorbisenc) +GST_START_TEST (test_multisocketsink_gdp_vorbisenc) { GstElement *p1, *p2; GstElement *src, *sink, *depay; GstPad *pad; GMainLoop *loop; int pfd[2]; + GSocket *s[2]; loop = g_main_loop_new (NULL, FALSE); p1 = gst_parse_launch ("audiotestsrc num-buffers=10 ! audioconvert " - " ! vorbisenc ! gdppay ! multifdsink name=p1sink", NULL); + " ! vorbisenc ! gdppay ! multisocketsink name=p1sink", NULL); fail_if (p1 == NULL); p2 = gst_parse_launch ("fdsrc name=p2src ! gdpdepay name=depay" " ! fakesink name=p2sink signal-handoffs=True", NULL); @@ -196,11 +200,12 @@ GST_START_TEST (test_multifdsink_gdp_vorbisenc) fail_if (pipe (pfd) == -1); + s[0] = g_socket_new_from_fd (pfd[0], NULL); gst_element_set_state (p1, GST_STATE_READY); sink = gst_bin_get_by_name (GST_BIN (p1), "p1sink"); - g_signal_emit_by_name (sink, "add", pfd[1], NULL); + g_signal_emit_by_name (sink, "add", s[1], NULL); gst_object_unref (sink); src = gst_bin_get_by_name (GST_BIN (p2), "p2src"); @@ -245,9 +250,9 @@ streamheader_suite (void) suite_add_tcase (s, tc_chain); #ifndef GST_DISABLE_PARSE - tcase_add_test (tc_chain, test_multifdsink_gdp_tag); + tcase_add_test (tc_chain, test_multisocketsink_gdp_tag); #ifdef HAVE_VORBIS - tcase_add_test (tc_chain, test_multifdsink_gdp_vorbisenc); + tcase_add_test (tc_chain, test_multisocketsink_gdp_vorbisenc); #endif #endif |