Class Bitrate
Represents a bitrate value.
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Bitrate : DeputyBase
Syntax (vb)
Public Class Bitrate Inherits DeputyBase
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
Examples
Stack stack;
RouterNetworkInterface networkInterface;
var output = new RouterOutput(stack, "SrtOutput", new RouterOutputProps {
RouterOutputName = "srt-output",
MaximumBitrate = Bitrate.Mbps(10),
RoutingScope = RoutingScope.REGIONAL,
// tier defaults to RouterOutputTier.OUTPUT_20 (lowest cost)
Configuration = RouterOutputConfiguration.Standard(new StandardOutputConfigurationProps {
Protocol = RouterOutputProtocol.SrtListener(new SrtListenerOutputProtocolProps {
Port = 9001,
MinimumLatency = Duration.Millis(200)
}),
NetworkInterface = networkInterface
})
});
Synopsis
Methods
| Bps(double) | Create a Bitrate representing an amount of bits per second. |
| Gbps(double) | Create a Bitrate representing an amount of gigabits per second. |
| IsUnresolved() | Checks if bitrate is a token or a resolvable object. |
| Kbps(double) | Create a Bitrate representing an amount of kilobits per second. |
| Mbps(double) | Create a Bitrate representing an amount of megabits per second. |
| ToBps() | Return the total number of bits per second. |
| ToGbps() | Return the total number of gigabits per second. |
| ToKbps() | Return the total number of kilobits per second. |
| ToMbps() | Return the total number of megabits per second. |
Methods
Bps(double)
Create a Bitrate representing an amount of bits per second.
public static Bitrate Bps(double amount)
Parameters
- amount double
the amount of bits per second.
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
Gbps(double)
Create a Bitrate representing an amount of gigabits per second.
public static Bitrate Gbps(double amount)
Parameters
- amount double
the amount of gigabits per second.
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
IsUnresolved()
Checks if bitrate is a token or a resolvable object.
public virtual bool IsUnresolved()
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
Kbps(double)
Create a Bitrate representing an amount of kilobits per second.
public static Bitrate Kbps(double amount)
Parameters
- amount double
the amount of kilobits per second.
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
Mbps(double)
Create a Bitrate representing an amount of megabits per second.
public static Bitrate Mbps(double amount)
Parameters
- amount double
the amount of megabits per second.
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
ToBps()
Return the total number of bits per second.
public virtual double ToBps()
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
ToGbps()
Return the total number of gigabits per second.
public virtual double ToGbps()
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
ToKbps()
Return the total number of kilobits per second.
public virtual double ToKbps()
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused
ToMbps()
Return the total number of megabits per second.
public virtual double ToMbps()
Returns
Remarks
The amount can be specified either as a literal value (e.g: 10) which
cannot be negative, or as an unresolved number token.
When the amount is passed as a token, unit conversion is not possible.
ExampleMetadata: infused