1 /* GStreamer unit tests for multiqueue
3 * Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
23 #include <gst/check/gstcheck.h>
25 static GStaticMutex _check_lock = G_STATIC_MUTEX_INIT;
28 setup_multiqueue (GstElement * pipe, GstElement * inputs[],
29 GstElement * outputs[], guint num)
34 mq = gst_element_factory_make ("multiqueue", NULL);
35 fail_unless (mq != NULL, "failed to create 'multiqueue' element");
37 gst_bin_add (GST_BIN (pipe), mq);
39 for (i = 0; i < num; ++i) {
40 GstPad *sinkpad = NULL;
41 GstPad *srcpad = NULL;
43 /* create multiqueue sink (and source) pad */
44 sinkpad = gst_element_get_request_pad (mq, "sink%d");
45 fail_unless (sinkpad != NULL,
46 "failed to create multiqueue request pad #%u", i);
48 /* link input element N to the N-th multiqueue sink pad we just created */
49 if (inputs != NULL && inputs[i] != NULL) {
50 gst_bin_add (GST_BIN (pipe), inputs[i]);
52 srcpad = gst_element_get_static_pad (inputs[i], "src");
53 fail_unless (srcpad != NULL, "failed to find src pad for input #%u", i);
55 fail_unless_equals_int (GST_PAD_LINK_OK, gst_pad_link (srcpad, sinkpad));
57 gst_object_unref (srcpad);
60 gst_object_unref (sinkpad);
63 /* link output element N to the N-th multiqueue src pad */
64 if (outputs != NULL && outputs[i] != NULL) {
67 /* only the sink pads are by request, the source pads are sometimes pads,
68 * so this should return NULL */
69 srcpad = gst_element_get_request_pad (mq, "src%d");
70 fail_unless (srcpad == NULL);
72 g_snprintf (padname, sizeof (padname), "src%d", i);
73 srcpad = gst_element_get_static_pad (mq, padname);
74 fail_unless (srcpad != NULL, "failed to get multiqueue src pad #%u", i);
75 fail_unless (GST_PAD_IS_SRC (srcpad),
76 "%s:%s is not a source pad?!", GST_DEBUG_PAD_NAME (srcpad));
78 gst_bin_add (GST_BIN (pipe), outputs[i]);
80 sinkpad = gst_element_get_static_pad (outputs[i], "sink");
81 fail_unless (sinkpad != NULL, "failed to find sink pad of output #%u", i);
82 fail_unless (GST_PAD_IS_SINK (sinkpad));
84 fail_unless_equals_int (GST_PAD_LINK_OK, gst_pad_link (srcpad, sinkpad));
86 gst_object_unref (srcpad);
87 gst_object_unref (sinkpad);
94 GST_START_TEST (test_simple_pipeline)
97 GstElement *inputs[1];
98 GstElement *outputs[1];
101 pipe = gst_pipeline_new ("pipeline");
103 inputs[0] = gst_element_factory_make ("fakesrc", NULL);
104 fail_unless (inputs[0] != NULL, "failed to create 'fakesrc' element");
105 g_object_set (inputs[0], "num-buffers", 256, NULL);
107 outputs[0] = gst_element_factory_make ("fakesink", NULL);
108 fail_unless (outputs[0] != NULL, "failed to create 'fakesink' element");
110 setup_multiqueue (pipe, inputs, outputs, 1);
112 gst_element_set_state (pipe, GST_STATE_PLAYING);
114 msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
115 GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
117 fail_if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR,
118 "Expected EOS message, got ERROR message");
119 gst_message_unref (msg);
121 GST_LOG ("Got EOS, cleaning up");
123 gst_element_set_state (pipe, GST_STATE_NULL);
124 gst_object_unref (pipe);
129 GST_START_TEST (test_simple_shutdown_while_running)
132 GstElement *inputs[1];
133 GstElement *outputs[1];
136 pipe = gst_pipeline_new ("pipeline");
138 inputs[0] = gst_element_factory_make ("fakesrc", NULL);
139 fail_unless (inputs[0] != NULL, "failed to create 'fakesrc' element");
141 outputs[0] = gst_element_factory_make ("fakesink", NULL);
142 fail_unless (outputs[0] != NULL, "failed to create 'fakesink' element");
144 setup_multiqueue (pipe, inputs, outputs, 1);
146 gst_element_set_state (pipe, GST_STATE_PAUSED);
148 /* wait until pipeline is up and running */
149 msg = gst_bus_poll (GST_ELEMENT_BUS (pipe),
150 GST_MESSAGE_ERROR | GST_MESSAGE_ASYNC_DONE, -1);
151 fail_if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR, "Got ERROR message");
152 gst_message_unref (msg);
154 GST_LOG ("pipeline is running now");
155 gst_element_set_state (pipe, GST_STATE_PAUSED);
157 /* wait a bit to accumulate some buffers in the queue (while it's blocking
160 gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_ERROR, GST_SECOND / 4);
162 g_error ("Got ERROR message");
164 /* now shut down only the sink, so the queue gets a wrong-state flow return */
165 gst_element_set_state (outputs[0], GST_STATE_NULL);
167 gst_bus_poll (GST_ELEMENT_BUS (pipe), GST_MESSAGE_ERROR, GST_SECOND / 2);
169 g_error ("Got ERROR message");
171 GST_LOG ("Cleaning up");
173 gst_element_set_state (pipe, GST_STATE_NULL);
174 gst_object_unref (pipe);
179 GST_START_TEST (test_simple_create_destroy)
183 mq = gst_element_factory_make ("multiqueue", NULL);
184 gst_object_unref (mq);
189 GST_START_TEST (test_request_pads)
192 GstPad *sink1, *sink2;
194 mq = gst_element_factory_make ("multiqueue", NULL);
196 sink1 = gst_element_get_request_pad (mq, "foo%d");
197 fail_unless (sink1 == NULL,
198 "Expected NULL pad, as there is no request pad template for 'foo%%d'");
200 sink1 = gst_element_get_request_pad (mq, "src%d");
201 fail_unless (sink1 == NULL,
202 "Expected NULL pad, as there is no request pad template for 'src%%d'");
204 sink1 = gst_element_get_request_pad (mq, "sink%d");
205 fail_unless (sink1 != NULL);
206 fail_unless (GST_IS_PAD (sink1));
207 fail_unless (GST_PAD_IS_SINK (sink1));
208 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1));
210 sink2 = gst_element_get_request_pad (mq, "sink%d");
211 fail_unless (sink2 != NULL);
212 fail_unless (GST_IS_PAD (sink2));
213 fail_unless (GST_PAD_IS_SINK (sink2));
214 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink2));
216 fail_unless (sink1 != sink2);
218 GST_LOG ("Cleaning up");
219 gst_object_unref (sink1);
220 gst_object_unref (sink2);
221 gst_object_unref (mq);
227 mq_sinkpad_to_srcpad (GstElement * mq, GstPad * sink)
229 GstPad *srcpad = NULL;
231 gchar *mq_sinkpad_name;
232 gchar *mq_srcpad_name;
234 mq_sinkpad_name = gst_pad_get_name (sink);
235 fail_unless (g_str_has_prefix (mq_sinkpad_name, "sink"));
236 mq_srcpad_name = g_strdup_printf ("src%s", mq_sinkpad_name + 4);
237 srcpad = gst_element_get_static_pad (mq, mq_srcpad_name);
238 fail_unless (srcpad != NULL);
240 g_free (mq_sinkpad_name);
241 g_free (mq_srcpad_name);
246 GST_START_TEST (test_request_pads_named)
249 GstPad *sink1, *sink2, *sink3, *sink4;
251 mq = gst_element_factory_make ("multiqueue", NULL);
253 sink1 = gst_element_get_request_pad (mq, "sink1");
254 fail_unless (sink1 != NULL);
255 fail_unless (GST_IS_PAD (sink1));
256 fail_unless (GST_PAD_IS_SINK (sink1));
257 fail_unless_equals_string (GST_PAD_NAME (sink1), "sink1");
258 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink1));
260 sink3 = gst_element_get_request_pad (mq, "sink3");
261 fail_unless (sink3 != NULL);
262 fail_unless (GST_IS_PAD (sink3));
263 fail_unless (GST_PAD_IS_SINK (sink3));
264 fail_unless_equals_string (GST_PAD_NAME (sink3), "sink3");
265 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink3));
267 sink2 = gst_element_get_request_pad (mq, "sink2");
268 fail_unless (sink2 != NULL);
269 fail_unless (GST_IS_PAD (sink2));
270 fail_unless (GST_PAD_IS_SINK (sink2));
271 fail_unless_equals_string (GST_PAD_NAME (sink2), "sink2");
272 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink2));
274 /* This gets us the first unused id, sink0 */
275 sink4 = gst_element_get_request_pad (mq, "sink%d");
276 fail_unless (sink4 != NULL);
277 fail_unless (GST_IS_PAD (sink4));
278 fail_unless (GST_PAD_IS_SINK (sink4));
279 fail_unless_equals_string (GST_PAD_NAME (sink4), "sink0");
280 GST_LOG ("Got pad %s:%s", GST_DEBUG_PAD_NAME (sink4));
282 GST_LOG ("Cleaning up");
283 gst_object_unref (sink1);
284 gst_object_unref (sink2);
285 gst_object_unref (sink3);
286 gst_object_unref (sink4);
287 gst_object_unref (mq);
293 mq_dummypad_getcaps (GstPad * sinkpad)
295 return gst_caps_new_any ();
301 guint32 *max_linked_id_ptr;
302 guint32 *eos_count_ptr;
312 mq_dummypad_chain (GstPad * sinkpad, GstBuffer * buf)
315 struct PadData *pad_data;
319 pad_data = gst_pad_get_element_private (sinkpad);
321 g_static_mutex_lock (&_check_lock);
322 fail_if (pad_data == NULL);
323 /* Read an ID from the first 4 bytes of the buffer data and check it's
325 data = gst_buffer_map (buf, &size, NULL, GST_MAP_READ);
326 fail_unless (size >= 4);
327 g_static_mutex_unlock (&_check_lock);
328 cur_id = GST_READ_UINT32_BE (data);
329 gst_buffer_unmap (buf, data, size);
331 g_mutex_lock (pad_data->mutex);
333 /* For not-linked pads, ensure that we're not running ahead of the 'linked'
334 * pads. The first buffer is allowed to get ahead, because otherwise things can't
335 * always pre-roll correctly */
336 if (!pad_data->is_linked) {
337 /* If there are no linked pads, we can't track a max_id for them :) */
338 if (pad_data->n_linked > 0 && !pad_data->first_buf) {
339 g_static_mutex_lock (&_check_lock);
340 fail_unless (cur_id <= *(pad_data->max_linked_id_ptr) + 1,
341 "Got buffer %u on pad %u before buffer %u was seen on a "
342 "linked pad (max: %u)", cur_id, pad_data->pad_num, cur_id - 1,
343 *(pad_data->max_linked_id_ptr));
344 g_static_mutex_unlock (&_check_lock);
347 /* Update the max_id value */
348 if (cur_id > *(pad_data->max_linked_id_ptr))
349 *(pad_data->max_linked_id_ptr) = cur_id;
351 pad_data->first_buf = FALSE;
353 g_mutex_unlock (pad_data->mutex);
355 /* Unref the buffer */
356 gst_buffer_unref (buf);
358 /* Return OK or not-linked as indicated */
359 return pad_data->is_linked ? GST_FLOW_OK : GST_FLOW_NOT_LINKED;
363 mq_dummypad_event (GstPad * sinkpad, GstEvent * event)
365 struct PadData *pad_data;
367 pad_data = gst_pad_get_element_private (sinkpad);
368 g_static_mutex_lock (&_check_lock);
369 fail_if (pad_data == NULL);
370 g_static_mutex_unlock (&_check_lock);
372 if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
373 g_mutex_lock (pad_data->mutex);
375 /* Accumulate that we've seen the EOS and signal the main thread */
376 *(pad_data->eos_count_ptr) += 1;
378 GST_DEBUG ("EOS on pad %u", pad_data->pad_num);
380 g_cond_broadcast (pad_data->cond);
381 g_mutex_unlock (pad_data->mutex);
384 gst_event_unref (event);
389 run_output_order_test (gint n_linked)
391 /* This test creates a multiqueue with 2 linked output, and 3 outputs that
392 * return 'not-linked' when data is pushed, then verifies that all buffers
393 * are received on not-linked pads only after earlier buffers on the
394 * 'linked' pads are made */
397 GstPad *inputpads[5];
399 struct PadData pad_data[5];
400 guint32 max_linked_id;
405 const gint NPADS = 5;
406 const gint NBUFFERS = 1000;
408 mutex = g_mutex_new ();
409 cond = g_cond_new ();
411 pipe = gst_bin_new ("testbin");
413 mq = gst_element_factory_make ("multiqueue", NULL);
414 fail_unless (mq != NULL);
415 gst_bin_add (GST_BIN (pipe), mq);
419 "max-size-bytes", (guint) 0,
420 "max-size-buffers", (guint) 0,
421 "max-size-time", (guint64) 0,
422 "extra-size-bytes", (guint) 0,
423 "extra-size-buffers", (guint) 0, "extra-size-time", (guint64) 0, NULL);
425 /* Construct NPADS dummy output pads. The first 'n_linked' return FLOW_OK, the rest
426 * return NOT_LINKED. The not-linked ones check the expected ordering of
428 for (i = 0; i < NPADS; i++) {
429 GstPad *mq_srcpad, *mq_sinkpad;
432 name = g_strdup_printf ("dummysrc%d", i);
433 inputpads[i] = gst_pad_new (name, GST_PAD_SRC);
435 gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps);
437 mq_sinkpad = gst_element_get_request_pad (mq, "sink%d");
438 fail_unless (mq_sinkpad != NULL);
439 gst_pad_link (inputpads[i], mq_sinkpad);
441 gst_pad_set_active (inputpads[i], TRUE);
443 mq_srcpad = mq_sinkpad_to_srcpad (mq, mq_sinkpad);
445 name = g_strdup_printf ("dummysink%d", i);
446 sinkpads[i] = gst_pad_new (name, GST_PAD_SINK);
448 gst_pad_set_chain_function (sinkpads[i], mq_dummypad_chain);
449 gst_pad_set_event_function (sinkpads[i], mq_dummypad_event);
450 gst_pad_set_getcaps_function (sinkpads[i], mq_dummypad_getcaps);
452 pad_data[i].pad_num = i;
453 pad_data[i].max_linked_id_ptr = &max_linked_id;
454 pad_data[i].eos_count_ptr = &eos_seen;
455 pad_data[i].is_linked = (i < n_linked ? TRUE : FALSE);
456 pad_data[i].n_linked = n_linked;
457 pad_data[i].cond = cond;
458 pad_data[i].mutex = mutex;
459 pad_data[i].first_buf = TRUE;
460 gst_pad_set_element_private (sinkpads[i], pad_data + i);
462 gst_pad_link (mq_srcpad, sinkpads[i]);
463 gst_pad_set_active (sinkpads[i], TRUE);
465 gst_object_unref (mq_sinkpad);
466 gst_object_unref (mq_srcpad);
469 /* Run the test. Push 1000 buffers through the multiqueue in a pattern */
473 gst_element_set_state (pipe, GST_STATE_PLAYING);
475 for (i = 0; i < NBUFFERS; i++) {
476 const guint8 pad_pattern[] =
477 { 0, 0, 0, 0, 1, 1, 2, 1, 0, 2, 3, 2, 3, 1, 4 };
478 const guint n = sizeof (pad_pattern) / sizeof (guint8);
484 cur_pad = pad_pattern[i % n];
486 buf = gst_buffer_new_and_alloc (4);
487 g_static_mutex_lock (&_check_lock);
488 fail_if (buf == NULL);
489 g_static_mutex_unlock (&_check_lock);
491 data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
492 GST_WRITE_UINT32_BE (data, i + 1);
493 gst_buffer_unmap (buf, data, 4);
494 GST_BUFFER_TIMESTAMP (buf) = (i + 1) * GST_SECOND;
496 ret = gst_pad_push (inputpads[cur_pad], buf);
497 g_static_mutex_lock (&_check_lock);
498 if (pad_data[cur_pad].is_linked) {
499 fail_unless (ret == GST_FLOW_OK,
500 "Push on pad %d returned %d when FLOW_OK was expected", cur_pad, ret);
502 /* Expect OK initially, then NOT_LINKED when the srcpad starts pushing */
503 fail_unless (ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED,
504 "Push on pad %d returned %d when FLOW_OK or NOT_LINKED was expected",
507 g_static_mutex_unlock (&_check_lock);
509 for (i = 0; i < NPADS; i++) {
510 gst_pad_push_event (inputpads[i], gst_event_new_eos ());
513 /* Wait while the buffers are processed */
514 g_mutex_lock (mutex);
515 /* We wait until EOS has been pushed on all linked pads */
516 while (eos_seen < n_linked) {
517 g_cond_wait (cond, mutex);
519 g_mutex_unlock (mutex);
522 for (i = 0; i < NPADS; i++) {
523 GstPad *mq_input = gst_pad_get_peer (inputpads[i]);
525 gst_pad_unlink (inputpads[i], mq_input);
526 gst_element_release_request_pad (mq, mq_input);
527 gst_object_unref (mq_input);
528 gst_object_unref (inputpads[i]);
530 gst_object_unref (sinkpads[i]);
533 gst_element_set_state (pipe, GST_STATE_NULL);
534 gst_object_unref (pipe);
537 g_mutex_free (mutex);
540 GST_START_TEST (test_output_order)
542 run_output_order_test (2);
543 run_output_order_test (0);
548 GST_START_TEST (test_sparse_stream)
550 /* This test creates a multiqueue with 2 streams. One receives
551 * a constant flow of buffers, the other only gets one buffer, and then
552 * new-segment events, and returns not-linked. The multiqueue should not fill.
556 GstPad *inputpads[2];
559 struct PadData pad_data[2];
560 guint32 eos_seen, max_linked_id;
564 const gint NBUFFERS = 100;
567 mutex = g_mutex_new ();
568 cond = g_cond_new ();
570 pipe = gst_pipeline_new ("testbin");
571 mq = gst_element_factory_make ("multiqueue", NULL);
572 fail_unless (mq != NULL);
573 gst_bin_add (GST_BIN (pipe), mq);
577 "max-size-bytes", (guint) 0,
578 "max-size-buffers", (guint) 0,
579 "max-size-time", (guint64) GST_SECOND,
580 "extra-size-bytes", (guint) 0,
581 "extra-size-buffers", (guint) 0, "extra-size-time", (guint64) 0, NULL);
583 /* Construct 2 dummy output pads. */
584 for (i = 0; i < 2; i++) {
585 GstPad *mq_srcpad, *mq_sinkpad;
588 name = g_strdup_printf ("dummysrc%d", i);
589 inputpads[i] = gst_pad_new (name, GST_PAD_SRC);
591 gst_pad_set_getcaps_function (inputpads[i], mq_dummypad_getcaps);
593 mq_sinkpad = gst_element_get_request_pad (mq, "sink%d");
594 fail_unless (mq_sinkpad != NULL);
595 gst_pad_link (inputpads[i], mq_sinkpad);
597 gst_pad_set_active (inputpads[i], TRUE);
599 mq_srcpad = mq_sinkpad_to_srcpad (mq, mq_sinkpad);
601 name = g_strdup_printf ("dummysink%d", i);
602 sinkpads[i] = gst_pad_new (name, GST_PAD_SINK);
604 gst_pad_set_chain_function (sinkpads[i], mq_dummypad_chain);
605 gst_pad_set_event_function (sinkpads[i], mq_dummypad_event);
606 gst_pad_set_getcaps_function (sinkpads[i], mq_dummypad_getcaps);
608 pad_data[i].pad_num = i;
609 pad_data[i].max_linked_id_ptr = &max_linked_id;
610 pad_data[i].eos_count_ptr = &eos_seen;
611 pad_data[i].is_linked = (i == 0) ? TRUE : FALSE;
612 pad_data[i].n_linked = 1;
613 pad_data[i].cond = cond;
614 pad_data[i].mutex = mutex;
615 pad_data[i].first_buf = TRUE;
616 gst_pad_set_element_private (sinkpads[i], pad_data + i);
618 gst_pad_link (mq_srcpad, sinkpads[i]);
619 gst_pad_set_active (sinkpads[i], TRUE);
621 gst_object_unref (mq_sinkpad);
622 gst_object_unref (mq_srcpad);
625 /* Run the test. Push 100 buffers through the multiqueue */
629 gst_element_set_state (pipe, GST_STATE_PLAYING);
631 /* Push 2 new segment events */
632 gst_segment_init (&segment, GST_FORMAT_TIME);
633 event = gst_event_new_segment (&segment);
634 gst_pad_push_event (inputpads[0], gst_event_ref (event));
635 gst_pad_push_event (inputpads[1], event);
637 for (i = 0; i < NBUFFERS; i++) {
643 ts = gst_util_uint64_scale_int (GST_SECOND, i, 10);
645 buf = gst_buffer_new_and_alloc (4);
646 g_static_mutex_lock (&_check_lock);
647 fail_if (buf == NULL);
648 g_static_mutex_unlock (&_check_lock);
650 data = gst_buffer_map (buf, NULL, NULL, GST_MAP_WRITE);
651 GST_WRITE_UINT32_BE (data, i + 1);
652 gst_buffer_unmap (buf, data, 4);
654 GST_BUFFER_TIMESTAMP (buf) = gst_util_uint64_scale_int (GST_SECOND, i, 10);
656 /* If i == 0, also push the buffer to the 2nd pad */
658 ret = gst_pad_push (inputpads[1], gst_buffer_ref (buf));
660 ret = gst_pad_push (inputpads[0], buf);
661 g_static_mutex_lock (&_check_lock);
662 fail_unless (ret == GST_FLOW_OK,
663 "Push on pad %d returned %d when FLOW_OK was expected", 0, ret);
664 g_static_mutex_unlock (&_check_lock);
666 /* Push a new segment update on the 2nd pad */
667 gst_segment_init (&segment, GST_FORMAT_TIME);
670 event = gst_event_new_segment (&segment);
671 gst_pad_push_event (inputpads[1], event);
674 event = gst_event_new_eos ();
675 gst_pad_push_event (inputpads[0], gst_event_ref (event));
676 gst_pad_push_event (inputpads[1], event);
678 /* Wait while the buffers are processed */
679 g_mutex_lock (mutex);
680 /* We wait until EOS has been pushed on all pads */
681 while (eos_seen < 2) {
682 g_cond_wait (cond, mutex);
684 g_mutex_unlock (mutex);
687 for (i = 0; i < 2; i++) {
688 GstPad *mq_input = gst_pad_get_peer (inputpads[i]);
690 gst_pad_unlink (inputpads[i], mq_input);
691 gst_element_release_request_pad (mq, mq_input);
692 gst_object_unref (mq_input);
693 gst_object_unref (inputpads[i]);
695 gst_object_unref (sinkpads[i]);
698 gst_element_set_state (pipe, GST_STATE_NULL);
699 gst_object_unref (pipe);
702 g_mutex_free (mutex);
708 multiqueue_suite (void)
710 Suite *s = suite_create ("multiqueue");
711 TCase *tc_chain = tcase_create ("general");
713 suite_add_tcase (s, tc_chain);
714 tcase_add_test (tc_chain, test_simple_create_destroy);
715 tcase_add_test (tc_chain, test_simple_pipeline);
716 tcase_add_test (tc_chain, test_simple_shutdown_while_running);
718 tcase_add_test (tc_chain, test_request_pads);
719 tcase_add_test (tc_chain, test_request_pads_named);
721 tcase_add_test (tc_chain, test_output_order);
723 tcase_add_test (tc_chain, test_sparse_stream);
727 GST_CHECK_MAIN (multiqueue)