RTP loss period statistics assume always 1 channel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

When using the stereo L16 codec the loss_period statistics are double the
expected value. It seems that the rtcp rx/tx loss_period and xr gap/burst
duration calculations are only correct when a stream consists of one channel and
not two or more. 

The RTCP session member variable pkt_size is at the source of the incorrect
results: samples_per_frame would need to be divided by the number of channels,
or else instead of passing samples_per_frame to pjmedia_rtcp_init, ptime could
be passed in instead.

in rtpc.c: 
in pjmedia_rtcp_init():
    sess->pkt_size = samples_per_frame;
in pjmedia_rtcp_xr_init():
    session->ptime = session->rtcp_session->pkt_size * 1000 / 
        session->rtcp_session->clock_rate;
in pjmedia_rtcp_rx_rtp2(): 
    period = count * sess->pkt_size * 1000 / sess->clock_rate;
and pjmedia_rtcp_rx_rtcp():
    period = (sess->stat.tx.loss - last_loss) * sess->pkt_size *
        1000 / sess->clock_rate;


Cheers, 
Yann




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux