• Articles
  • Api Documentation
Search Results for

    Show / Hide Table of Contents
    • SipLib.Body
      • BodyParser
      • ContentTypes
      • MessageContentsContainer
      • MultipartBinaryBodyBuilder
      • SipBodyBuilder
    • SipLib.Channels
      • AcceptCertificateDelegate
      • AcceptConnectionDelegate
      • DscpSettings
      • LogInvalidSipMessageDelegate
      • LogSipRequestDelegate
      • LogSipResponseDelegate
      • Qos
      • SIPChannel
      • SIPConnection
      • SIPConnectionDisconnectedDelegate
      • SIPConnectionsEnum
      • SIPMessageReceivedDelegate
      • SIPTCPChannel
      • SIPTLSChannel
      • SIPUDPChannel
      • SipConnectionFailedDelegate
      • SipRequestReceivedDelegate
      • SipResponseReceivedDelegate
      • SipTransactionCompleteDelegate
      • WindowsQos
    • SipLib.Collections
      • ThreadSafeGenericList<T>
    • SipLib.Core
      • ByteBufferInfo
      • CallProperties
      • Crypto
      • HTTPDigest
      • IPSocket
      • SIPAuthenticationHeader
      • SIPAuthorisationDigest
      • SIPAuthorisationHeadersEnum
      • SIPCallInfoHeader
      • SIPConstants
      • SIPContactHeader
      • SIPEndPoint
      • SIPEscape
      • SIPFrag
      • SIPFromHeader
      • SIPGeolocationHeader
      • SIPHeader
      • SIPHeaders
      • SIPMessage
      • SIPMessageTypesEnum
      • SIPMethods
      • SIPMethodsEnum
      • SIPPaiHeader
      • SIPParameters
      • SIPPpiHeader
      • SIPProtocolsEnum
      • SIPProtocolsType
      • SIPReplacesParameter
      • SIPRequest
      • SIPResponse
      • SIPResponseStatusCodes
      • SIPResponseStatusCodesEnum
      • SIPRoute
      • SIPRouteSet
      • SIPSchemesEnum
      • SIPSchemesType
      • SIPToHeader
      • SIPURI
      • SIPUserField
      • SIPValidationException
      • SIPValidationFieldsEnum
      • SIPViaHeader
      • SIPViaSet
      • SipUtils
      • TypeExtensions
    • SipLib.Dtls
      • AlertLevelsEnum
      • AlertTypesEnum
      • DtlsClientUdpTransport
      • DtlsServerUdpTransport
      • DtlsSrtpClient
      • DtlsSrtpServer
      • DtlsSrtpTransport
      • DtlsUtils
      • IDtlsSrtpPeer
      • IPacketTransformer
      • ITransformEngine
      • NetConvert
      • RTCDtlsFingerprint
      • RawPacket
      • SrtcpCryptoContext
      • SrtpPolicy
      • SrtpTransformEngine
      • SrtpTransformer
    • SipLib.Logging
      • SipLogger
    • SipLib.Media
      • ALawDecoder
      • ALawEncoder
      • AudioDestination
      • AudioDestinationDelegate
      • AudioSampleData
      • AudioSamplesReadyDelegate
      • AudioSource
      • Band
      • DtmfDigitReceivedDelegate
      • FileAudioSource
      • G722Codec
      • G722CodecState
      • G722Decoder
      • G722Encoder
      • G722Flags
      • HighResolutionTimer
      • HighResolutionTimerDelegate
      • IAudioDecoder
      • IAudioEncoder
      • IAudioSampleSource
      • MediaPortManager
      • MediaPortSettings
      • MediaTypes
      • MsrpEncryptionEnum
      • MuLawDecoder
      • MuLawEncoder
      • PcmaDecoder
      • PcmaEncoder
      • PcmuDecoder
      • PcmuEncoder
      • PortRange
      • RtpEncryptionEnum
    • SipLib.Msrp
      • ByteRangeHeader
      • CpimMessage
      • MsrpCompletionStatus
      • MsrpConnection
      • MsrpConnectionStatusDelegate
      • MsrpMessage
      • MsrpMessageDeliveryFailedDelegate
      • MsrpMessageReceivedDelegate
      • MsrpMessageSentDelegate
      • MsrpMessageType
      • MsrpPathHeader
      • MsrpStatusHeader
      • MsrpStreamParser
      • MsrpTextMessageReceivedDelegate
      • MsrpUri
      • ReportReceivedDelegate
    • SipLib.Network
      • IpUtils
    • SipLib.RealTimeText
      • RttCharactersReceivedDelegate
      • RttParameters
      • RttReceiver
      • RttRtpSendDelegate
      • RttSender
    • SipLib.Rtp
      • ByePacket
      • DtlsHandshakeFailedDelegate
      • DtmfEventEnum
      • DtmfPacket
      • JitterStatistics
      • MeanOpinionScore
      • ReceiveStatisticsReadyDelegate
      • ReceiverReport
      • ReportBlock
      • RtcpCompoundPacket
      • RtcpHeader
      • RtcpPacketReceivedDelegate
      • RtcpPacketSentDelegate
      • RtcpPacketType
      • RtpChannel
      • RtpPacket
      • RtpPacketReceivedDelegate
      • RtpPacketSentDelegate
      • RtpReceiveStatistics
      • RtpUtils
      • SdesChunk
      • SdesItem
      • SdesItemType
      • SdesPacket
      • SenderInfo
      • SenderReport
    • SipLib.RtpCrypto
      • AesFunctions
      • CryptoAttribute
      • CryptoContext
      • CryptoSuites
      • InlineParams
      • MasterKeys
      • RocVals
      • RocValues
      • SRtpErrorsEnum
      • SRtpUtils
      • SessionKeys
      • SrtpDecryptor
      • SrtpEncryptor
      • SrtpLabelItem
      • SrtpTransformBase
    • SipLib.Sdp
      • ConnectionData
      • MediaDescription
      • MediaDirectionEnum
      • Origin
      • RtpMapAttribute
      • Sdp
      • SdpAnswerSettings
      • SdpAttribute
      • SdpUtils
      • SetupType
    • SipLib.Threading
      • QueuedActionWorkerTask
    • SipLib.Transactions
      • ClientInviteTransaction
      • ClientNonInviteTransaction
      • ServerInviteTransaction
      • ServerNonInviteTransaction
      • SipTimers
      • SipTransactionBase
      • SipTransport
      • TransactionRequestReceivedDelegate
      • TransactionResponseReceivedDelegate
      • TransactionStateEnum
      • TransactionTerminationReasonEnum
    • SipLib.Video
      • H264Depacketiser
      • H264Packetiser
      • H264Packetiser.H264Nal
      • H264RtpReceiver
      • H264RtpSender
      • RtpSendDelegate
      • RtpVP8Header
      • VP8RtpReceiver
      • VP8RtpSender
      • VideoRtpReceiver
      • VideoRtpSender

    Class RtpPacket

    Class for handling Real Time Protocol (RTP) network packets. See RFC 3550.

    Inheritance
    object
    RtpPacket
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SipLib.Rtp
    Assembly: SipLib.dll
    Syntax
    public class RtpPacket

    Constructors

    | Edit this page View Source

    RtpPacket()

    Constructs a RTP packet containing only a RTP packet header without a payload.

    Declaration
    public RtpPacket()
    | Edit this page View Source

    RtpPacket(byte[])

    Constructs a RTP packet from an array of bytes.

    Use this constructor to encapsulate the raw bytes received in a UDP packet. You can then access the RTP packet header fields using the properties of the new RtpPacket object. Use the GetPayloadBytes() method to get a byte array containing the media bytes.

    Declaration
    public RtpPacket(byte[] SrcBytes)
    Parameters
    Type Name Description
    byte[] SrcBytes

    Byte array to "attach" to. Must be at least MIN_PACKET_LENGTH bytes long.

    | Edit this page View Source

    RtpPacket(int)

    Creates an new RTP packet given the length of the payload in bytes. The RTP header will be 12 bytes.

    Declaration
    public RtpPacket(int PayloadLength)
    Parameters
    Type Name Description
    int PayloadLength

    Number of bytes in the payload.

    | Edit this page View Source

    RtpPacket(int, int)

    Creates a new RtpPacket given the payload length and the RTP packet header length.

    Declaration
    public RtpPacket(int PayloadLength, int headerLength)
    Parameters
    Type Name Description
    int PayloadLength

    Length of the packet payload in bytes. May be 0 is only sending an RTP packet header.

    int headerLength

    Length of the RTP packet header in bytes. Must be at least 12. The headerLength can be calculated as: 12 + 4 * (number of CSRCs).

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the headerLength is less than the minimum RTP packet header length of 12.

    Fields

    | Edit this page View Source

    CSRC_LENGTH

    Length of each CSRC in bytes

    Declaration
    public const int CSRC_LENGTH = 4
    Field Value
    Type Description
    int
    | Edit this page View Source

    MIN_PACKET_LENGTH

    Minimum RTP packet length. This assumes that CSRCs are included.

    Declaration
    public const int MIN_PACKET_LENGTH = 12
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    CSRCs

    Gets a list of CSRCs (contributing source identifiers) for this RTP packet.

    Declaration
    public List<uint>? CSRCs { get; }
    Property Value
    Type Description
    List<uint>
    | Edit this page View Source

    CsrcCount

    Gets or sets the CSRC Count.

    Declaration
    public int CsrcCount { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    HeaderLength

    Gets the length of the RTP packet header.

    Declaration
    public int HeaderLength { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Marker

    Gets or sets the M (marker) bit.

    Declaration
    public bool Marker { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    PacketBytes

    Gets the entire packet byte array

    Declaration
    public byte[]? PacketBytes { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    Padding

    Gets or sets the Padding bit.

    Declaration
    public bool Padding { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Payload

    Gets or sets the payload of the RTP packet. The getter returns a copy of the payload bytes.

    Declaration
    public byte[]? Payload { get; set; }
    Property Value
    Type Description
    byte[]
    Exceptions
    Type Condition
    ArgumentException

    Thrown by if the input packet is longer than the allocated payload length for this RTP packet.

    | Edit this page View Source

    PayloadLength

    Gets the number of bytes in the RTP packet payload.

    Declaration
    public int PayloadLength { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    PayloadType

    Gets or sets the Payload Type (PT) field in the RTP header. The Payload Type must be between 0 and 127.

    Declaration
    public int PayloadType { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    SSRC

    Gets or sets the synchronization source identifier (SSRC).

    Declaration
    public uint SSRC { get; set; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    SequenceNumber

    Gets or sets the Sequence Number field of the RTP packet header.

    Declaration
    public ushort SequenceNumber { get; set; }
    Property Value
    Type Description
    ushort
    | Edit this page View Source

    Timestamp

    Gets or sets the Timestamp field of the RTP packet header.

    Declaration
    public uint Timestamp { get; set; }
    Property Value
    Type Description
    uint
    | Edit this page View Source

    Version

    Gets the Version field.

    Declaration
    public int Version { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    GetCSRC(int)

    Gets a CSRC specified by its index.

    Declaration
    public uint GetCSRC(int Idx)
    Parameters
    Type Name Description
    int Idx

    Index of the CSRC to get.

    Returns
    Type Description
    uint

    Returns the specified CSRC. Returns 0 if the index is out range.

    | Edit this page View Source

    GetHeaderBytes()

    Gets only the bytes from the header portion of the RTP packet.

    Declaration
    public byte[] GetHeaderBytes()
    Returns
    Type Description
    byte[]

    Returns a byte array containing the header bytes.

    | Edit this page View Source

    GetPayloadBytes()

    Strips out the RTP packet header and returns new byte array containing the packet payload.

    Declaration
    public byte[]? GetPayloadBytes()
    Returns
    Type Description
    byte[]

    Returns null if there is no payload or a new byte array containing the payload bytes if there is a payload for the RTP packet.

    | Edit this page View Source

    SetCSRC(int, uint)

    Sets a CSRC value.

    Declaration
    public void SetCSRC(int Idx, uint CSRC)
    Parameters
    Type Name Description
    int Idx

    Index of the CSRC to set.

    uint CSRC

    CSRC value.

    | Edit this page View Source

    SetPayloadBytes(byte[])

    Sets the payload bytes in the packet.

    Declaration
    public void SetPayloadBytes(byte[] payloadBytes)
    Parameters
    Type Name Description
    byte[] payloadBytes

    Contains the payload bytes. The length must be equal to PayloadLength

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX