[jitsi-dev] [libjitsi-commits] master: Adds byte counter in input and output stream classes. (3992c39)

Hey, Hristo

Repository : ssh://lists.jitsi.org/libjitsi

On branch : master
Link : https://github.com/jitsi/libjitsi/compare/622e8f9a3110ce14e703ac2cffca08b4608530a0...3992c39dffa3a99642e2c3d9d28dba3cbe57d590


commit 3992c39dffa3a99642e2c3d9d28dba3cbe57d590
Author: hristoterezov <hristo@jitsi.org>
Date: Thu Jul 24 19:21:06 2014 +0300

     Adds byte counter in input and output stream classes.


  .../jitsi/impl/neomedia/MediaStreamStatsImpl.java | 47 +++++++++++++++++++-
  .../impl/neomedia/RTPConnectorInputStream.java | 15 +++++++
  .../impl/neomedia/RTPConnectorOutputStream.java | 16 +++++++
  3 files changed, 76 insertions(+), 2 deletions(-)


@@ -544,6 +558,7 @@ public abstract class RTPConnectorInputStream
+ numberOfReceivedBytes += (long)pkt.getLength();

I think that adding the lengths here, after the transformations, will not accurately reflect the actual number of received bytes. Some packets might get split, resulting in more bytes than were actually received. More importantly, packets carrying silence might get dropped in the transformers and not make it in the sum at all.

I think that the length of "p" needs to be added, and it needs to be added regardless of the "accept" value.



On 24/07/14 19:24, hristo@jitsi.org wrote: