• 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 MediaDescription

    Class for processing the Media Description "m=" type for the SDP contents. See Section 5.14 of RFC 8866.

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

    Constructors

    | Edit this page View Source

    MediaDescription()

    Constructs an empty MediaDescription object. Use this constructor to create a new Media Description for a new SDP message block to send.

    Declaration
    public MediaDescription()
    | Edit this page View Source

    MediaDescription(string, int, List<int>)

    Constructs a new MediaDescription object from parameters provided by the caller.

    Declaration
    public MediaDescription(string strMediaType, int iPort, List<int> payloadTypes)
    Parameters
    Type Name Description
    string strMediaType

    Media type. Ex: "audio" or "video"

    int iPort

    Port number that the session will occur on.

    List<int> payloadTypes

    Media payload types.

    Properties

    | Edit this page View Source

    Attributes

    Contains the attributes for this type of media except the rtpmap attributes, which are stored in the RtpMapAttributes field.

    Declaration
    public List<SdpAttribute> Attributes { get; set; }
    Property Value
    Type Description
    List<SdpAttribute>
    | Edit this page View Source

    Bandwidth

    Specifies the bandwidth limit for the media in kilo-bits per second. This is comes from or generates a b=AS:Bandwidth line in the media description. An empty or null value indicates that there is no b= line in the media description.

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

    ConnectionData

    Contains the connection data (c=) for this media. If null, then use the ConnectionData of the SDP session.

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

    Label

    Gets or sets the label attribute of a media description block. RFC 4574 specifies the characteristics of the label attribute.

    The getter returns an empty string if the media description does not have a label attribute. The setter removes any existing label attributes and then adds one with the value to ensure that each MediaDescription has a single label attribute.

    Declaration
    public string? Label { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    MediaDirection

    Gets or Sets the media direction attribute for this media description. If there is no media direction attribute, then the getter returns sendrecv.

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

    MediaType

    Specifies the media type. Example: "audio", "video", "text" or "message".

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

    PayloadTypes

    Contains a list of payload types for the m= line.

    Declaration
    public List<int> PayloadTypes { get; set; }
    Property Value
    Type Description
    List<int>
    | Edit this page View Source

    Port

    Specifies the TCP/UDP port number;

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

    RtpMapAttributes

    Contains a list of RtpMap objects. Each object corresponds to a a=rtpmap .... line in the media description.

    Declaration
    public List<RtpMapAttribute> RtpMapAttributes { get; set; }
    Property Value
    Type Description
    List<RtpMapAttribute>
    | Edit this page View Source

    Transport

    Specifies the transport mechanism: "TCP", "UDP", "RTP/AVP", etc.

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

    UsingEncryption

    Returns true if this MediaDescription object call for DTLS-SRTP or SDES-SRTP encryption of false if it does not.

    Declaration
    public bool UsingEncryption { get; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    AddSetupAttribute(SetupType)

    Adds a a=setup:xxx attribute.

    Declaration
    public void AddSetupAttribute(SetupType SetType)
    Parameters
    Type Name Description
    SetupType SetType

    Specifies the role (active, passive, etc.)

    | Edit this page View Source

    BuildH264AnswerSmd(int)

    Builds an MediaDescription that contains only the offerred H264 codec attributes.

    Declaration
    public MediaDescription? BuildH264AnswerSmd(int Port)
    Parameters
    Type Name Description
    int Port

    RTP port number to use.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription object or null if the video media block does not contain an offer of H264 media.

    | Edit this page View Source

    CreateCopy()

    Creates a deep copy of this object.

    Declaration
    public MediaDescription CreateCopy()
    Returns
    Type Description
    MediaDescription

    Returns a new object with a copy of each member variable in this object.

    | Edit this page View Source

    GetAttributeValue(string)

    Gets the attribute value for the specified attribute name.

    Declaration
    public string? GetAttributeValue(string strAttributeName)
    Parameters
    Type Name Description
    string strAttributeName

    Name of the attribute to search for.

    Returns
    Type Description
    string

    A string containing the attribute value. Returns an empty string if the attribute name was not found or if the attribute was found but does not have a value (not all attributes have values).

    | Edit this page View Source

    GetCryptoAttributes()

    Gets a list of the CryptoAttributes in this MediaDescription.

    Declaration
    public List<CryptoAttribute> GetCryptoAttributes()
    Returns
    Type Description
    List<CryptoAttribute>

    Returns a list of the crypto attributes for SDES-SRTP in this MediaDescription. The return value will not be null but it may be empty.

    | Edit this page View Source

    GetFmtpForFormatNumber(string)

    Finds the fmtp attribute for the specified media format number.

    Declaration
    public SdpAttribute? GetFmtpForFormatNumber(string strFormatNumber)
    Parameters
    Type Name Description
    string strFormatNumber

    String representation of the media format number to look for.

    Returns
    Type Description
    SdpAttribute

    Returns the SdpAttribute object or null if its not found.

    | Edit this page View Source

    GetNamedAttribute(string)

    Returns the SdpAttribute object for a named attribute.

    Declaration
    public SdpAttribute? GetNamedAttribute(string strAttr)
    Parameters
    Type Name Description
    string strAttr

    Name of the attribute to search for.

    Returns
    Type Description
    SdpAttribute

    Returns a SdpAttribute for the named attribute if it is found or null if the named attribute is not present.

    | Edit this page View Source

    GetNamedAttributes(string)

    Gets a list of SdpAttributes for an attribute name.

    Declaration
    public List<SdpAttribute> GetNamedAttributes(string strAttr)
    Parameters
    Type Name Description
    string strAttr

    Attribute name.

    Returns
    Type Description
    List<SdpAttribute>

    Returns a list of SdpAttribute object. The return value will never be null but will be empty if there are no attributes with a name that matches the strAttr parameter.

    | Edit this page View Source

    GetRtpMapForCodecType(string)

    Finds the RtpMapAttribute object for the specified codec name (encoding name)

    Declaration
    public RtpMapAttribute? GetRtpMapForCodecType(string strCodecName)
    Parameters
    Type Name Description
    string strCodecName

    Codec or encoding name

    Returns
    Type Description
    RtpMapAttribute

    Returns the RtpMapAttribute object if found or null if not found

    | Edit this page View Source

    GetRtpMapForPayloadType(int)

    Gets the RtpMapAttribute object for the specified payload type

    Declaration
    public RtpMapAttribute? GetRtpMapForPayloadType(int payloadType)
    Parameters
    Type Name Description
    int payloadType

    Specifies the payload type to look for

    Returns
    Type Description
    RtpMapAttribute

    Returns the RtpMapAttribute object if successful or null if it is not present

    | Edit this page View Source

    GetSetupTypeAttributeValue()

    Gets the value of the setup attribute.

    Declaration
    public SetupType GetSetupTypeAttributeValue()
    Returns
    Type Description
    SetupType
    | Edit this page View Source

    GetTelephoneEventPayloadType(out int)

    Retrieves the payload type for DTMF telephone events.

    Declaration
    public bool GetTelephoneEventPayloadType(out int PayloadType)
    Parameters
    Type Name Description
    int PayloadType

    Output is set to the value for the first rtpmap attribute for a telephone-event if the return value is true. This output parameter will be set to 0 if the return value of this function is false.

    Returns
    Type Description
    bool

    True if the rtpmap attribute for a telephone-event is found. A return value of false indicates that the telephone-event rtpmap attrubute could not be found.

    | Edit this page View Source

    HasMediaStateAttribute()

    Determines if the media description has an attribute that specifies the media state. The media state attributes are inactive, sendrecv, recvonly and sendonly.

    Declaration
    public bool HasMediaStateAttribute()
    Returns
    Type Description
    bool

    Returns true if there is a media state attribute, else returns false.

    | Edit this page View Source

    ParseMediaDescriptionLine(string)

    Parses a string containing the parameter fields of a SDP m= line

    Declaration
    public static MediaDescription ParseMediaDescriptionLine(string strMd)
    Parameters
    Type Name Description
    string strMd

    Contains the parameter fields of a m= line. The m= field must not be included.

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription object.

    | Edit this page View Source

    ParseMediaDescriptionString(string)

    Parses a string containing a full media description block into a MediaDescription object.

    Declaration
    public static MediaDescription? ParseMediaDescriptionString(string strMd)
    Parameters
    Type Name Description
    string strMd

    Input string containing the lines of an SDP media description block. The first line must contain an m= line

    Returns
    Type Description
    MediaDescription

    Returns a new MediaDescription object of successful or null if an error is detected.

    | Edit this page View Source

    RemoveNamedAttributes(string)

    Removes all instances of a named SDP attribute.

    Declaration
    public void RemoveNamedAttributes(string Attr)
    Parameters
    Type Name Description
    string Attr

    Name of the SDP attribute to remove.

    | Edit this page View Source

    ToString()

    Converts the MediaDescription object to a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The string format is: "m=MediaType Port Transport MediaFormat(s)"

    Overrides
    object.ToString()
    | Edit this page View Source

    UsingDtlsSrtp(out SetupType)

    Determines if its necessary to use DTLS-SRTP to negotiate encryption keys and algorithms.

    Declaration
    public bool UsingDtlsSrtp(out SetupType SetType)
    Parameters
    Type Name Description
    SetupType SetType

    SetupType to use in the answer to the offered SetupType.

    Returns
    Type Description
    bool

    Returns true if DTLS-SRTP is required.

    | Edit this page View Source

    UsingSdesSrtp()

    Returns true if this MediaDescription object is for SDES-SRTP media encryption.

    Declaration
    public bool UsingSdesSrtp()
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX