Class CachingTransformer
- java.lang.Object
-
- org.jitsi.impl.neomedia.transform.SinglePacketTransformer
-
- org.jitsi.impl.neomedia.transform.SinglePacketTransformerAdapter
-
- org.jitsi.impl.neomedia.transform.CachingTransformer
-
- All Implemented Interfaces:
Runnable,PacketTransformer,TransformEngine,org.jitsi.utils.concurrent.RecurringRunnable
public class CachingTransformer extends SinglePacketTransformerAdapter implements TransformEngine, org.jitsi.utils.concurrent.RecurringRunnable
Implements a cache of outgoing RTP packets.- Author:
- Boris Grozev, George Politis
-
-
Constructor Summary
Constructors Constructor Description CachingTransformer(MediaStreamImpl stream)Initializes a newCachingTransformerinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this PacketTransformer i.e.RawPacketCachegetIncomingRawPacketCache()Gets the incomingRawPacketCache.RawPacketCachegetOutgoingRawPacketCache()Gets the outgoingRawPacketCache.PacketTransformergetRTCPTransformer()Gets the PacketTransformer for RTCP packets.PacketTransformergetRTPTransformer()Gets the PacketTransformer for RTP packets.longgetTimeUntilNextRun()RawPacketreverseTransform(RawPacket pkt)Reverse-transforms a specific packet.voidrun()voidsetEnabled(boolean enabled)Enables/disables the caching of packets.RawPackettransform(RawPacket pkt)Transforms a specific packet.-
Methods inherited from class org.jitsi.impl.neomedia.transform.SinglePacketTransformer
reverseTransform, transform
-
-
-
-
Constructor Detail
-
CachingTransformer
public CachingTransformer(MediaStreamImpl stream)
Initializes a newCachingTransformerinstance.- Parameters:
stream- the owning stream.
-
-
Method Detail
-
close
public void close()
Closes this PacketTransformer i.e. releases the resources allocated by it and prepares it for garbage collection. The (default) implementation ofSinglePacketTransformerdoes nothing.- Specified by:
closein interfacePacketTransformer- Overrides:
closein classSinglePacketTransformer
-
transform
public RawPacket transform(RawPacket pkt)
Transforms a specific packet. Transforms an outgoing packet.- Overrides:
transformin classSinglePacketTransformerAdapter- Parameters:
pkt- the packet to be transformed.- Returns:
- the transformed packet.
-
reverseTransform
public RawPacket reverseTransform(RawPacket pkt)
Description copied from class:SinglePacketTransformerReverse-transforms a specific packet.- Overrides:
reverseTransformin classSinglePacketTransformerAdapter- Parameters:
pkt- the transformed packet to be restored.- Returns:
- the restored packet.
-
getRTPTransformer
public PacketTransformer getRTPTransformer()
Gets the PacketTransformer for RTP packets.- Specified by:
getRTPTransformerin interfaceTransformEngine- Returns:
- the PacketTransformer for RTP packets
-
getRTCPTransformer
public PacketTransformer getRTCPTransformer()
Gets the PacketTransformer for RTCP packets.- Specified by:
getRTCPTransformerin interfaceTransformEngine- Returns:
- the PacketTransformer for RTCP packets
-
getTimeUntilNextRun
public long getTimeUntilNextRun()
- Specified by:
getTimeUntilNextRunin interfaceorg.jitsi.utils.concurrent.RecurringRunnable
-
setEnabled
public void setEnabled(boolean enabled)
Enables/disables the caching of packets.- Parameters:
enabled-trueif the caching of packets is to be enabled orfalseif the caching of packets is to be disabled
-
getOutgoingRawPacketCache
public RawPacketCache getOutgoingRawPacketCache()
Gets the outgoingRawPacketCache.- Returns:
- the outgoing
RawPacketCache.
-
getIncomingRawPacketCache
public RawPacketCache getIncomingRawPacketCache()
Gets the incomingRawPacketCache.- Returns:
- the incoming
RawPacketCache.
-
-