[farsight2/master] Add test for no-rtcp mode
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:23:49 PST 2008
---
tests/check/rtp/conference.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/tests/check/rtp/conference.c b/tests/check/rtp/conference.c
index dd9c662..24ee6fe 100644
--- a/tests/check/rtp/conference.c
+++ b/tests/check/rtp/conference.c
@@ -43,6 +43,7 @@ int count = 0;
// Options
gboolean select_last_codec = FALSE;
gboolean reset_to_last_codec = FALSE;
+gboolean no_rtcp = FALSE;
#define WAITING_ON_LAST_CODEC (1<<0)
#define SHOULD_BE_LAST_CODEC (1<<1)
@@ -138,6 +139,9 @@ _new_local_candidate (FsStream *stream, FsCandidate *candidate)
st->dat);
GList *candidates = NULL;
+ if (candidate->component_id == FS_COMPONENT_RTCP && no_rtcp)
+ return;
+
g_debug ("%d:%d: Setting remote candidate for component %d",
other_st->dat->id,
other_st->target->id,
@@ -720,6 +724,8 @@ nway_test (int in_count, extra_init extrainit)
dats[i] = setup_simple_conference (i, "fsrtpconference", tmp);
g_free (tmp);
+ g_object_set (G_OBJECT (dats[i]->session), "no-rtcp-timeout", -1, NULL);
+
rtpconference_connect_signals (dats[i]);
g_idle_add (_start_pipeline, dats[i]);
@@ -824,6 +830,7 @@ GST_START_TEST (test_rtpconference_select_send_codec)
{
select_last_codec = TRUE;
nway_test (2, NULL);
+ select_last_codec = FALSE;
}
GST_END_TEST;
@@ -832,6 +839,7 @@ GST_START_TEST (test_rtpconference_select_send_codec_while_running)
{
reset_to_last_codec = TRUE;
nway_test (2, NULL);
+ reset_to_last_codec = FALSE;
}
GST_END_TEST;
@@ -953,6 +961,19 @@ GST_START_TEST (test_rtpconference_change_to_send_only)
}
GST_END_TEST;
+
+GST_START_TEST (test_rtpconference_no_rtcp)
+{
+ no_rtcp = TRUE;
+
+ nway_test (2, NULL);
+
+ no_rtcp = FALSE;
+}
+GST_END_TEST;
+
+
+
static Suite *
fsrtpconference_suite (void)
{
@@ -964,7 +985,6 @@ fsrtpconference_suite (void)
fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
g_log_set_always_fatal (fatal_mask);
-
tc_chain = tcase_create ("fsrtpconfence_base");
tcase_add_test (tc_chain, test_rtpconference_new);
suite_add_tcase (s, tc_chain);
@@ -1005,6 +1025,14 @@ fsrtpconference_suite (void)
tcase_add_test (tc_chain, test_rtpconference_change_to_send_only);
suite_add_tcase (s, tc_chain);
+ tc_chain = tcase_create ("fsrtpconfence_change_to_send_only");
+ tcase_add_test (tc_chain, test_rtpconference_change_to_send_only);
+ suite_add_tcase (s, tc_chain);
+
+ tc_chain = tcase_create ("fsrtpconfence_no_rtcp");
+ tcase_add_test (tc_chain, test_rtpconference_no_rtcp);
+ suite_add_tcase (s, tc_chain);
+
return s;
}
--
1.5.6.5
More information about the farsight-commits
mailing list