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
2a20989f
Commit
2a20989f
authored
10 years ago
by
Boris Grozev
Browse files
Options
Downloads
Patches
Plain Diff
Minor cleanup.
parent
2b95d643
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
+15
-18
15 additions, 18 deletions
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
src/org/jitsi/impl/neomedia/VideoMediaStreamImpl.java
+0
-9
0 additions, 9 deletions
src/org/jitsi/impl/neomedia/VideoMediaStreamImpl.java
with
15 additions
and
27 deletions
src/org/jitsi/impl/neomedia/MediaStreamStatsImpl.java
+
15
−
18
View file @
2a20989f
...
...
@@ -98,22 +98,21 @@ private static double computePercentLoss(long nbLostAndRecv, long nbLost)
}
/**
* Computes the b
andwidth usage in Kilo bits per second
s.
* Computes the b
itrate in kbp
s.
*
* @param nbByte
Recv
The number of
B
yte received.
* @param
callNbTimeMsSpent The time spent since the mediaStreamImpl is
*
connected to th
e en
dpoint
.
* @param nbByte
s
The number of
b
yte
s
received.
* @param
intervalMs The number of milliseconds during which
*
<tt>nbBytes</tt> bytes wer
e
s
en
t or received
.
*
* @return the b
andwidth
rate computed in
Kilo
bits per second
s.
* @return the b
itrate
rate computed in
kbps (1000
bits per second
)
*/
private
static
double
computeRateKiloBitPerSec
(
long
nbByte
Recv
,
long
callNbTimeMsSpent
)
long
nbByte
s
,
long
intervalMs
)
{
return
(
nbByteRecv
==
0
)
?
0
:
((
nbByteRecv
*
8.0
/
1000.0
)
/
(
callNbTimeMsSpent
/
1000.0
));
return
intervalMs
==
0
?
0
:
(
nbBytes
*
8.0
)
/
intervalMs
;
}
/**
...
...
@@ -1198,14 +1197,12 @@ private void updateStreamDirectionStats(
// Computes the bandwidth used by this stream.
double
newRateKiloBitPerSec
=
MediaStreamStatsImpl
.
computeRateKiloBitPerSec
(
newNbByte
-
nbByte
[
streamDirectionIndex
],
currentTimeMs
-
updateTimeMs
);
=
computeRateKiloBitPerSec
(
newNbByte
-
nbByte
[
streamDirectionIndex
],
currentTimeMs
-
updateTimeMs
);
rateKiloBitPerSec
[
streamDirectionIndex
]
=
MediaStreamStatsImpl
.
computeEWMA
(
nbSteps
,
rateKiloBitPerSec
[
streamDirectionIndex
],
newRateKiloBitPerSec
);
=
computeEWMA
(
nbSteps
,
rateKiloBitPerSec
[
streamDirectionIndex
],
newRateKiloBitPerSec
);
// Saves the last update values.
nbPackets
[
streamDirectionIndex
]
=
newNbRecv
;
...
...
This diff is collapsed.
Click to expand it.
src/org/jitsi/impl/neomedia/VideoMediaStreamImpl.java
+
0
−
9
View file @
2a20989f
...
...
@@ -169,15 +169,6 @@ else if(mRange.find()) /* try with range */
res
[
1
]
=
new
java
.
awt
.
Dimension
(
val
[
1
],
val
[
3
]);
}
token
=
null
;
mSingle
=
null
;
mRange
=
null
;
m
=
null
;
pRecvRange
=
null
;
pSendSingle
=
null
;
pRecvSingle
=
null
;
pSendRange
=
null
;
return
res
;
}
...
...
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