public class FECTransformEngine extends java.lang.Object implements TransformEngine, PacketTransformer
PacketTransformer
and
TransformEngine
for RFC5109.Modifier and Type | Class and Description |
---|---|
static class |
FECTransformEngine.FecType |
Modifier and Type | Field and Description |
---|---|
protected FECTransformEngine.FecType |
fecType
The fec type this transform engine will instantiate
|
static int |
INITIAL_BUFFER_SIZE
Initial size for newly allocated byte arrays.
|
Constructor and Description |
---|
FECTransformEngine(FECTransformEngine.FecType fecType,
byte incomingPT,
byte outgoingPT,
MediaStream mediaStream)
Initializes a new FECTransformEngine instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this PacketTransformer i.e.
|
int |
getFecRate()
Get the rate at which ulpfec packets will be generated and added to the
stream by this PacketTransformer.
|
PacketTransformer |
getRTCPTransformer()
Gets the PacketTransformer for RTCP packets.
|
PacketTransformer |
getRTPTransformer()
Gets the PacketTransformer for RTP packets.
|
RawPacket[] |
reverseTransform(RawPacket[] pkts)
Reverse-transforms each packet in an array of packets.
|
void |
setFecRate(int fecRate)
Sets the rate at which ulpfec packets will be generated and added to the
stream by this PacketTransformer.
|
void |
setIncomingPT(byte incomingPT)
Sets the payload type for incoming ulpfec packets.
|
void |
setOutgoingPT(byte outgoingPT)
Sets the payload type for outgoing ulpfec packets.
|
RawPacket[] |
transform(RawPacket[] pkts)
Transforms each packet in an array of packets.
|
public static final int INITIAL_BUFFER_SIZE
protected FECTransformEngine.FecType fecType
public FECTransformEngine(FECTransformEngine.FecType fecType, byte incomingPT, byte outgoingPT, MediaStream mediaStream)
incomingPT
- the RTP payload type number for incoming ulpfec packet.outgoingPT
- the RTP payload type number for outgoing ulpfec packet.public RawPacket[] reverseTransform(RawPacket[] pkts)
reverseTransform
in interface PacketTransformer
pkts
- the transformed packets to be restored.public RawPacket[] transform(RawPacket[] pkts)
transform
in interface PacketTransformer
pkts
- the packets to be transformedpublic void close()
close
in interface PacketTransformer
public PacketTransformer getRTPTransformer()
getRTPTransformer
in interface TransformEngine
public PacketTransformer getRTCPTransformer()
getRTCPTransformer
in interface TransformEngine
public void setIncomingPT(byte incomingPT)
incomingPT
- the payload type to setpublic void setOutgoingPT(byte outgoingPT)
outgoingPT
- the payload type to setpublic void setFecRate(int fecRate)
fecRate
- the rate to set, should be in [0, 16]public int getFecRate()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.