tests: audiomixer: set all properties at once

This commit is contained in:
Stefan Sauer 2017-07-15 21:28:38 +02:00
parent db8482baaf
commit d176e8bd01

View file

@ -701,12 +701,10 @@ GST_START_TEST (test_add_pad)
gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH); gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
src1 = gst_element_factory_make ("audiotestsrc", "src1"); src1 = gst_element_factory_make ("audiotestsrc", "src1");
g_object_set (src1, "num-buffers", 4, NULL); g_object_set (src1, "num-buffers", 4, "wave", /* silence */ 4, NULL);
g_object_set (src1, "wave", 4, NULL); /* silence */
src2 = gst_element_factory_make ("audiotestsrc", "src2"); src2 = gst_element_factory_make ("audiotestsrc", "src2");
/* one buffer less, we connect with 1 buffer of delay */ /* one buffer less, we connect with 1 buffer of delay */
g_object_set (src2, "num-buffers", 3, NULL); g_object_set (src2, "num-buffers", 3, "wave", /* silence */ 4, NULL);
g_object_set (src2, "wave", 4, NULL); /* silence */
audiomixer = gst_element_factory_make ("audiomixer", "audiomixer"); audiomixer = gst_element_factory_make ("audiomixer", "audiomixer");
sink = gst_element_factory_make ("fakesink", "sink"); sink = gst_element_factory_make ("fakesink", "sink");
gst_bin_add_many (GST_BIN (bin), src1, audiomixer, sink, NULL); gst_bin_add_many (GST_BIN (bin), src1, audiomixer, sink, NULL);
@ -769,8 +767,7 @@ GST_START_TEST (test_remove_pad)
gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH); gst_bus_add_signal_watch_full (bus, G_PRIORITY_HIGH);
src = gst_element_factory_make ("audiotestsrc", "src"); src = gst_element_factory_make ("audiotestsrc", "src");
g_object_set (src, "num-buffers", 4, NULL); g_object_set (src, "num-buffers", 4, "wave", 4, NULL);
g_object_set (src, "wave", 4, NULL);
audiomixer = gst_element_factory_make ("audiomixer", "audiomixer"); audiomixer = gst_element_factory_make ("audiomixer", "audiomixer");
sink = gst_element_factory_make ("fakesink", "sink"); sink = gst_element_factory_make ("fakesink", "sink");
gst_bin_add_many (GST_BIN (bin), src, audiomixer, sink, NULL); gst_bin_add_many (GST_BIN (bin), src, audiomixer, sink, NULL);