diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2011-02-08 18:00:04 +0000 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2011-10-11 15:37:15 -0400 |
commit | 4aa321820f8c6b99d034c8ec5c7b391e4fe04b4e (patch) | |
tree | d0415c29ff8abff7c3a9f1dbcaefa166fe9ed13b /tests | |
parent | 0c8d9f6f03f908b1c9579ffc1f677baf5bed09db (diff) | |
download | farstream-4aa321820f8c6b99d034c8ec5c7b391e4fe04b4e.tar.gz |
tests: Use set_transmitter for rtp tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/rtp/codecs.c | 12 | ||||
-rw-r--r-- | tests/check/rtp/conference.c | 11 | ||||
-rw-r--r-- | tests/check/rtp/generic.c | 7 | ||||
-rw-r--r-- | tests/check/rtp/recvcodecs.c | 5 | ||||
-rw-r--r-- | tests/check/rtp/sendcodecs.c | 5 |
5 files changed, 26 insertions, 14 deletions
diff --git a/tests/check/rtp/codecs.c b/tests/check/rtp/codecs.c index f50d2a4d..414739b0 100644 --- a/tests/check/rtp/codecs.c +++ b/tests/check/rtp/codecs.c @@ -487,7 +487,7 @@ GST_START_TEST (test_rtpcodecs_reserved_pt) fail_if (p == NULL, "Could not add participant"); s = fs_session_new_stream (dat->session, p, - FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL); + FS_DIRECTION_BOTH, NULL, 0, NULL, NULL); fail_if (s == NULL, "Could not add stream"); g_object_unref (p); @@ -725,7 +725,7 @@ _bus_message_element (GstBus *bus, GstMessage *message, fail ("Could not add second participant to conference %s", error->message); stream2 = fs_session_new_stream (cd->dat->session, p2, FS_DIRECTION_BOTH, - "rawudp", 0, NULL, NULL); + NULL, 0, NULL, NULL); fail_if (stream2 == NULL, "Could not second create new stream"); @@ -824,7 +824,7 @@ run_test_rtpcodecs_config_data (gboolean preset_remotes) fail_if (cd.participant == NULL, "Could not add participant to conference"); cd.stream = fs_session_new_stream (cd.dat->session, cd.participant, - FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL); + FS_DIRECTION_BOTH, NULL, 0, NULL, NULL); fail_if (cd.stream == NULL, "Could not create new stream"); @@ -1171,7 +1171,7 @@ GST_START_TEST (test_rtpcodecs_ptime) fail_if (participant == NULL, "Could not add participant to conference"); stream = fs_session_new_stream (dat->session, participant, - FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL); + FS_DIRECTION_BOTH, NULL, 0, NULL, NULL); fail_if (stream == NULL, "Could not add stream to session"); codecs = g_list_append (NULL, fs_codec_copy (prefcodec)); @@ -1328,7 +1328,7 @@ GST_START_TEST (test_rtpcodecs_telephone_event_nego) setup_codec_tests (&dat, &participant, FS_MEDIA_TYPE_AUDIO); stream = fs_session_new_stream (dat->session, participant, - FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL); + FS_DIRECTION_BOTH, NULL, 0, NULL, NULL); fail_if (stream == NULL, "Could not add stream to session"); g_object_get (dat->session, "codecs-without-config", &codecs, NULL); @@ -1437,7 +1437,7 @@ test_one_codec_internal (const gchar *addr, FsStream *stream; stream = fs_session_new_stream (session, participant, - FS_DIRECTION_BOTH, "rawudp", 0, NULL, NULL); + FS_DIRECTION_BOTH, NULL, 0, NULL, NULL); fail_if (stream == NULL, "Could not add stream to session"); codecs = g_list_append (NULL, prefcodec); diff --git a/tests/check/rtp/conference.c b/tests/check/rtp/conference.c index 0024f95c..d814d1f0 100644 --- a/tests/check/rtp/conference.c +++ b/tests/check/rtp/conference.c @@ -935,10 +935,11 @@ GST_START_TEST (test_rtpconference_errors) ts_fail_if (participant == NULL, "Could not create participant"); stream = fs_session_new_stream (dat->session, participant, FS_DIRECTION_NONE, - "invalid-transmitter-name", 0, NULL, &error); + NULL, 0, NULL, &error); + ts_fail_unless (stream != NULL); - ts_fail_unless (stream == NULL, "A stream was created with an invalid" - " transmitter name"); + fail_unless (fs_stream_set_transmitter (stream, "invalid-transmitter-name", + NULL, 0, &error) == FALSE); ts_fail_if (error == NULL, "Error was not set"); ts_fail_unless (error->domain == FS_ERROR && error->code == FS_ERROR_CONSTRUCTION, @@ -1241,7 +1242,7 @@ GST_START_TEST (test_rtpconference_dispose) part = fs_conference_new_participant (conf, &error); fail_if (part == NULL || error != NULL); - stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, "rawudp", + stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, NULL, 0, NULL, &error); fail_if (stream == NULL || error != NULL); @@ -1261,7 +1262,7 @@ GST_START_TEST (test_rtpconference_dispose) g_object_unref (stream); - stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, "rawudp", + stream = fs_session_new_stream (session, part, FS_DIRECTION_BOTH, NULL, 0, NULL, &error); fail_if (stream == NULL || error != NULL); diff --git a/tests/check/rtp/generic.c b/tests/check/rtp/generic.c index fce6eaa6..46525e3b 100644 --- a/tests/check/rtp/generic.c +++ b/tests/check/rtp/generic.c @@ -128,12 +128,17 @@ simple_conference_add_stream ( fail_if (st->participant == NULL, "Could not make participant, but no GError!"); st->stream = fs_session_new_stream (dat->session, st->participant, - FS_DIRECTION_BOTH, transmitter, st_param_count, st_params, &error); + FS_DIRECTION_BOTH, NULL, 0, NULL, &error); if (error) fail ("Error while creating new stream (%d): %s", error->code, error->message); fail_if (st->stream == NULL, "Could not make stream, but no GError!"); + fail_unless (fs_stream_set_transmitter (st->stream, transmitter, st_params, + st_param_count, &error)); + fail_unless (error == NULL); + + g_object_set_data (G_OBJECT (st->stream), "SimpleTestStream", st); dat->streams = g_list_append (dat->streams, st); diff --git a/tests/check/rtp/recvcodecs.c b/tests/check/rtp/recvcodecs.c index afd9abb4..c5b33e0f 100644 --- a/tests/check/rtp/recvcodecs.c +++ b/tests/check/rtp/recvcodecs.c @@ -223,12 +223,15 @@ GST_START_TEST (test_rtprecv_inband_config_data) "Could not make participant, but no GError!"); stream = fs_session_new_stream (session, participant, - FS_DIRECTION_RECV, "rawudp", 0, NULL, &error); + FS_DIRECTION_RECV, NULL, 0, NULL, &error); if (error) ts_fail ("Error while creating new stream (%d): %s", error->code, error->message); ts_fail_if (stream == NULL, "Could not make stream, but no GError!"); + fail_unless (fs_stream_set_transmitter (stream, "rawudp", NULL, 0, &error)); + fail_unless (error == NULL); + g_signal_connect (stream, "src-pad-added", G_CALLBACK (src_pad_added_cb), fspipeline); diff --git a/tests/check/rtp/sendcodecs.c b/tests/check/rtp/sendcodecs.c index 1cdd824c..f8122709 100644 --- a/tests/check/rtp/sendcodecs.c +++ b/tests/check/rtp/sendcodecs.c @@ -293,12 +293,15 @@ one_way (GstElement *recv_pipeline, gint port) "Could not make participant, but no GError!"); stream = fs_session_new_stream (dat->session, participant, - FS_DIRECTION_SEND, "rawudp", 0, NULL, &error); + FS_DIRECTION_SEND, NULL, 0, NULL, &error); if (error) ts_fail ("Error while creating new stream (%d): %s", error->code, error->message); ts_fail_if (stream == NULL, "Could not make stream, but no GError!"); + fail_unless (fs_stream_set_transmitter (stream, "rawudp", NULL, 0, &error)); + fail_unless (error == NULL); + GST_DEBUG ("port is %d", port); candidates = g_list_prepend (NULL, |