Class MediaFormat<TFormat>
A media format.
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class MediaFormat<TFormat>
where TFormat : MediaFormat<TFormat>
Type Parameters
Name | Description |
---|---|
TFormat |
Constructors
MediaFormat()
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
protected MediaFormat()
MediaFormat(String, Int32)
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
public MediaFormat(string name, int clockRate)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Int32 | clockRate | The clock rate. |
MediaFormat(String, Int32, String)
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
public MediaFormat(string name, int clockRate, string packetizationMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Int32 | clockRate | The clock rate. |
System.String | packetizationMode | The packetization mode. |
MediaFormat(String, Int32, String, String)
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
public MediaFormat(string name, int clockRate, string profile, string level)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Int32 | clockRate | The clock rate. |
System.String | profile | The media format profile. |
System.String | level | The media format level. |
MediaFormat(String, Int32, String, String, String)
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
public MediaFormat(string name, int clockRate, string profile, string level, string packetizationMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Int32 | clockRate | The clock rate. |
System.String | profile | The media format profile |
System.String | level | The media format level |
System.String | packetizationMode | The packetization mode. |
MediaFormat(String, Int32, String, String, String, String)
Initializes a new instance of the MediaFormat<TFormat> class.
Declaration
public MediaFormat(string name, int clockRate, string profile, string level, string packetizationMode, string tier)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Int32 | clockRate | The clock rate. |
System.String | profile | The media format profile |
System.String | level | The media format level |
System.String | packetizationMode | The packetization mode. |
System.String | tier | The media format tier. |
Properties
ClockRate
Gets or sets the clock rate.
Declaration
public int ClockRate { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
FullName
Gets the full name, including clock rate and encoding parameters.
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String |
Info
Gets this format as an info object.
Declaration
public abstract FormatInfo Info { get; }
Property Value
Type | Description |
---|---|
FormatInfo |
IsCompressed
Gets whether this is a compressed format.
Declaration
public abstract bool IsCompressed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsEncrypted
Gets or sets a value indicating that the data is encrypted.
Declaration
public bool IsEncrypted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFixedBitrate
Gets or sets a value indicating whether a format only supports fixed bitrate.
Declaration
public bool IsFixedBitrate { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInjected
Gets or sets a value indicating that the data is injected into the primary media stream (e.g. DTMF).
Declaration
public bool IsInjected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPacketized
Gets or sets a value indicating whether the data is packetized.
Declaration
public bool IsPacketized { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Level
Gets or sets the level.
Declaration
public string Level { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LevelIsStrict
Gets or sets a value indicating whether the level is strict.
Declaration
public bool LevelIsStrict { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxBitrate
Gets the maximum bitrate supported by this format, in kbps.
Declaration
public virtual int MaxBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinBitrate
Gets the minimum bitrate supported by this format, in kbps.
Declaration
public virtual int MinBitrate { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PacketizationMode
Gets or sets the packetization mode.
Declaration
public string PacketizationMode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Parameters
Gets the parameters.
Declaration
public abstract string Parameters { get; }
Property Value
Type | Description |
---|---|
System.String |
Profile
Gets or sets the profile.
Declaration
public string Profile { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RedName
Gets the name of the RED media format.
Declaration
public static string RedName { get; }
Property Value
Type | Description |
---|---|
System.String |
StaticPayloadType
Gets or sets the static payload type, if this format has a static payload type registered with IANA.
Declaration
public int StaticPayloadType { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Tier
Gets or sets the tier.
Declaration
public string Tier { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UlpFecName
Gets the name of the ULPFEC media format.
Declaration
public static string UlpFecName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Clone()
Clones this instance.
Declaration
public virtual TFormat Clone()
Returns
Type | Description |
---|---|
TFormat |
CreateInstance()
Creates a new instance.
Declaration
protected abstract TFormat CreateInstance()
Returns
Type | Description |
---|---|
TFormat |
GetMaxLevel(String, String)
Gets the maximum level.
Declaration
protected virtual string GetMaxLevel(string level1, string level2)
Parameters
Type | Name | Description |
---|---|---|
System.String | level1 | The first level. |
System.String | level2 | The second level. |
Returns
Type | Description |
---|---|
System.String | The maximum level. |
GetMinLevel(String, String)
Gets the minimum level.
Declaration
protected virtual string GetMinLevel(string level1, string level2)
Parameters
Type | Name | Description |
---|---|---|
System.String | level1 | The first level. |
System.String | level2 | The second level. |
Returns
Type | Description |
---|---|
System.String | The minimum level. |
IsCompatible(TFormat)
Determines whether the specified format is compatible.
Declaration
public virtual bool IsCompatible(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
Returns
Type | Description |
---|---|
System.Boolean |
IsEquivalent(TFormat)
Determines whether the specified format is equivalent.
Declaration
public bool IsEquivalent(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
Returns
Type | Description |
---|---|
System.Boolean |
IsEquivalent(TFormat, Boolean)
Determines whether the specified format is equivalent.
Declaration
public virtual bool IsEquivalent(TFormat format, bool ignoreIsPacketized)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
System.Boolean | ignoreIsPacketized | Whether to ignore if the two formats differ in whether they are packetized. |
Returns
Type | Description |
---|---|
System.Boolean |
IsLevelCompatible(String)
Gets whether a level is compatible.
Declaration
protected virtual bool IsLevelCompatible(string level)
Parameters
Type | Name | Description |
---|---|---|
System.String | level | The level. |
Returns
Type | Description |
---|---|
System.Boolean |
IsProfileCompatible(String)
Gets whether a profile is compatible.
Declaration
protected virtual bool IsProfileCompatible(string profile)
Parameters
Type | Name | Description |
---|---|---|
System.String | profile | The profile. |
Returns
Type | Description |
---|---|
System.Boolean |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
UpdateLevelIsStrictToCompatible(TFormat)
Updates the level-is-strict flag to a compatible value.
Declaration
protected virtual void UpdateLevelIsStrictToCompatible(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
UpdateLevelToCompatible(TFormat)
Updates the level to a compatible value.
Declaration
protected virtual void UpdateLevelToCompatible(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
UpdateProfileToCompatible(TFormat)
Updates the profile to a compatible value.
Declaration
protected virtual void UpdateProfileToCompatible(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |
UpdateTierToCompatible(TFormat)
Updates the tier to a compatible value.
Declaration
protected virtual void UpdateTierToCompatible(TFormat format)
Parameters
Type | Name | Description |
---|---|---|
TFormat | format | The format. |