rtpsource: use payload size to estimate bitrate

Use the length of the payload for estimating the receiver bitrate so that it
matches the calculations done on the sender side. Together with the number of
packets one can scale the bitrate with the header overhead of the lower
transport.
This commit is contained in:
Wim Taymans 2010-03-02 13:21:24 +01:00
parent c971d1a9ab
commit 529f443a61

View file

@ -1015,7 +1015,7 @@ rtp_source_process_rtp (RTPSource * src, GstBuffer * buffer,
src->stats.bytes_received += arrival->bytes;
src->stats.packets_received++;
/* for the bitrate estimation */
src->bytes_received += arrival->bytes;
src->bytes_received += arrival->payload_len;
/* the source that sent the packet must be a sender */
src->is_sender = TRUE;
src->validated = TRUE;