Search Results for

    Show / Hide Table of Contents

    Class MediaDescription

    An SDP media description element.

    Inheritance
    System.Object
    MediaDescription
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: FM.LiveSwitch.Sdp
    Assembly: FM.LiveSwitch.dll
    Syntax
    public class MediaDescription

    Constructors

    MediaDescription(Media)

    Initializes a new instance of the MediaDescription class.

    Declaration
    public MediaDescription(Media media)
    Parameters
    Type Name Description
    Media media

    The media name and transport address.

    Properties

    Bandwidths

    Gets the array of proposed bandwidths to be used by the media.

    Declaration
    public Bandwidth[] Bandwidths { get; }
    Property Value
    Type Description
    Bandwidth[]

    BundleOnly

    Gets a value indicating whether this media description has been marked as bundle-only.

    Declaration
    public bool BundleOnly { get; }
    Property Value
    Type Description
    System.Boolean

    ConnectionData

    Gets or sets media-level connection data.

    Declaration
    public ConnectionData ConnectionData { get; set; }
    Property Value
    Type Description
    ConnectionData

    CryptoAttributes

    Gets CryptoAttributes associated with this MediaDescription.

    Declaration
    public CryptoAttribute[] CryptoAttributes { get; }
    Property Value
    Type Description
    CryptoAttribute[]

    EncryptionKey

    Gets or sets the media-level encryption key.

    Declaration
    public EncryptionKey EncryptionKey { get; set; }
    Property Value
    Type Description
    EncryptionKey

    FingerprintAttribute

    Gets the Fingerprint Attribute from this MediaDescription

    Declaration
    public FingerprintAttribute FingerprintAttribute { get; }
    Property Value
    Type Description
    FingerprintAttribute

    IcePasswordAttribute

    Gets the IcePasswordAttribute associated with this MediaDescription

    Declaration
    public PasswordAttribute IcePasswordAttribute { get; }
    Property Value
    Type Description
    PasswordAttribute

    IceUfragAttribute

    Gets the IceUfragAttribute associated with this MediaDescription

    Declaration
    public UfragAttribute IceUfragAttribute { get; }
    Property Value
    Type Description
    UfragAttribute

    IdenticalCategoryAttributes

    Gets the attributes with Identical Multiplexing Category present in this description.

    Declaration
    public Attribute[] IdenticalCategoryAttributes { get; }
    Property Value
    Type Description
    Attribute[]

    Attributes with Identical Multiplexing Category present in this description.

    IsApplication

    Gets whether this media description represents an application stream (media type == "application").

    Declaration
    public bool IsApplication { get; }
    Property Value
    Type Description
    System.Boolean

    IsAudio

    Gets whether this media description represents an audio stream (media type == "audio").

    Declaration
    public bool IsAudio { get; }
    Property Value
    Type Description
    System.Boolean

    IsMessage

    Gets whether this media description represents a message stream (media type == "message").

    Declaration
    public bool IsMessage { get; }
    Property Value
    Type Description
    System.Boolean

    IsMuted

    Gets or sets a value indicating whether this stream is muted. Applies to only media streams.

    Declaration
    public bool IsMuted { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsText

    Gets whether this media description represents a text stream (media type == "text").

    Declaration
    public bool IsText { get; }
    Property Value
    Type Description
    System.Boolean

    IsVideo

    Gets whether this media description represents a video stream (media type == "video").

    Declaration
    public bool IsVideo { get; }
    Property Value
    Type Description
    System.Boolean

    Media

    Gets or sets the media name and transport address.

    Declaration
    public Media Media { get; }
    Property Value
    Type Description
    Media

    MediaAttributes

    Gets the array of media-level attributes.

    Declaration
    public Attribute[] MediaAttributes { get; }
    Property Value
    Type Description
    Attribute[]

    MediaTitle

    Gets or sets the media title.

    Declaration
    public string MediaTitle { get; set; }
    Property Value
    Type Description
    System.String

    QualityAttribute

    Gets or sets the QualityAttribute associated with this MediaDescription.

    Declaration
    public QualityAttribute QualityAttribute { get; set; }
    Property Value
    Type Description
    QualityAttribute

    RtcpAttribute

    Gets or sets Rtcp Attributes associated with this media description.

    Declaration
    public Attribute RtcpAttribute { get; set; }
    Property Value
    Type Description
    Attribute

    RtcpMultiplexingSupported

    Gets or sets a value indicating support for RTCP Multiplexing.

    Declaration
    public bool RtcpMultiplexingSupported { get; set; }
    Property Value
    Type Description
    System.Boolean

    SctpMapAttribute

    Gets the Sctp Map Attribute, if it is present in the Media Description.

    Declaration
    public MapAttribute SctpMapAttribute { get; }
    Property Value
    Type Description
    MapAttribute

    SctpMaxMessageSizeAttribute

    Gets the Sctp Max Message Size Attribute, if it is present in the Media Description.

    Declaration
    public MaxMessageSizeAttribute SctpMaxMessageSizeAttribute { get; }
    Property Value
    Type Description
    MaxMessageSizeAttribute

    SctpPortAttribute

    Gets the Sctp Port Attribute, if it is present in the Media Description.

    Declaration
    public PortAttribute SctpPortAttribute { get; }
    Property Value
    Type Description
    PortAttribute

    SetupAttribute

    Gets or sets the SetupAttribute associated with this MediaDescription.

    Declaration
    public SetupAttribute SetupAttribute { get; set; }
    Property Value
    Type Description
    SetupAttribute

    StreamDirection

    Gets or sets the stream direction indicated in Media Description. Getter returns StreamDirection if DirectionAttribute is present; otherwise, returns StreamDirection.Unset.

    Declaration
    public StreamDirection StreamDirection { get; set; }
    Property Value
    Type Description
    StreamDirection

    SupportsIce

    Gets a value indicating whether this SDP MediaDescription suggests support for ICE.

    Declaration
    public bool SupportsIce { get; }
    Property Value
    Type Description
    System.Boolean

    TransportCategoryAttributes

    Gets the attributes with Transport Multiplexing Category present in this description.

    Declaration
    public Attribute[] TransportCategoryAttributes { get; }
    Property Value
    Type Description
    Attribute[]

    Attributes with Transport Multiplexing Category present in this description.

    Methods

    AddBandwidth(Bandwidth)

    Adds a proposed bandwidth.

    Declaration
    public void AddBandwidth(Bandwidth bandwidth)
    Parameters
    Type Name Description
    Bandwidth bandwidth

    The proposed bandwidth to add.

    AddMediaAttribute(Attribute)

    Adds a media-level attribute.

    Declaration
    public void AddMediaAttribute(Attribute attribute)
    Parameters
    Type Name Description
    Attribute attribute

    The session-level attribute to add.

    GetCandidateAttributes()

    Obtains Ice Candidate attributes associated with this media description.

    Declaration
    public Attribute[] GetCandidateAttributes()
    Returns
    Type Description
    Attribute[]

    GetCcmFirFeedbackAttribute(Int32)

    Gets the RTCP "ccm fir" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetCcmFirFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetCcmLrrFeedbackAttribute(Int32)

    Gets the RTCP "ccm lrr" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetCcmLrrFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetContentAttribute()

    Obtains the content attribute.

    Declaration
    public ContentAttribute GetContentAttribute()
    Returns
    Type Description
    ContentAttribute

    GetFormatParametersAttribute(Int32)

    Gets the format parameters attribute for the given payload type.

    Declaration
    public FormatParametersAttribute GetFormatParametersAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FormatParametersAttribute

    GetFormatParameterValue(Int32, String)

    Sets a format parameter value.

    Declaration
    public string GetFormatParameterValue(int payloadType, string formatParameterName)
    Parameters
    Type Name Description
    System.Int32 payloadType
    System.String formatParameterName
    Returns
    Type Description
    System.String

    GetIceOptionAttributes()

    Obtains Ice Options attributes associated with this media description.

    Declaration
    public Attribute[] GetIceOptionAttributes()
    Returns
    Type Description
    Attribute[]

    GetMaxPacketTimeAttribute()

    Obtains the maximum packet time attribute.

    Declaration
    public MaxPacketTimeAttribute GetMaxPacketTimeAttribute()
    Returns
    Type Description
    MaxPacketTimeAttribute

    GetMediaStreamIdentifierAttribute()

    Obtains the media stream identifier attribute.

    Declaration
    public MediaStreamIdAttribute GetMediaStreamIdentifierAttribute()
    Returns
    Type Description
    MediaStreamIdAttribute

    GetNackFeedbackAttribute(Int32)

    Gets the RTCP "nack" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetNackFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetNackPliFeedbackAttribute(Int32)

    Gets the RTCP "nack pli" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetNackPliFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetNackRpsiFeedbackAttribute(Int32)

    Gets the RTCP "nack rpsi" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetNackRpsiFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetNackSliFeedbackAttribute(Int32)

    Gets the RTCP "nack sli" feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetNackSliFeedbackAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    FeedbackAttribute

    GetPacketTimeAttribute()

    Obtains the packet time attribute.

    Declaration
    public PacketTimeAttribute GetPacketTimeAttribute()
    Returns
    Type Description
    PacketTimeAttribute

    GetPreferredRtpMapAttributes()

    Obtains the RTP map attributes in preference order.

    Declaration
    public MapAttribute[] GetPreferredRtpMapAttributes()
    Returns
    Type Description
    MapAttribute[]

    GetRidAttribute(String)

    Obtains an RID attribute by its RID.

    Declaration
    public RidAttribute GetRidAttribute(string rid)
    Parameters
    Type Name Description
    System.String rid
    Returns
    Type Description
    RidAttribute

    GetRidAttributes()

    Obtains the RID attributes.

    Declaration
    public RidAttribute[] GetRidAttributes()
    Returns
    Type Description
    RidAttribute[]

    GetRidAttributes(String)

    Obtains the RID attributes.

    Declaration
    public RidAttribute[] GetRidAttributes(string direction)
    Parameters
    Type Name Description
    System.String direction

    The RID attribute direction.

    Returns
    Type Description
    RidAttribute[]

    GetRtcpFeedbackAttribute(Int32, String, String)

    Gets the RTCP feedback attribute for the given payload type.

    Declaration
    public FeedbackAttribute GetRtcpFeedbackAttribute(int payloadType, string type, string subType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    System.String type

    The type.

    System.String subType

    The sub-type.

    Returns
    Type Description
    FeedbackAttribute

    GetRtpExtMapAttributes()

    Obtains the RTP ext-map attributes.

    Declaration
    public Attribute[] GetRtpExtMapAttributes()
    Returns
    Type Description
    Attribute[]

    GetRtpMapAttribute(Int32)

    Obtains the RTP map attribute for a given payload type.

    Declaration
    public MapAttribute GetRtpMapAttribute(int payloadType)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    Returns
    Type Description
    MapAttribute

    GetRtpMapAttribute(Int32, out Int32)

    Obtains the RTP map attribute for a given payload type.

    Declaration
    public MapAttribute GetRtpMapAttribute(int payloadType, out int rtpMapAttributeIndex)
    Parameters
    Type Name Description
    System.Int32 payloadType

    The payload type.

    System.Int32 rtpMapAttributeIndex

    The index of the MapAttribute.

    Returns
    Type Description
    MapAttribute

    GetRtpMapAttribute(String, Int32)

    Obtains the RTP map attribute for a given format.

    Declaration
    public MapAttribute GetRtpMapAttribute(string formatName, int clockRate)
    Parameters
    Type Name Description
    System.String formatName

    Format name.

    System.Int32 clockRate

    Clock rate.

    Returns
    Type Description
    MapAttribute

    GetRtpMapAttribute(String, Int32, String)

    Obtains the RTP map attribute for a given format.

    Declaration
    public MapAttribute GetRtpMapAttribute(string formatName, int clockRate, string formatParameters)
    Parameters
    Type Name Description
    System.String formatName

    Format name.

    System.Int32 clockRate

    Clock rate.

    System.String formatParameters

    Format parameters.

    Returns
    Type Description
    MapAttribute

    GetRtpMapAttribute(String, Int32, String, out Int32)

    Obtains the RTP map attribute for a given format.

    Declaration
    public MapAttribute GetRtpMapAttribute(string formatName, int clockRate, string formatParameters, out int rtpMapAttributeIndex)
    Parameters
    Type Name Description
    System.String formatName

    Format name.

    System.Int32 clockRate

    Clock rate.

    System.String formatParameters

    Format parameters.

    System.Int32 rtpMapAttributeIndex

    The index of the MapAttribute.

    Returns
    Type Description
    MapAttribute

    GetRtpMapAttributes()

    Obtains the RTP map attributes.

    Declaration
    public MapAttribute[] GetRtpMapAttributes()
    Returns
    Type Description
    MapAttribute[]

    GetRtpMapAttributes(String, Int32, String)

    Obtains the RTP map attributes for a given format.

    Declaration
    public MapAttribute[] GetRtpMapAttributes(string formatName, int clockRate, string formatParameters)
    Parameters
    Type Name Description
    System.String formatName

    Format name.

    System.Int32 clockRate

    Clock rate.

    System.String formatParameters

    Format parameters.

    Returns
    Type Description
    MapAttribute[]

    GetRtpMapAttributes(String, Int32, String, out Int32[])

    Obtains the RTP map attributes for a given format.

    Declaration
    public MapAttribute[] GetRtpMapAttributes(string formatName, int clockRate, string formatParameters, out int[] rtpMapAttributeIndices)
    Parameters
    Type Name Description
    System.String formatName

    Format name.

    System.Int32 clockRate

    Clock rate.

    System.String formatParameters

    Format parameters.

    System.Int32[] rtpMapAttributeIndices

    The indeces of the MapAttribute.

    Returns
    Type Description
    MapAttribute[]

    GetSimulcastAttribute()

    Obtains the simulcast attribute.

    Declaration
    public SimulcastAttribute GetSimulcastAttribute()
    Returns
    Type Description
    SimulcastAttribute

    GetSsrcAttribute(Int64, String)

    Obtains the first SSRC attribute matching a given synchronization source and name.

    Declaration
    public SsrcAttribute GetSsrcAttribute(long ssrc, string name)
    Parameters
    Type Name Description
    System.Int64 ssrc

    The synchronization source.

    System.String name

    The attribute name.

    Returns
    Type Description
    SsrcAttribute

    GetSsrcAttribute(Int64, String, String)

    Obtains the SSRC attribute matching a given synchronization source, name, and value.

    Declaration
    public SsrcAttribute GetSsrcAttribute(long ssrc, string name, string value)
    Parameters
    Type Name Description
    System.Int64 ssrc

    The synchronization source.

    System.String name

    The attribute name.

    System.String value

    The attribute value.

    Returns
    Type Description
    SsrcAttribute

    GetSsrcAttributes()

    Obtains the SSRC attributes.

    Declaration
    public SsrcAttribute[] GetSsrcAttributes()
    Returns
    Type Description
    SsrcAttribute[]

    GetSsrcAttributes(Int64)

    Obtains the SSRC attributes matching a given synchronization source.

    Declaration
    public SsrcAttribute[] GetSsrcAttributes(long ssrc)
    Parameters
    Type Name Description
    System.Int64 ssrc

    The synchronization source.

    Returns
    Type Description
    SsrcAttribute[]

    GetSsrcAttributes(Int64, String)

    Obtains the SSRC attributes matching a given synchronization source and name.

    Declaration
    public SsrcAttribute[] GetSsrcAttributes(long ssrc, string name)
    Parameters
    Type Name Description
    System.Int64 ssrc

    The synchronization source.

    System.String name

    The attribute name.

    Returns
    Type Description
    SsrcAttribute[]

    GetSsrcAttributes(String)

    Obtains the SSRC attributes.

    Declaration
    public SsrcAttribute[] GetSsrcAttributes(string name)
    Parameters
    Type Name Description
    System.String name

    The SSRC attribute name.

    Returns
    Type Description
    SsrcAttribute[]

    GetSsrcGroupAttributes()

    Obtains the SSRC Group attributes.

    Declaration
    public SsrcGroupAttribute[] GetSsrcGroupAttributes()
    Returns
    Type Description
    SsrcGroupAttribute[]

    GetSsrcGroupSsrcs(String)

    Obtains the SSRCS from the first SSRC Group with matching semantics.

    Declaration
    public long[] GetSsrcGroupSsrcs(string semantics)
    Parameters
    Type Name Description
    System.String semantics
    Returns
    Type Description
    System.Int64[]

    InsertMediaAttribute(Attribute, Int32)

    DEPRECATED: Use AddMediaAttribute instead. Inserts a media-level attribute at the given index.

    Declaration
    public void InsertMediaAttribute(Attribute attribute, int index)
    Parameters
    Type Name Description
    Attribute attribute

    The session-level attribute to add.

    System.Int32 index

    The index.

    OrderFormats(String[])

    Orders the formats in preference order.

    Declaration
    public bool OrderFormats(string[] names)
    Parameters
    Type Name Description
    System.String[] names

    The format names.

    Returns
    Type Description
    System.Boolean

    false if a media element does not exist; otherwise true.

    Parse(String)

    Creates an MediaDescription instance from a string.

    Declaration
    public static MediaDescription Parse(string s)
    Parameters
    Type Name Description
    System.String s

    The string to parse.

    Returns
    Type Description
    MediaDescription

    PurgeFormat(String)

    Removes a format by name.

    Declaration
    public bool PurgeFormat(string name)
    Parameters
    Type Name Description
    System.String name

    The format name.

    Returns
    Type Description
    System.Boolean

    true if the format was found and removed; otherwise, false

    PurgeFormat(String, Int32)

    Removes a format by name and clock rate.

    Declaration
    public bool PurgeFormat(string name, int clockRate)
    Parameters
    Type Name Description
    System.String name

    The format name.

    System.Int32 clockRate

    The clock rate.

    Returns
    Type Description
    System.Boolean

    true if the format was found and removed; otherwise, false

    PurgeFormat(String, Int32, Int32)

    Removes a format by name, clock rate, and channel count.

    Declaration
    public bool PurgeFormat(string name, int clockRate, int channelCount)
    Parameters
    Type Name Description
    System.String name

    The format name.

    System.Int32 clockRate

    The clock rate.

    System.Int32 channelCount

    The channel count.

    Returns
    Type Description
    System.Boolean

    true if the format was found and removed; otherwise, false

    RemoveBandwidth(Bandwidth)

    Removes a proposed bandwidth.

    Declaration
    public bool RemoveBandwidth(Bandwidth bandwidth)
    Parameters
    Type Name Description
    Bandwidth bandwidth

    The proposed bandwidth to remove.

    Returns
    Type Description
    System.Boolean

    RemoveBundleCategoryAttributes()

    Removes Bundle (i.e. Transport and Identical) Category Attributes.

    Declaration
    public void RemoveBundleCategoryAttributes()

    RemoveMediaAttribute(Attribute)

    Removes a media-level attribute.

    Declaration
    public bool RemoveMediaAttribute(Attribute attribute)
    Parameters
    Type Name Description
    Attribute attribute

    The session-level attribute to remove.

    Returns
    Type Description
    System.Boolean

    SetFormatParameterValue(Int32, String, String)

    Sets a format parameter value.

    Declaration
    public bool SetFormatParameterValue(int payloadType, string formatParameterName, string formatParameterValue)
    Parameters
    Type Name Description
    System.Int32 payloadType
    System.String formatParameterName
    System.String formatParameterValue
    Returns
    Type Description
    System.Boolean

    ToString()

    Converts this instance to a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    TryAddContentAttribute(ContentAttribute)

    Adds a content attribute if not already present.

    Declaration
    public bool TryAddContentAttribute(ContentAttribute contentAttribute)
    Parameters
    Type Name Description
    ContentAttribute contentAttribute

    The content attribute.

    Returns
    Type Description
    System.Boolean

    UpdateQualityAttributeValue(Int32)

    Updates SDP Quality Attribute associated with this media description if one is present. Otherwise, creates a new one and inserts it into this media description.

    Declaration
    public void UpdateQualityAttributeValue(int quality)
    Parameters
    Type Name Description
    System.Int32 quality
    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0