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
Channel channel;
new OriginEndpoint(this, "Endpoint", new OriginEndpointProps {
Channel = channel,
Segment = Segment.Cmaf(),
Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration {
ManifestName = "index",
FilterConfiguration = new FilterConfiguration {
ManifestFilter = new [] { ManifestFilter.BitrateRange(BitrateFilterKey.VIDEO_BITRATE, Bitrate.Mbps(1), Bitrate.Mbps(5)), ManifestFilter.NumericRange(NumericFilterKey.VIDEO_HEIGHT, 720, 1080), ManifestFilter.VideoCodecList(new [] { VideoCodec.H264, VideoCodec.H265 }), ManifestFilter.Numeric(NumericFilterKey.AUDIO_CHANNELS, 2), ManifestFilter.TextList(TextFilterKey.AUDIO_LANGUAGE, new [] { "en-US", "fr" }) },
TimeDelay = Duration.Seconds(30)
}
}) }
});
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