[farsight2/master] Replace fakesrc with audiotestsrc in generic rtpconference test
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:20:35 PST 2008
---
tests/check/main/generic.c | 41 ++++++++++-------------------------------
1 files changed, 10 insertions(+), 31 deletions(-)
diff --git a/tests/check/main/generic.c b/tests/check/main/generic.c
index 89fea8e..0051de4 100644
--- a/tests/check/main/generic.c
+++ b/tests/check/main/generic.c
@@ -117,51 +117,30 @@ cleanup_simple_conference (struct SimpleTestConference *dat)
void
setup_fakesrc (struct SimpleTestConference *dat)
{
- GstElement *capsfilter = NULL;
- GstCaps *caps = NULL;
GstPad *sinkpad = NULL, *srcpad = NULL;
g_debug ("Adding fakesrc");
- capsfilter = gst_element_factory_make ("capsfilter", NULL);
- fail_if (capsfilter == NULL, "Could not make capsfilter");
- gst_bin_add (GST_BIN (dat->pipeline), capsfilter);
-
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "rate", G_TYPE_INT, 8000,
- "channels", G_TYPE_INT, 1,
- NULL);
-
- g_object_set (capsfilter, "caps", caps, NULL);
-
- gst_caps_unref (caps);
g_object_get (dat->session, "sink-pad", &sinkpad, NULL);
fail_if (sinkpad == NULL, "Could not get session sinkpad");
- srcpad = gst_element_get_static_pad (capsfilter, "src");
-
- fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
- "Could not link the capsfilter and the fsrtpconference");
-
- gst_object_unref (sinkpad);
- gst_object_unref (srcpad);
-
- dat->fakesrc = gst_element_factory_make ("fakesrc", NULL);
- fail_if (dat->fakesrc == NULL, "Could not make fakesrc");
+ dat->fakesrc = gst_element_factory_make ("audiotestsrc", NULL);
+ fail_if (dat->fakesrc == NULL, "Could not make audiotestsrc");
gst_bin_add (GST_BIN (dat->pipeline), dat->fakesrc);
g_object_set (dat->fakesrc,
- /* "num-buffers", 2000, */
- "sizetype", 2,
- "sizemax", 10,
+ "blocksize", 10,
"is-live", TRUE,
- "sync", TRUE,
- "datarate", 2000,
NULL);
- fail_unless (gst_element_link_pads (dat->fakesrc, "src", capsfilter, "sink"),
- "Could not link capsfilter to sink");
+ srcpad = gst_element_get_static_pad (dat->fakesrc, "src");
+
+ fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK,
+ "Could not link the capsfilter and the fsrtpconference");
+
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
if (dat->started)
gst_element_set_state (dat->pipeline, GST_STATE_PLAYING);
--
1.5.6.5
More information about the farsight-commits
mailing list