rtpstats: make bandwidths more configurable
[platform/upstream/gst-plugins-good.git] / gst / rtpmanager / rtpstats.h
index 7e742e6..d650a7b 100644 (file)
@@ -127,8 +127,8 @@ typedef struct {
   RTPSenderReport   sr[2];
 } RTPSourceStats;
 
-#define RTP_STATS_BANDWIDTH           64000.0
-#define RTP_STATS_RTCP_BANDWIDTH      3000.0
+#define RTP_STATS_BANDWIDTH           64000
+#define RTP_STATS_RTCP_BANDWIDTH      3200
 /*
  * Minimum average time between RTCP packets from this site (in
  * seconds).  This time prevents the reports from `clumping' when
@@ -172,10 +172,10 @@ typedef struct {
  * Stats kept for a session and used to produce RTCP packet timeouts.
  */
 typedef struct {
-  gdouble       bandwidth;
+  guint         bandwidth;
+  guint         rtcp_bandwidth;
   gdouble       sender_fraction;
   gdouble       receiver_fraction;
-  gdouble       rtcp_bandwidth;
   gdouble       min_interval;
   GstClockTime  bye_timeout;
   guint         sender_sources;
@@ -184,7 +184,10 @@ typedef struct {
   guint         bye_members;
 } RTPSessionStats;
 
-void           rtp_stats_init_defaults               (RTPSessionStats *stats);
+void           rtp_stats_init_defaults              (RTPSessionStats *stats);
+
+void           rtp_stats_set_bandwidths             (RTPSessionStats *stats, guint rtp_bw, guint rtcp_bw,
+                                                     guint rs, guint rr);
 
 GstClockTime   rtp_stats_calculate_rtcp_interval    (RTPSessionStats *stats, gboolean sender, gboolean first);
 GstClockTime   rtp_stats_add_rtcp_jitter            (RTPSessionStats *stats, GstClockTime interval);