Search Results for

    Show / Hide Table of Contents

    Class FormatInfo

    Format information.

    Inheritance
    System.Object
    FormatInfo
    Implements
    IEquivalent<FormatInfo>
    Namespace: FM.LiveSwitch
    Assembly: FM.LiveSwitch.dll
    Syntax
    public class FormatInfo : object, IEquivalent<FormatInfo>

    Constructors

    FormatInfo()

    Creates a new instance of a FormatInfo.

    Declaration
    public FormatInfo()

    FormatInfo(AudioFormat)

    Creates an instance of a FormatInfo from an AudioFormat.

    Declaration
    public FormatInfo(AudioFormat audioFormat)
    Parameters
    Type Name Description
    AudioFormat audioFormat

    The audio format.

    FormatInfo(VideoFormat)

    Creates an instance of a FormatInfo from a VideoFormat.

    Declaration
    public FormatInfo(VideoFormat videoFormat)
    Parameters
    Type Name Description
    VideoFormat videoFormat

    The video format.

    FormatInfo(String, Int32)

    Creates a new instance of a FormatInfo.

    Declaration
    public FormatInfo(string codecName, int clockRate)
    Parameters
    Type Name Description
    System.String codecName

    The codec name.

    System.Int32 clockRate

    The clock rate.

    FormatInfo(String, Int32, Int32)

    Creates a new instance of a FormatInfo.

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

    The name.

    System.Int32 clockRate

    The clock rate.

    System.Int32 channelCount

    The channel count.

    Properties

    ChannelCount

    Gets or sets the channel count if available. Unused for video codecs.

    Declaration
    public int ChannelCount { get; set; }
    Property Value
    Type Description
    System.Int32

    ClockRate

    Gets or sets the clock rate.

    Declaration
    public int ClockRate { get; set; }
    Property Value
    Type Description
    System.Int32

    CodecName

    Gets or sets the name.

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

    Name

    Gets or sets the name.

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

    Methods

    FromJson(String)

    Deserializes Json to a FormatInfo.

    Declaration
    public static FormatInfo FromJson(string formatInfoJson)
    Parameters
    Type Name Description
    System.String formatInfoJson

    The serialized Json.

    Returns
    Type Description
    FormatInfo

    The deserialized FormatInfo.

    FromJsonArray(String)

    Derializes an array of format infos from JSON.

    Declaration
    public static FormatInfo[] FromJsonArray(string formatInfosJson)
    Parameters
    Type Name Description
    System.String formatInfosJson

    The format infos in JSON format.

    Returns
    Type Description
    FormatInfo[]

    FromSdpMediaDescription(MediaDescription)

    Converts the RTP map attributes in an SDP media description to an array of FormatInfo objects.

    Declaration
    public static FormatInfo[] FromSdpMediaDescription(MediaDescription sdpMediaDescription)
    Parameters
    Type Name Description
    MediaDescription sdpMediaDescription

    The SDP media description.

    Returns
    Type Description
    FormatInfo[]

    An array of FormatInfo objects.

    IsEquivalent(FormatInfo)

    Checks if an instance is equivalent to this one.

    Declaration
    public bool IsEquivalent(FormatInfo instance)
    Parameters
    Type Name Description
    FormatInfo instance

    The instance.

    Returns
    Type Description
    System.Boolean

    IsEquivalent(String, Int32, Int32)

    Tests for equivalency.

    Declaration
    public bool IsEquivalent(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 equivalent; otherwise, false.

    ToJson()

    Serializes this instance to Json.

    Declaration
    public string ToJson()
    Returns
    Type Description
    System.String

    ToJson(FormatInfo)

    Serializes an instance to Json.

    Declaration
    public static string ToJson(FormatInfo formatInfo)
    Parameters
    Type Name Description
    FormatInfo formatInfo

    The instance to serialize.

    Returns
    Type Description
    System.String

    Serialized Json.

    ToJsonArray(FormatInfo[])

    Serializes an array of format infos to JSON.

    Declaration
    public static string ToJsonArray(FormatInfo[] formatInfos)
    Parameters
    Type Name Description
    FormatInfo[] formatInfos

    The format infos.

    Returns
    Type Description
    System.String

    ToString()

    Returns a string that represents this instance.

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

    Implements

    IEquivalent<T>
    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.15.0