From 66015aefe1e227aefeaef6575881937dd82b6d6e Mon Sep 17 00:00:00 2001
From: Eloi BAIL <eloi.bail@savoirfairelinux.com>
Date: Mon, 5 Oct 2015 11:38:51 -0400
Subject: [PATCH] media: remove useless trace

Warning only if bitrate is effectively changed.

Issue: #78984
Change-Id: I6203d88ad519d448e33aa016941ff92d262427c5
---
 src/media/video/video_rtp_session.cpp | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/media/video/video_rtp_session.cpp b/src/media/video/video_rtp_session.cpp
index 5fe08da33a..1f86801e2c 100644
--- a/src/media/video/video_rtp_session.cpp
+++ b/src/media/video/video_rtp_session.cpp
@@ -344,11 +344,6 @@ VideoRtpSession::adaptBitrate()
             if (videoBitrateInfo_.videoBitrateCurrent < videoBitrateInfo_.videoBitrateMin)
                 videoBitrateInfo_.videoBitrateCurrent = videoBitrateInfo_.videoBitrateMin;
 
-            RING_WARN("packetLostRate=%f >= %f -> decrease bitrate to %d",
-                    packetLostRate,
-                    videoBitrateInfo_.packetLostThreshold,
-                    videoBitrateInfo_.videoBitrateCurrent);
-
             //we force iterative bitrate adaptation
             videoBitrateInfo_.cptBitrateChecking = 0;
 
@@ -367,14 +362,6 @@ VideoRtpSession::adaptBitrate()
             if (videoBitrateInfo_.videoBitrateCurrent > videoBitrateInfo_.videoBitrateMax)
                 videoBitrateInfo_.videoBitrateCurrent = videoBitrateInfo_.videoBitrateMax;
 
-            RING_WARN("[%u/%u] packetLostRate=%f < %f -> try to increase bitrate to %d",
-                    videoBitrateInfo_.cptBitrateChecking,
-                    videoBitrateInfo_.maxBitrateChecking,
-                    packetLostRate,
-                    videoBitrateInfo_.packetLostThreshold,
-                    videoBitrateInfo_.videoBitrateCurrent);
-
-
             //asynchronous A/V media restart
             if (videoBitrateInfo_.videoBitrateCurrent != oldBitrate)
                 mediaRestartNeeded = true;
@@ -390,6 +377,13 @@ VideoRtpSession::adaptBitrate()
     if (mediaRestartNeeded) {
         storeVideoBitrateInfo();
         const auto& cid = callID_;
+
+        RING_WARN("[%u/%u] packetLostRate=%f -> change bitrate to %d",
+                videoBitrateInfo_.cptBitrateChecking,
+                videoBitrateInfo_.maxBitrateChecking,
+                packetLostRate,
+                videoBitrateInfo_.videoBitrateCurrent);
+
         runOnMainThread([cid]{
             if (auto call = Manager::instance().callFactory.getCall(cid))
                 call->restartMediaSender();
-- 
GitLab