rtpmanager: consider UDP and IP headers in bandwidth calculation
authorAntonio Ospite <antonio.ospite@collabora.com>
Fri, 21 Jun 2019 15:46:36 +0000 (17:46 +0200)
committerAntonio Ospite <antonio.ospite@collabora.com>
Fri, 2 Aug 2019 15:22:51 +0000 (17:22 +0200)
commit9d800cad434a12f5c0cad1e356482f97881cfa68
tree77ed4e3367ea6d51d736b0f0c9cbf9ae4cce6643
parent4146dc905d2b7b222d1b47fa900242819c679e79
rtpmanager: consider UDP and IP headers in bandwidth calculation

According to RFC3550 lower-level headers should be considered for
bandwidth calculation.

See https://tools.ietf.org/html/rfc3550#section-6.2 paragraph 4:

  Bandwidth calculations for control and data traffic include
  lower-layer transport and network protocols (e.g., UDP and IP) since
  that is what the resource reservation system would need to know.

Fix the source data to accommodate that.

Assume UDPv4 over IP for now, this is a simplification but it's good
enough for now.

While at it define a constant and use that instead of a magic number.

NOTE: this change basically reverts the logic of commit 529f443a6
(rtpsource: use payload size to estimate bitrate, 2010-03-02)
gst/rtpmanager/rtpsession.c
gst/rtpmanager/rtpsource.c
gst/rtpmanager/rtpstats.h