Package org.ow2.clif.probe.rtp
Class RTPPacket
- java.lang.Object
-
- org.ow2.clif.probe.rtp.RTPPacket
-
public class RTPPacket extends java.lang.ObjectThis class is used to create a RTP packet.- Author:
- Remi Druilhe
-
-
Constructor Summary
Constructors Constructor Description RTPPacket(java.lang.Integer payloadType, java.lang.Integer sequenceNumber, java.lang.Long timestamp, java.lang.Long ssrc, byte[] payload)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]createHeader()Convert every information of the header in bytes.byte[]createRtpPacket()Create a RTP packet in bytes.java.lang.IntegergetCsrcCount()java.lang.IntegergetExtension()java.lang.IntegergetMarker()java.lang.IntegergetPadding()byte[]getPayload()java.lang.IntegergetPayloadType()static java.lang.IntegergetPayloadType(byte[] data)Get the payload type from the RTP packetstatic java.lang.DoublegetSampling(java.lang.Integer payloadType)Returns the frequency associated to this payload typejava.lang.IntegergetSequenceNumber()static java.lang.IntegergetSequenceNumber(byte[] data)Get the sequence number from the RTP packetjava.lang.LonggetSsrc()static java.lang.LonggetSsrc(byte[] data)Get the ssrc from the RTP packetjava.lang.LonggetTimestamp()static java.lang.LonggetTimestamp(byte[] data)Get the timestamp from the RTP packetjava.lang.IntegergetVersion()voidsetCsrcCount(java.lang.Integer csrcCount)voidsetExtension(java.lang.Integer extension)voidsetMarker(java.lang.Integer marker)voidsetPadding(java.lang.Integer padding)voidsetPayload(byte[] tempPayload)voidsetPayloadType(java.lang.Integer payloadType)voidsetSequenceNumber(java.lang.Integer sequenceNumber)voidsetSSRC(java.lang.Long ssrc)voidsetTimestamp(java.lang.Long timestamp)voidsetVersion(java.lang.Integer version)
-
-
-
Constructor Detail
-
RTPPacket
public RTPPacket(java.lang.Integer payloadType, java.lang.Integer sequenceNumber, java.lang.Long timestamp, java.lang.Long ssrc, byte[] payload)- Parameters:
payloadType- the payload type of the RTP packet.sequenceNumber- the sequence number of the RTP packet.timestamp- the timestamp of the RTP packet.ssrc- the SSRC of the RTP packet.payload- the payload of the RTP packet.
-
-
Method Detail
-
createRtpPacket
public byte[] createRtpPacket()
Create a RTP packet in bytes.- Returns:
- the packet formatted in bytes.
-
createHeader
public byte[] createHeader()
Convert every information of the header in bytes.- Returns:
- the header formatted in bytes.
-
getPayloadType
public static java.lang.Integer getPayloadType(byte[] data)
Get the payload type from the RTP packet- Parameters:
data- : the packet- Returns:
- the PayloadType of the packet
-
getSequenceNumber
public static java.lang.Integer getSequenceNumber(byte[] data)
Get the sequence number from the RTP packet- Parameters:
data- : the packet- Returns:
- the Sequence Number of the packet
-
getTimestamp
public static java.lang.Long getTimestamp(byte[] data)
Get the timestamp from the RTP packet- Parameters:
data- : the packet- Returns:
- the Timestamp of the packet
-
getSsrc
public static java.lang.Long getSsrc(byte[] data)
Get the ssrc from the RTP packet- Parameters:
data- : the packet- Returns:
- the SSRC of the packet
-
getSampling
public static java.lang.Double getSampling(java.lang.Integer payloadType)
Returns the frequency associated to this payload type- Parameters:
payloadType- : the payload type- Returns:
- the frequency
-
getVersion
public java.lang.Integer getVersion()
-
getPadding
public java.lang.Integer getPadding()
-
getExtension
public java.lang.Integer getExtension()
-
getCsrcCount
public java.lang.Integer getCsrcCount()
-
getMarker
public java.lang.Integer getMarker()
-
getPayloadType
public java.lang.Integer getPayloadType()
-
getSequenceNumber
public java.lang.Integer getSequenceNumber()
-
getTimestamp
public java.lang.Long getTimestamp()
-
getSsrc
public java.lang.Long getSsrc()
-
getPayload
public byte[] getPayload()
-
setVersion
public void setVersion(java.lang.Integer version)
-
setPadding
public void setPadding(java.lang.Integer padding)
-
setExtension
public void setExtension(java.lang.Integer extension)
-
setCsrcCount
public void setCsrcCount(java.lang.Integer csrcCount)
-
setMarker
public void setMarker(java.lang.Integer marker)
-
setPayloadType
public void setPayloadType(java.lang.Integer payloadType)
-
setSequenceNumber
public void setSequenceNumber(java.lang.Integer sequenceNumber)
-
setTimestamp
public void setTimestamp(java.lang.Long timestamp)
-
setSSRC
public void setSSRC(java.lang.Long ssrc)
-
setPayload
public void setPayload(byte[] tempPayload)
-
-