public class CachingTransformer extends SinglePacketTransformerAdapter implements TransformEngine, RecurringRunnable
Constructor and Description |
---|
CachingTransformer(MediaStreamImpl stream)
Initializes a new
CachingTransformer instance. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this PacketTransformer i.e.
|
RawPacketCache |
getIncomingRawPacketCache()
Gets the incoming
RawPacketCache . |
RawPacketCache |
getOutgoingRawPacketCache()
Gets the outgoing
RawPacketCache . |
PacketTransformer |
getRTCPTransformer()
Gets the PacketTransformer for RTCP packets.
|
PacketTransformer |
getRTPTransformer()
Gets the PacketTransformer for RTP packets.
|
long |
getTimeUntilNextRun()
Returns the number of milliseconds until this instance wants a worker
thread to call
Runnable.run() . |
RawPacket |
reverseTransform(RawPacket pkt)
Reverse-transforms a specific packet.
|
void |
run() |
void |
setEnabled(boolean enabled)
Enables/disables the caching of packets.
|
RawPacket |
transform(RawPacket pkt)
Transforms a specific packet.
|
reverseTransform, transform
public CachingTransformer(MediaStreamImpl stream)
CachingTransformer
instance.stream
- the owning stream.public void close()
SinglePacketTransformer
does
nothing.close
in interface PacketTransformer
close
in class SinglePacketTransformer
public RawPacket transform(RawPacket pkt)
transform
in class SinglePacketTransformerAdapter
pkt
- the packet to be transformed.public RawPacket reverseTransform(RawPacket pkt)
SinglePacketTransformer
reverseTransform
in class SinglePacketTransformerAdapter
pkt
- the transformed packet to be restored.public PacketTransformer getRTPTransformer()
getRTPTransformer
in interface TransformEngine
public PacketTransformer getRTCPTransformer()
getRTCPTransformer
in interface TransformEngine
public long getTimeUntilNextRun()
Runnable.run()
. The method is called on the same
worker thread as Process will be called on.getTimeUntilNextRun
in interface RecurringRunnable
Runnable.run()
public void run()
run
in interface java.lang.Runnable
public void setEnabled(boolean enabled)
enabled
- true
if the caching of packets is to be enabled or
false
if the caching of packets is to be disabledpublic RawPacketCache getOutgoingRawPacketCache()
RawPacketCache
.RawPacketCache
.public RawPacketCache getIncomingRawPacketCache()
RawPacketCache
.RawPacketCache
.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.