2 * Copyright (C) 2012 Wim Taymans <wim.taymans@gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #include <gst/check/gstcheck.h>
22 #include <rtsp-media-factory.h>
24 /* Check if the media can return a SDP. We don't actually check whether
25 * the contents are valid or not */
27 media_has_sdp (GstRTSPMedia * media)
34 info.server_ip = "0.0.0.0";
36 /* Check if media can generate a SDP */
37 gst_sdp_message_new (&sdp);
38 GST_DEBUG ("Getting SDP");
39 if (!gst_rtsp_sdp_from_media (sdp, &info, media)) {
40 GST_WARNING ("failed to get the SDP");
41 gst_sdp_message_free (sdp);
44 sdp_str = gst_sdp_message_as_text (sdp);
45 GST_DEBUG ("Got SDP\n%s", sdp_str);
47 gst_sdp_message_free (sdp);
52 GST_START_TEST (test_media_seek)
54 GstRTSPMediaFactory *factory;
57 GstRTSPStream *stream;
58 GstRTSPTimeRange *range;
60 GstRTSPThreadPool *pool;
61 GstRTSPThread *thread;
62 GstRTSPTransport *transport;
64 factory = gst_rtsp_media_factory_new ();
65 fail_if (gst_rtsp_media_factory_is_shared (factory));
66 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
67 &url) == GST_RTSP_OK);
69 gst_rtsp_media_factory_set_launch (factory,
70 "( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
72 media = gst_rtsp_media_factory_construct (factory, url);
73 fail_unless (GST_IS_RTSP_MEDIA (media));
75 fail_unless (gst_rtsp_media_n_streams (media) == 1);
77 stream = gst_rtsp_media_get_stream (media, 0);
78 fail_unless (stream != NULL);
80 pool = gst_rtsp_thread_pool_new ();
81 thread = gst_rtsp_thread_pool_get_thread (pool,
82 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
84 fail_unless (gst_rtsp_media_prepare (media, thread));
85 fail_unless (media_has_sdp (media));
87 /* define transport */
88 fail_unless (gst_rtsp_transport_new (&transport) == GST_RTSP_OK);
89 transport->lower_transport = GST_RTSP_LOWER_TRANS_TCP;
91 fail_unless (gst_rtsp_stream_complete_stream (stream, transport));
93 fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK);
94 fail_unless (gst_rtsp_range_parse ("npt=5.0-", &range) == GST_RTSP_OK);
96 /* the media is seekable now */
97 fail_unless (gst_rtsp_media_seek (media, range));
99 str = gst_rtsp_media_get_range_string (media, FALSE, GST_RTSP_RANGE_NPT);
100 fail_unless (g_str_equal (str, "npt=5-"));
102 gst_rtsp_range_free (range);
105 fail_unless (gst_rtsp_media_unprepare (media));
106 g_object_unref (media);
108 gst_rtsp_url_free (url);
109 g_object_unref (factory);
111 g_object_unref (pool);
113 gst_rtsp_thread_pool_cleanup ();
118 /* case: media is complete and contains two streams but only one is active */
119 GST_START_TEST (test_media_seek_one_active_stream)
121 GstRTSPMediaFactory *factory;
124 GstRTSPStream *stream1;
125 GstRTSPStream *stream2;
126 GstRTSPTimeRange *range;
127 GstRTSPThreadPool *pool;
128 GstRTSPThread *thread;
129 GstRTSPTransport *transport;
131 factory = gst_rtsp_media_factory_new ();
132 fail_if (gst_rtsp_media_factory_is_shared (factory));
133 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
134 &url) == GST_RTSP_OK);
136 gst_rtsp_media_factory_set_launch (factory,
137 "( videotestsrc ! rtpvrawpay pt=96 name=pay0 "
138 " audiotestsrc ! audioconvert ! rtpL16pay name=pay1 )");
140 media = gst_rtsp_media_factory_construct (factory, url);
141 fail_unless (GST_IS_RTSP_MEDIA (media));
143 fail_unless (gst_rtsp_media_n_streams (media) == 2);
145 stream1 = gst_rtsp_media_get_stream (media, 0);
146 fail_unless (stream1 != NULL);
148 pool = gst_rtsp_thread_pool_new ();
149 thread = gst_rtsp_thread_pool_get_thread (pool,
150 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
152 fail_unless (gst_rtsp_media_prepare (media, thread));
153 fail_unless (media_has_sdp (media));
155 /* define transport */
156 fail_unless (gst_rtsp_transport_new (&transport) == GST_RTSP_OK);
157 transport->lower_transport = GST_RTSP_LOWER_TRANS_TCP;
159 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
161 /* video stream is complete and seekable */
162 fail_unless (gst_rtsp_stream_complete_stream (stream1, transport));
163 fail_unless (gst_rtsp_stream_seekable (stream1));
165 /* audio stream is blocked (it does not contain any transport based part),
166 * but it's seekable */
167 stream2 = gst_rtsp_media_get_stream (media, 1);
168 fail_unless (stream2 != NULL);
169 fail_unless (gst_rtsp_stream_seekable (stream2));
171 fail_unless (gst_rtsp_transport_free (transport) == GST_RTSP_OK);
172 fail_unless (gst_rtsp_range_parse ("npt=3.0-", &range) == GST_RTSP_OK);
174 /* the media is seekable now */
175 fail_unless (gst_rtsp_media_seek (media, range));
177 gst_rtsp_range_free (range);
179 fail_unless (gst_rtsp_media_unprepare (media));
180 g_object_unref (media);
182 gst_rtsp_url_free (url);
183 g_object_unref (factory);
185 g_object_unref (pool);
187 gst_rtsp_thread_pool_cleanup ();
193 GST_START_TEST (test_media_seek_no_sinks)
195 GstRTSPMediaFactory *factory;
198 GstRTSPStream *stream;
199 GstRTSPTimeRange *range;
201 GstRTSPThreadPool *pool;
202 GstRTSPThread *thread;
204 factory = gst_rtsp_media_factory_new ();
205 fail_if (gst_rtsp_media_factory_is_shared (factory));
206 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
207 &url) == GST_RTSP_OK);
209 gst_rtsp_media_factory_set_launch (factory,
210 "( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
212 media = gst_rtsp_media_factory_construct (factory, url);
213 fail_unless (GST_IS_RTSP_MEDIA (media));
215 fail_unless (gst_rtsp_media_n_streams (media) == 1);
217 stream = gst_rtsp_media_get_stream (media, 0);
218 fail_unless (stream != NULL);
220 /* fails, need to be prepared */
221 str = gst_rtsp_media_get_range_string (media, FALSE, GST_RTSP_RANGE_NPT);
222 fail_unless (str == NULL);
224 fail_unless (gst_rtsp_range_parse ("npt=5.0-", &range) == GST_RTSP_OK);
225 /* fails, need to be prepared */
226 fail_if (gst_rtsp_media_seek (media, range));
228 pool = gst_rtsp_thread_pool_new ();
229 thread = gst_rtsp_thread_pool_get_thread (pool,
230 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
232 fail_unless (gst_rtsp_media_prepare (media, thread));
233 fail_unless (media_has_sdp (media));
235 str = gst_rtsp_media_get_range_string (media, FALSE, GST_RTSP_RANGE_NPT);
236 fail_unless (g_str_equal (str, "npt=0-"));
239 str = gst_rtsp_media_get_range_string (media, TRUE, GST_RTSP_RANGE_NPT);
240 fail_unless (g_str_equal (str, "npt=0-"));
243 /* fails, need to be prepared and contain sink elements */
244 fail_if (gst_rtsp_media_seek (media, range));
246 fail_unless (gst_rtsp_media_unprepare (media));
248 /* should fail again */
249 str = gst_rtsp_media_get_range_string (media, FALSE, GST_RTSP_RANGE_NPT);
250 fail_unless (str == NULL);
251 fail_if (gst_rtsp_media_seek (media, range));
253 gst_rtsp_range_free (range);
254 g_object_unref (media);
256 gst_rtsp_url_free (url);
257 g_object_unref (factory);
259 g_object_unref (pool);
261 gst_rtsp_thread_pool_cleanup ();
266 GST_START_TEST (test_media)
269 GstElement *bin, *e1, *e2;
271 bin = gst_bin_new ("bin");
272 fail_if (bin == NULL);
274 e1 = gst_element_factory_make ("videotestsrc", NULL);
275 fail_if (e1 == NULL);
277 e2 = gst_element_factory_make ("rtpvrawpay", "pay0");
278 fail_if (e2 == NULL);
279 g_object_set (e2, "pt", 96, NULL);
281 gst_bin_add_many (GST_BIN_CAST (bin), e1, e2, NULL);
282 gst_element_link_many (e1, e2, NULL);
284 media = gst_rtsp_media_new (bin);
285 fail_unless (GST_IS_RTSP_MEDIA (media));
286 g_object_unref (media);
292 test_prepare_reusable (const gchar * launch_line, gboolean is_live)
294 GstRTSPMediaFactory *factory;
297 GstRTSPThread *thread;
298 GstRTSPThreadPool *pool;
300 factory = gst_rtsp_media_factory_new ();
301 fail_if (gst_rtsp_media_factory_is_shared (factory));
302 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
303 &url) == GST_RTSP_OK);
305 gst_rtsp_media_factory_set_launch (factory, launch_line);
307 media = gst_rtsp_media_factory_construct (factory, url);
308 fail_unless (GST_IS_RTSP_MEDIA (media));
309 fail_unless (gst_rtsp_media_n_streams (media) == 1);
311 g_object_set (G_OBJECT (media), "reusable", TRUE, NULL);
313 pool = gst_rtsp_thread_pool_new ();
314 thread = gst_rtsp_thread_pool_get_thread (pool,
315 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
316 fail_unless (gst_rtsp_media_prepare (media, thread));
317 fail_unless (media_has_sdp (media));
318 if (is_live) { /* Live is not seekable */
319 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), -1);
321 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
323 fail_unless (gst_rtsp_media_unprepare (media));
324 fail_unless (gst_rtsp_media_n_streams (media) == 1);
326 thread = gst_rtsp_thread_pool_get_thread (pool,
327 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
328 fail_unless (gst_rtsp_media_prepare (media, thread));
329 fail_unless (media_has_sdp (media));
330 fail_unless (gst_rtsp_media_unprepare (media));
332 g_object_unref (media);
333 gst_rtsp_url_free (url);
334 g_object_unref (factory);
336 g_object_unref (pool);
339 GST_START_TEST (test_media_reusable)
342 /* test reusable media */
343 test_prepare_reusable ("( videotestsrc ! rtpvrawpay pt=96 name=pay0 )",
345 test_prepare_reusable
346 ("( videotestsrc is-live=true ! rtpvrawpay pt=96 name=pay0 )", TRUE);
351 GST_START_TEST (test_media_prepare)
353 GstRTSPMediaFactory *factory;
356 GstRTSPThreadPool *pool;
357 GstRTSPThread *thread;
359 pool = gst_rtsp_thread_pool_new ();
361 /* test non-reusable media first */
362 factory = gst_rtsp_media_factory_new ();
363 fail_if (gst_rtsp_media_factory_is_shared (factory));
364 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
365 &url) == GST_RTSP_OK);
367 gst_rtsp_media_factory_set_launch (factory,
368 "( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
370 media = gst_rtsp_media_factory_construct (factory, url);
371 fail_unless (GST_IS_RTSP_MEDIA (media));
372 fail_unless (gst_rtsp_media_n_streams (media) == 1);
374 thread = gst_rtsp_thread_pool_get_thread (pool,
375 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
376 fail_unless (gst_rtsp_media_prepare (media, thread));
377 fail_unless (media_has_sdp (media));
378 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
379 fail_unless (gst_rtsp_media_unprepare (media));
380 fail_unless (gst_rtsp_media_n_streams (media) == 1);
382 thread = gst_rtsp_thread_pool_get_thread (pool,
383 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
384 fail_if (gst_rtsp_media_prepare (media, thread));
386 g_object_unref (media);
387 gst_rtsp_url_free (url);
388 g_object_unref (factory);
390 g_object_unref (pool);
391 gst_rtsp_thread_pool_cleanup ();
396 #define FLAG_HAVE_CAPS GST_ELEMENT_FLAG_LAST
398 on_notify_caps (GstPad * pad, GParamSpec * pspec, GstElement * pay)
402 g_object_get (pad, "caps", &caps, NULL);
404 GST_DEBUG ("notify %" GST_PTR_FORMAT, caps);
407 if (!GST_OBJECT_FLAG_IS_SET (pay, FLAG_HAVE_CAPS)) {
408 g_signal_emit_by_name (pay, "pad-added", pad);
409 g_signal_emit_by_name (pay, "no-more-pads", NULL);
410 GST_OBJECT_FLAG_SET (pay, FLAG_HAVE_CAPS);
412 gst_caps_unref (caps);
414 if (GST_OBJECT_FLAG_IS_SET (pay, FLAG_HAVE_CAPS)) {
415 g_signal_emit_by_name (pay, "pad-removed", pad);
416 GST_OBJECT_FLAG_UNSET (pay, FLAG_HAVE_CAPS);
421 GST_START_TEST (test_media_dyn_prepare)
424 GstElement *bin, *src, *pay;
425 GstElement *pipeline;
427 GstRTSPThreadPool *pool;
428 GstRTSPThread *thread;
430 bin = gst_bin_new ("bin");
431 fail_if (bin == NULL);
433 src = gst_element_factory_make ("videotestsrc", NULL);
434 fail_if (src == NULL);
436 pay = gst_element_factory_make ("rtpvrawpay", "dynpay0");
437 fail_if (pay == NULL);
438 g_object_set (pay, "pt", 96, NULL);
440 gst_bin_add_many (GST_BIN_CAST (bin), src, pay, NULL);
441 gst_element_link_many (src, pay, NULL);
443 media = gst_rtsp_media_new (bin);
444 fail_unless (GST_IS_RTSP_MEDIA (media));
446 g_object_set (G_OBJECT (media), "reusable", TRUE, NULL);
448 pipeline = gst_pipeline_new ("media-pipeline");
449 gst_rtsp_media_take_pipeline (media, GST_PIPELINE_CAST (pipeline));
451 gst_rtsp_media_collect_streams (media);
453 srcpad = gst_element_get_static_pad (pay, "src");
455 g_signal_connect (srcpad, "notify::caps", (GCallback) on_notify_caps, pay);
457 pool = gst_rtsp_thread_pool_new ();
459 fail_unless (gst_rtsp_media_n_streams (media) == 0);
461 thread = gst_rtsp_thread_pool_get_thread (pool,
462 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
463 fail_unless (gst_rtsp_media_prepare (media, thread));
464 fail_unless (gst_rtsp_media_n_streams (media) == 1);
465 fail_unless (media_has_sdp (media));
466 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
467 fail_unless (gst_rtsp_media_unprepare (media));
468 fail_unless (gst_rtsp_media_n_streams (media) == 0);
470 thread = gst_rtsp_thread_pool_get_thread (pool,
471 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
472 fail_unless (gst_rtsp_media_prepare (media, thread));
473 fail_unless (gst_rtsp_media_n_streams (media) == 1);
474 fail_unless (media_has_sdp (media));
475 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
476 fail_unless (gst_rtsp_media_unprepare (media));
477 fail_unless (gst_rtsp_media_n_streams (media) == 0);
479 gst_object_unref (srcpad);
480 g_object_unref (media);
481 g_object_unref (pool);
483 gst_rtsp_thread_pool_cleanup ();
488 GST_START_TEST (test_media_take_pipeline)
490 GstRTSPMediaFactory *factory;
493 GstElement *pipeline;
495 factory = gst_rtsp_media_factory_new ();
496 fail_unless (gst_rtsp_url_parse ("rtsp://localhost:8554/test",
497 &url) == GST_RTSP_OK);
498 gst_rtsp_media_factory_set_launch (factory,
499 "( fakesrc ! text/plain ! rtpgstpay name=pay0 )");
501 media = gst_rtsp_media_factory_construct (factory, url);
502 fail_unless (GST_IS_RTSP_MEDIA (media));
504 pipeline = gst_pipeline_new ("media-pipeline");
505 gst_rtsp_media_take_pipeline (media, GST_PIPELINE_CAST (pipeline));
507 g_object_unref (media);
508 gst_rtsp_url_free (url);
509 g_object_unref (factory);
514 GST_START_TEST (test_media_reset)
516 GstRTSPMediaFactory *factory;
519 GstRTSPThreadPool *pool;
520 GstRTSPThread *thread;
522 pool = gst_rtsp_thread_pool_new ();
524 factory = gst_rtsp_media_factory_new ();
525 fail_if (gst_rtsp_media_factory_is_shared (factory));
526 gst_rtsp_url_parse ("rtsp://localhost:8554/test", &url);
528 gst_rtsp_media_factory_set_launch (factory,
529 "( videotestsrc ! rtpvrawpay pt=96 name=pay0 )");
531 media = gst_rtsp_media_factory_construct (factory, url);
532 fail_unless (GST_IS_RTSP_MEDIA (media));
534 thread = gst_rtsp_thread_pool_get_thread (pool,
535 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
536 fail_unless (gst_rtsp_media_prepare (media, thread));
537 fail_unless (media_has_sdp (media));
538 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
539 fail_unless (gst_rtsp_media_suspend (media));
540 fail_unless (gst_rtsp_media_unprepare (media));
541 g_object_unref (media);
543 media = gst_rtsp_media_factory_construct (factory, url);
544 fail_unless (GST_IS_RTSP_MEDIA (media));
546 thread = gst_rtsp_thread_pool_get_thread (pool,
547 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
548 gst_rtsp_media_set_suspend_mode (media, GST_RTSP_SUSPEND_MODE_RESET);
549 fail_unless (gst_rtsp_media_prepare (media, thread));
550 fail_unless (media_has_sdp (media));
551 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
552 fail_unless (gst_rtsp_media_suspend (media));
553 fail_unless (gst_rtsp_media_unprepare (media));
554 g_object_unref (media);
556 gst_rtsp_url_free (url);
557 g_object_unref (factory);
558 g_object_unref (pool);
560 gst_rtsp_thread_pool_cleanup ();
565 GST_START_TEST (test_media_multidyn_prepare)
568 GstElement *bin, *src0, *pay0, *src1, *pay1;
569 GstElement *pipeline;
570 GstPad *srcpad0, *srcpad1;
571 GstRTSPThreadPool *pool;
572 GstRTSPThread *thread;
574 bin = gst_bin_new ("bin");
575 fail_if (bin == NULL);
577 src0 = gst_element_factory_make ("videotestsrc", NULL);
578 fail_if (src0 == NULL);
580 pay0 = gst_element_factory_make ("rtpvrawpay", "dynpay0");
581 fail_if (pay0 == NULL);
582 g_object_set (pay0, "pt", 96, NULL);
584 src1 = gst_element_factory_make ("videotestsrc", NULL);
585 fail_if (src1 == NULL);
587 pay1 = gst_element_factory_make ("rtpvrawpay", "dynpay1");
588 fail_if (pay1 == NULL);
589 g_object_set (pay1, "pt", 97, NULL);
591 gst_bin_add_many (GST_BIN_CAST (bin), src0, pay0, src1, pay1, NULL);
592 gst_element_link_many (src0, pay0, NULL);
593 gst_element_link_many (src1, pay1, NULL);
595 media = gst_rtsp_media_new (bin);
596 fail_unless (GST_IS_RTSP_MEDIA (media));
598 g_object_set (G_OBJECT (media), "reusable", TRUE, NULL);
600 pipeline = gst_pipeline_new ("media-pipeline");
601 gst_rtsp_media_take_pipeline (media, GST_PIPELINE_CAST (pipeline));
603 gst_rtsp_media_collect_streams (media);
605 srcpad0 = gst_element_get_static_pad (pay0, "src");
606 srcpad1 = gst_element_get_static_pad (pay1, "src");
608 g_signal_connect (srcpad0, "notify::caps", (GCallback) on_notify_caps, pay0);
609 g_signal_connect (srcpad1, "notify::caps", (GCallback) on_notify_caps, pay1);
611 pool = gst_rtsp_thread_pool_new ();
613 fail_unless_equals_int (gst_rtsp_media_n_streams (media), 0);
615 thread = gst_rtsp_thread_pool_get_thread (pool,
616 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
617 fail_unless (gst_rtsp_media_prepare (media, thread));
618 fail_unless_equals_int (gst_rtsp_media_n_streams (media), 2);
619 fail_unless (media_has_sdp (media));
620 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
621 fail_unless (gst_rtsp_media_unprepare (media));
622 fail_unless_equals_int (gst_rtsp_media_n_streams (media), 0);
624 thread = gst_rtsp_thread_pool_get_thread (pool,
625 GST_RTSP_THREAD_TYPE_MEDIA, NULL);
626 fail_unless (gst_rtsp_media_prepare (media, thread));
627 fail_unless_equals_int (gst_rtsp_media_n_streams (media), 2);
628 fail_unless (media_has_sdp (media));
629 fail_unless_equals_int64 (gst_rtsp_media_seekable (media), G_MAXINT64);
630 fail_unless (gst_rtsp_media_unprepare (media));
631 fail_unless_equals_int (gst_rtsp_media_n_streams (media), 0);
633 gst_object_unref (srcpad0);
634 gst_object_unref (srcpad1);
635 g_object_unref (media);
636 g_object_unref (pool);
638 gst_rtsp_thread_pool_cleanup ();
645 rtspmedia_suite (void)
647 Suite *s = suite_create ("rtspmedia");
648 TCase *tc = tcase_create ("general");
650 suite_add_tcase (s, tc);
651 tcase_set_timeout (tc, 20);
652 tcase_add_test (tc, test_media_seek);
653 tcase_add_test (tc, test_media_seek_no_sinks);
654 tcase_add_test (tc, test_media_seek_one_active_stream);
655 tcase_add_test (tc, test_media);
656 tcase_add_test (tc, test_media_prepare);
657 tcase_add_test (tc, test_media_reusable);
658 tcase_add_test (tc, test_media_dyn_prepare);
659 tcase_add_test (tc, test_media_take_pipeline);
660 tcase_add_test (tc, test_media_reset);
661 tcase_add_test (tc, test_media_multidyn_prepare);
666 GST_CHECK_MAIN (rtspmedia);