static void
check_play (const gchar * encode_key, const gchar * decode_key,
guint buffer_count, guint expected_recv_count,
- guint expected_recv_drop_count)
+ guint expected_recv_drop_count, guint port)
{
GstElement *source_pipeline, *sink_pipeline;
GstBus *source_bus;
guint recv_count = 0;
guint drop_count = 0;
GstElement *srtp_dec;
- guint port = 5004;
gchar *source_pipeline_desc = g_strdup_printf ("audiotestsrc num-buffers=%d \
! alawenc ! rtppcmapay ! application/x-rtp, payload=(int)8, ssrc=(uint)1356955624 \
fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS);
gst_message_unref (msg);
- // Wait 1s that all the buffers reached the sink pipeline entirely
- g_usleep (G_USEC_PER_SEC * 1);
+ // Wait 3s that all the buffers reached the sink pipeline entirely
+ g_usleep (G_USEC_PER_SEC * 3);
srtp_dec = gst_bin_get_by_name (GST_BIN (sink_pipeline), "dec");
g_object_get (srtp_dec, "stats", &stats, NULL);
gst_structure_get_uint (stats, "recv-count", &recv_count);
- fail_unless (recv_count <= expected_recv_count);
+ fail_unless (recv_count == expected_recv_count);
gst_structure_get_uint (stats, "recv-drop-count", &drop_count);
- fail_unless (drop_count <= expected_recv_drop_count);
+ fail_unless (drop_count == expected_recv_drop_count);
gst_object_unref (srtp_dec);
gst_structure_free (stats);
gst_object_unref (source_bus);
{
check_play ("012345678901234567890123456789012345678901234567890123456789",
"012345678901234567890123456789012345678901234567890123456789", 50, 50,
- 0);
+ 0, 5064);
}
GST_END_TEST;
{
check_play ("012345678901234567890123456789012345678901234567890123456789",
"000000000000000000000000000000000000000000000000000000000000", 50, 50,
- 50);
+ 50, 5074);
}
GST_END_TEST;