static void parse_rtcp(mblk_t *m){ do{ if (rtcp_is_RR(m)){ ms_message("Receiving RTCP RR"); }else if (rtcp_is_SR(m)){ ms_message("Receiving RTCP SR"); }else if (rtcp_is_SDES(m)){ ms_message("Receiving RTCP SDES"); rtcp_sdes_parse(m,display_items,NULL); }else { ms_message("Receiving unhandled RTCP message"); } }while(rtcp_next_packet(m)); }
static void parse_rtcp(mblk_t *m) { const report_block_t *rb; do { if (rtcp_is_RR(m)) { ms_message("Receiving RTCP RR"); } else if (rtcp_is_SR(m)) { ms_message("Receiving RTCP SR"); rb=rtcp_SR_get_report_block(m,0); if (rb) { ms_message("interarrival jitter=%u", report_block_get_interarrival_jitter(rb)); } } else if (rtcp_is_SDES(m)) { ms_message("Receiving RTCP SDES"); rtcp_sdes_parse(m,display_items,NULL); } else { ms_message("Receiving unhandled RTCP message"); } } while(rtcp_next_packet(m)); }
static void event_queue_cb(MediaStream *ms, void *user_pointer) { video_stream_tester_stats_t *st = (video_stream_tester_stats_t *)user_pointer; OrtpEvent *ev = NULL; if (st->q != NULL) { while ((ev = ortp_ev_queue_get(st->q)) != NULL) { OrtpEventType evt = ortp_event_get_type(ev); OrtpEventData *d = ortp_event_get_data(ev); if (evt == ORTP_EVENT_RTCP_PACKET_EMITTED) { do { if (rtcp_is_RR(d->packet)) { st->number_of_RR++; } else if (rtcp_is_SR(d->packet)) { st->number_of_SR++; } else if (rtcp_is_SDES(d->packet)) { st->number_of_SDES++; } else if (rtcp_is_PSFB(d->packet)) { switch (rtcp_PSFB_get_type(d->packet)) { case RTCP_PSFB_PLI: st->number_of_PLI++; break; case RTCP_PSFB_SLI: st->number_of_SLI++; break; case RTCP_PSFB_RPSI: st->number_of_RPSI++; break; default: break; } } } while (rtcp_next_packet(d->packet)); } ortp_event_destroy(ev); } } }