{
TestData data;
GstClockID id, test_id;
- guint64 timeout;
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 200;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
setup_testharness (&data);
- timeout = 20 * G_USEC_PER_SEC;
g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL);
== id);
/* check for the buffer coming out that was pushed in */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, 0);
g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, 0);
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* release the wait */
- GST_DEBUG ("wait for id");
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
- GST_DEBUG ("got wait id %p", id);
gst_test_clock_advance_time (GST_TEST_CLOCK (data.clock), GST_MSECOND * 20);
test_id = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
- GST_DEBUG ("process id %p", test_id);
g_assert (id == test_id);
/* we should now receive a packet-lost-event for buffers 1 through 489 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
g_assert_cmpint (data.lost_event_count, ==, 1);
verify_lost_event (out_event, 1, 1 * GST_MSECOND * 20, GST_MSECOND * 20 * 490,
}
}
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT));
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
{
TestData data;
GstClockID id;
- guint64 timeout;
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 100;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
setup_testharness (&data);
- timeout = 20 * G_USEC_PER_SEC;
g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL);
gst_test_clock_set_time (GST_TEST_CLOCK (data.clock), now);
g_assert (gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock))
== id);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
/* push some buffers arriving in perfect time! */
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* check for the buffer coming out that was pushed in */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, buffer_time);
g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, buffer_time);
== id);
/* we should now receive a packet-lost-event for buffer 3 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
g_assert_cmpint (data.lost_event_count, ==, 1);
verify_lost_event (out_event, 3, 3 * GST_MSECOND * 20, GST_MSECOND * 20,
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* verify that buffer 4 made it through! */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT));
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
gst_rtp_buffer_unmap (&rtp);
/* and see that buffer 5 now arrives in a normal fashion */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert (!GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT));
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
{
TestData data;
GstClockID id;
- guint64 timeout;
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 10;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
setup_testharness (&data);
- timeout = 20 * G_USEC_PER_SEC;
g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL);
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
g_assert (gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock))
== id);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
/* push some buffers in! */
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* check for the buffer coming out that was pushed in */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, buffer_time);
g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, buffer_time);
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* we should now receive a packet-lost-event for buffer 3 and 4 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
g_assert_cmpint (data.lost_event_count, ==, 1);
verify_lost_event (out_event, 3, 3 * GST_MSECOND * 20, GST_MSECOND * 20 * 2,
TRUE);
/* verify that buffer 5 made it through! */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT));
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
{
TestData data;
GstClockID id;
- guint64 timeout;
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 10;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
setup_testharness (&data);
- timeout = 20 * G_USEC_PER_SEC;
g_object_set (data.jitter_buffer, "latency", jb_latency_ms, NULL);
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (data.clock), &id);
g_assert (gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock))
== id);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
/* push some buffers in! */
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* check for the buffer coming out that was pushed in */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert_cmpint (GST_BUFFER_DTS (out_buf), ==, 0);
g_assert_cmpint (GST_BUFFER_PTS (out_buf), ==, 0);
g_assert_cmpint (gst_pad_push (data.test_src_pad, in_buf), ==, GST_FLOW_OK);
/* we should now receive a packet-lost-event for buffer 3 and 4 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
verify_lost_event (out_event, 3, 0, 0, FALSE);
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
verify_lost_event (out_event, 4, 0, 0, FALSE);
g_assert_cmpint (data.lost_event_count, ==, 2);
/* verify that buffer 5 made it through! */
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
g_assert (GST_BUFFER_FLAG_IS_SET (out_buf, GST_BUFFER_FLAG_DISCONT));
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 200;
- GstClockTime timeout = 20 * G_USEC_PER_SEC;
setup_testharness (&data);
g_object_set (data.jitter_buffer, "do-retransmission", TRUE, NULL);
g_assert (gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock))
== id);
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND);
tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
g_assert (id == tid);
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND);
tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
g_assert (id == tid);
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND);
tid = gst_test_clock_process_next_clock_id (GST_TEST_CLOCK (data.clock));
g_assert (id == tid);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
== id);
/* we should now receive a packet-lost-event for buffer 2 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
verify_lost_event (out_event, 2, 40 * GST_MSECOND, 20 * GST_MSECOND, FALSE);
GstBuffer *in_buf, *out_buf;
GstEvent *out_event;
gint jb_latency_ms = 200;
- GstClockTime timeout = 20 * G_USEC_PER_SEC;
gint i;
GstRTPBuffer rtp = GST_RTP_BUFFER_INIT;
== id);
/* we should have 2 events now, one for 2 and another for 3 */
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 20, 20 * GST_MSECOND);
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 0, 20 * GST_MSECOND);
g_assert (id == tid);
/* we should have 2 events now, one for 2 and another for 3 */
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 60, 20 * GST_MSECOND);
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 3, 60 * GST_MSECOND, 40, 20 * GST_MSECOND);
g_assert (id == tid);
/* now we only get requests for 2 */
- out_event = g_async_queue_timeout_pop (data.src_event_queue, timeout);
+ out_event = g_async_queue_pop (data.src_event_queue);
g_assert (out_event != NULL);
verify_rtx_event (out_event, 2, 40 * GST_MSECOND, 100, 20 * GST_MSECOND);
for (i = 0; i < 2; i++) {
GST_DEBUG ("popping %d", i);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
g_assert_cmpint (gst_rtp_buffer_get_seq (&rtp), ==, i);
g_assert (id == tid);
/* we should now receive a packet-lost-event for buffer 2 */
- out_event = g_async_queue_timeout_pop (data.sink_event_queue, timeout);
+ out_event = g_async_queue_pop (data.sink_event_queue);
g_assert (out_event != NULL);
verify_lost_event (out_event, 2, 40 * GST_MSECOND, 20 * GST_MSECOND, FALSE);
/* verify that buffers made it through! */
for (i = 3; i < 15; i++) {
GST_DEBUG ("popping %d", i);
- out_buf = g_async_queue_timeout_pop (data.buf_queue, timeout);
+ out_buf = g_async_queue_pop (data.buf_queue);
g_assert (out_buf != NULL);
gst_rtp_buffer_map (out_buf, GST_MAP_READ, &rtp);
g_assert_cmpint (gst_rtp_buffer_get_seq (&rtp), ==, i);