Package org.jitsi.impl.neomedia.rtp
Class ResumableStreamRewriter
- java.lang.Object
-
- org.jitsi.impl.neomedia.rtp.ResumableStreamRewriter
-
public class ResumableStreamRewriter extends Object
Rewrites sequence numbers for RTP streams by hiding any gaps caused by dropped packets. Rewriters are not thread-safe. If multiple threads access a rewriter concurrently, it must be synchronized externally.- Author:
- Maryam Daneshi, George Politis
-
-
Constructor Summary
Constructors Constructor Description ResumableStreamRewriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanprocessRTCP(boolean rewrite, byte[] buf, int off, int len)Restores the RTP timestamp of the RTCP SR packet in the buffer.booleanrewriteRTP(boolean accept, byte[] buf, int off, int len)Rewrites the sequence number of the RTP packet in the byte buffer, hiding any gaps caused by drops.
-
-
-
Method Detail
-
rewriteRTP
public boolean rewriteRTP(boolean accept, byte[] buf, int off, int len)Rewrites the sequence number of the RTP packet in the byte buffer, hiding any gaps caused by drops.- Parameters:
accept- true if the packet is accepted, false otherwisebuf- the byte buffer that contains the RTP packetoff- the offset in the byte buffer where the RTP packet startslen- the length of the RTP packet in the byte buffer- Returns:
- true if the packet was altered, false otherwise
-
processRTCP
public boolean processRTCP(boolean rewrite, byte[] buf, int off, int len)Restores the RTP timestamp of the RTCP SR packet in the buffer.- Parameters:
buf- the byte buffer that contains the RTCP packet.off- the offset in the byte buffer where the RTCP packet starts.len- the number of bytes in buffer which constitute the actual data.- Returns:
- true if the SR is modified, false otherwise.
-
-