Commit ab66e1d9 authored by jehan's avatar jehan
Browse files

rework avpf tests

parent 7d14c338
......@@ -1100,7 +1100,7 @@ if test "$polarssl_prefix" != "NONE" ; then
POLARSSL_CFLAGS="-I${polarssl_prefix}/include"
POLARSSL_LIBS="-L${polarssl_prefix}/lib"
fi
POLARSSL_LIBS="-lpolarssl"
POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"
fi
CPPFLAGS_save=$CPPFLAGS
......
......@@ -384,18 +384,19 @@ static void video_stream_first_iframe_lost_vp8_base(bool_t use_avpf) {
if (supported) {
int dummy=0;
params.enabled = use_avpf; /*if no avpf, in case of nowebcam, decoding error can me missed, so starting by loosless network*/
params.loss_rate = 50.; /*to have a decoding error, a few packets must be able to cross*/
params.enabled = TRUE;
params.loss_rate = 100.; /*to have a decoding error, a few packets must be able to cross*/
init_video_streams(marielle, margaux, use_avpf, FALSE, &params,VP8_PAYLOAD_TYPE);
/*get some error to get a PLI request*/
wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,2000);
params.enabled=!use_avpf;
/*disable packet losses*/
/*make sure first Iframe is lost*/
wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,1000);
params.enabled=TRUE;
params.loss_rate = 10.; /*to have a decoding error, a few packets must be able to cross*/
rtp_session_enable_network_simulation(marielle->vs->ms.sessions.rtp_session, &params);
rtp_session_enable_network_simulation(margaux->vs->ms.sessions.rtp_session, &params);
video_stream_send_vfu(marielle->vs);
video_stream_send_vfu(margaux->vs);
wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,2000);
if (use_avpf) {
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &marielle->stats.number_of_PLI,
......@@ -403,10 +404,12 @@ static void video_stream_first_iframe_lost_vp8_base(bool_t use_avpf) {
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &margaux->stats.number_of_PLI,
1, 1000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &marielle->stats.number_of_decoder_first_image_decoded,
1, 1000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
1, 5000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &margaux->stats.number_of_decoder_first_image_decoded,
1, 2000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
1, 5000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
} else {
video_stream_send_vfu(marielle->vs);
video_stream_send_vfu(margaux->vs);
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &marielle->stats.number_of_decoder_decoding_error,
1, 1000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats));
CU_ASSERT_TRUE(wait_for_until_with_parse_events(&marielle->vs->ms, &margaux->vs->ms, &margaux->stats.number_of_decoder_decoding_error,
......@@ -420,6 +423,7 @@ static void video_stream_first_iframe_lost_vp8_base(bool_t use_avpf) {
video_stream_tester_destroy(marielle);
video_stream_tester_destroy(margaux);
}
static void video_stream_first_iframe_lost_vp8() {
video_stream_first_iframe_lost_vp8_base(FALSE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment