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
a141b96f
Commit
a141b96f
authored
10 years ago
by
Boris Grozev
Browse files
Options
Downloads
Patches
Plain Diff
Increases the buffer sizes in the FECReceiver, and allows them to be configured with a property.
parent
55de1383
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/transform/fec/FECReceiver.java
+39
-5
39 additions, 5 deletions
src/org/jitsi/impl/neomedia/transform/fec/FECReceiver.java
with
39 additions
and
5 deletions
src/org/jitsi/impl/neomedia/transform/fec/FECReceiver.java
+
39
−
5
View file @
a141b96f
...
...
@@ -10,6 +10,8 @@
import
org.jitsi.impl.neomedia.*
;
import
org.jitsi.impl.neomedia.transform.*
;
import
org.jitsi.service.configuration.*
;
import
org.jitsi.service.libjitsi.*
;
import
org.jitsi.util.*
;
/**
...
...
@@ -79,27 +81,53 @@ else if (a > b)
/**
* The number of media packets to keep.
*/
private
static
final
int
MEDIA_BUFF_SIZE
=
1
6
;
private
static
int
MEDIA_BUFF_SIZE
=
6
4
;
/**
* The maximum number of ulpfec packets to keep.
*/
private
static
final
int
FEC_BUFF_SIZE
=
4
;
private
static
int
FEC_BUFF_SIZE
=
32
;
/**
* Output buffer maximum size.
* The name of the <tt>ConfigurationService</tt> property which specifies
* the value of {@link #MEDIA_BUFF_SIZE}.
*/
// private static int OUTPUT_BUFFER_MAX_SIZE = 4;
private
static
final
String
MEDIA_BUFF_SIZE_PNAME
=
FECReceiver
.
class
.
getName
()
+
".MEDIA_BUFF_SIZE"
;
/**
* The name of the <tt>ConfigurationService</tt> property which specifies
* the value of {@link #FEC_BUFF_SIZE}.
*/
private
static
final
String
FEC_BUFF_SIZE_PNAME
=
FECReceiver
.
class
.
getName
()
+
".FEC_BUFF_SIZE"
;
static
{
ConfigurationService
cfg
=
LibJitsi
.
getConfigurationService
();
if
(
cfg
!=
null
)
{
FEC_BUFF_SIZE
=
cfg
.
getInt
(
FEC_BUFF_SIZE_PNAME
,
FEC_BUFF_SIZE
);
MEDIA_BUFF_SIZE
=
cfg
.
getInt
(
MEDIA_BUFF_SIZE_PNAME
,
MEDIA_BUFF_SIZE
);
}
}
/**
* Buffer which keeps (copies of) received media packets.
*
* We keep them ordered by their RTP sequence numbers, so that
* we can easily select the oldest one to discard when the buffer is
* full (when the map has more than <tt>MEDIA_BUFF_SIZE</tt> entries.
* full (when the map has more than <tt>MEDIA_BUFF_SIZE</tt> entries
)
.
*
* We keep them in a <tt>Map</tt> so that we can easily search for a
* packet with a specific sequence number.
*
* Note: This might turn out to be inefficient, especially with increased
* buffer sizes. In the vast majority of cases (e.g. on every received
* packet) we do an insert at one end and a delete from the other -- this
* can be optimized. We very rarely (when we receive a packet out of order)
* need to insert at an arbitrary location.
*/
private
final
SortedMap
<
Integer
,
RawPacket
>
mediaPackets
=
new
TreeMap
<
Integer
,
RawPacket
>(
seqNumComparator
);
...
...
@@ -113,6 +141,12 @@ else if (a > b)
*
* We keep them in a <tt>Map</tt> so that we can easily search for a
* packet with a specific sequence number.
*
* Note: This might turn out to be inefficient, especially with increased
* buffer sizes. In the vast majority of cases (e.g. on every received
* packet) we do an insert at one end and a delete from the other -- this
* can be optimized. We very rarely (when we receive a packet out of order)
* need to insert at an arbitrary location.
*/
private
final
SortedMap
<
Integer
,
RawPacket
>
fecPackets
=
new
TreeMap
<
Integer
,
RawPacket
>(
seqNumComparator
);
...
...
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