static void video_stream_first_iframe_lost_vp8(void) { video_stream_tester_t* marielle=video_stream_tester_new(); video_stream_tester_t* margaux=video_stream_tester_new(); OrtpNetworkSimulatorParams params = { 0 }; bool_t supported = ms_filter_codec_supported("vp8"); if (supported) { int dummy=0; /* Make sure first Iframe is lost. */ params.enabled = TRUE; params.loss_rate = 100.; init_video_streams(marielle, margaux, FALSE, FALSE, ¶ms, VP8_PAYLOAD_TYPE); wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,1000); /* Use 10% packet lost to be sure to have decoding errors. */ params.enabled=TRUE; params.loss_rate = 10.; rtp_session_enable_network_simulation(marielle->vs->ms.sessions.rtp_session, ¶ms); rtp_session_enable_network_simulation(margaux->vs->ms.sessions.rtp_session, ¶ms); wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,2000); 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, 1, 1000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats)); /* Remove the lost to be sure the forced iframe is going through. */ params.enabled=TRUE; params.loss_rate = 0.; rtp_session_enable_network_simulation(marielle->vs->ms.sessions.rtp_session, ¶ms); rtp_session_enable_network_simulation(margaux->vs->ms.sessions.rtp_session, ¶ms); wait_for_until(&marielle->vs->ms, &margaux->vs->ms,&dummy,1,2000); 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_first_image_decoded, 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, 5000, event_queue_cb, &marielle->stats, event_queue_cb, &margaux->stats)); uninit_video_streams(marielle, margaux); } else { ms_error("VP8 codec is not supported!"); } video_stream_tester_destroy(marielle); video_stream_tester_destroy(margaux); }
static void vfu_request(SalOp *op){ #ifdef VIDEO_ENABLED LinphoneCall *call=(LinphoneCall*)sal_op_get_user_pointer (op); if (call==NULL){ ms_warning("VFU request but no call !"); return ; } if (call->videostream) video_stream_send_vfu(call->videostream); #endif }
void linphone_conference_send_vfu(LinphoneConference *conf) { /*刷新I帧*/ MSList *list = conf->members; for(;list!=NULL;list=list->next){ LinphoneCall *call = ((LinphoneConferenceMember*) list->data)->call; if(call->videostream) video_stream_send_vfu(call->videostream); } ms_message("Conference [%s]: video stream send vfu",conf->name); }