Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
668b2d72
Commit
668b2d72
authored
12 years ago
by
Vincent Lucas
Browse files
Options
Downloads
Patches
Plain Diff
Adds log information when the computed RTT > 60 seconds.
parent
2be6545d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
+46
-3
46 additions, 3 deletions
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
with
46 additions
and
3 deletions
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
+
46
−
3
View file @
668b2d72
...
...
@@ -16,6 +16,7 @@
import
org.jitsi.impl.neomedia.device.*
;
import
org.jitsi.service.neomedia.*
;
import
org.jitsi.util.*
;
/**
* Class used to compute stats concerning a MediaStream.
...
...
@@ -25,6 +26,12 @@
public
class
MediaStreamStatsImpl
implements
MediaStreamStats
{
/**
* The <tt>Logger</tt> used by the <tt>MediaStreamImpl</tt> class and its
* instances for logging output.
*/
private
static
final
Logger
logger
=
Logger
.
getLogger
(
MediaStreamStatsImpl
.
class
);
/**
* Enumeation of the direction (DOWNLOAD or UPLOAD) used for the stats.
...
...
@@ -538,13 +545,13 @@ private static double computePercentLoss(long nbLostAndRecv, long nbLost)
}
/**
* Computes the bandwidth usage in Kilo bits per second
e
s.
* Computes the bandwidth usage in Kilo bits per seconds.
*
* @param nbByteRecv The number of Byte received.
* @param callNbTimeMsSpent The time spent since the mediaStreamImpl is
* connected to the endpoint.
*
* @return the bandwidth rate computed in Kilo bits per second
e
s.
* @return the bandwidth rate computed in Kilo bits per seconds.
*/
private
static
double
computeRateKiloBitPerSec
(
long
nbByteRecv
,
...
...
@@ -705,7 +712,43 @@ private long computeRTTInMs(RTCPFeedback feedback)
long
rttS
=
currentTimeS
-
DLSRs
-
LSRs
;
long
rttMs
=
currentTimeMs
-
DLSRms
-
LSRms
;
return
(
rttS
*
1000
)
+
rttMs
;
long
computedRTTms
=
(
rttS
*
1000
)
+
rttMs
;
// If the RTT is greater than a minute there might be a bug. Thus we
// log the info to see the source of this error.
if
(
computedRTTms
>
60000
&&
logger
.
isInfoEnabled
())
{
logger
.
info
(
"RTT computation seems to be wrong ("
+
computedRTTms
+
"> 60 seconds):"
+
"\n\tcurrentTime: "
+
currentTime
+
" ("
+
Long
.
toHexString
(
currentTime
)
+
")"
+
"\n\tDLSR: "
+
DLSR
+
" ("
+
Long
.
toHexString
(
DLSR
)
+
")"
+
"\n\tLSR: "
+
LSR
+
" ("
+
Long
.
toHexString
(
LSR
)
+
")"
+
"\n\n\tcurrentTimeS: "
+
currentTimeS
+
" ("
+
Long
.
toHexString
(
currentTimeS
)
+
")"
+
"\n\tDLSRs: "
+
DLSRs
+
" ("
+
Long
.
toHexString
(
DLSRs
)
+
")"
+
"\n\tLSRs: "
+
LSRs
+
" ("
+
Long
.
toHexString
(
LSRs
)
+
")"
+
"\n\trttS: "
+
rttS
+
" ("
+
Long
.
toHexString
(
rttS
)
+
")"
+
"\n\n\tcurrentTimeMs: "
+
currentTimeMs
+
" ("
+
Long
.
toHexString
(
currentTimeMs
)
+
")"
+
"\n\tDLSRms: "
+
DLSRms
+
" ("
+
Long
.
toHexString
(
DLSRms
)
+
")"
+
"\n\tLSRms: "
+
LSRms
+
" ("
+
Long
.
toHexString
(
LSRms
)
+
")"
+
"\n\trttMs: "
+
rttMs
+
" ("
+
Long
.
toHexString
(
rttMs
)
+
")"
);
}
return
computedRTTms
;
}
// Else the RTT can not be computed yet.
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment