Experimental
@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InputSwitchConfiguration Struct
Input Switch Configuration.
Example
ts
declare const stack: Stack;
declare const group: ChannelGroup;
const hlsChannel = new Channel(stack, 'HlsChannel', {
channelGroup: group,
input: InputConfiguration.hls(),
});
const cmafChannel = new Channel(stack, 'CmafChannel', {
channelGroup: group,
input: InputConfiguration.cmaf({
inputSwitchConfiguration: {
mqcsInputSwitching: true,
},
outputHeaders: [HeadersCMSD.MQCS],
}),
});
const simpleCmafChannel = new Channel(stack, 'SimpleCmafChannel', {
channelGroup: group,
input: InputConfiguration.cmaf({
outputHeaders: [HeadersCMSD.MQCS],
}),
});
python
from aws_cdk.aws_mediapackagev2_alpha import InputSwitchConfiguration
# stack: Stack
# group: ChannelGroup
hls_channel = Channel(stack, "HlsChannel",
channel_group=group,
input=InputConfiguration.hls()
)
cmaf_channel = Channel(stack, "CmafChannel",
channel_group=group,
input=InputConfiguration.cmaf(
input_switch_configuration=InputSwitchConfiguration(
mqcs_input_switching=True
),
output_headers=[HeadersCMSD.MQCS]
)
)
simple_cmaf_channel = Channel(stack, "SimpleCmafChannel",
channel_group=group,
input=InputConfiguration.cmaf(
output_headers=[HeadersCMSD.MQCS]
)
)
java
Stack stack;
ChannelGroup group;
Channel hlsChannel = Channel.Builder.create(stack, "HlsChannel")
.channelGroup(group)
.input(InputConfiguration.hls())
.build();
Channel cmafChannel = Channel.Builder.create(stack, "CmafChannel")
.channelGroup(group)
.input(InputConfiguration.cmaf(CmafInputProps.builder()
.inputSwitchConfiguration(InputSwitchConfiguration.builder()
.mqcsInputSwitching(true)
.build())
.outputHeaders(List.of(HeadersCMSD.MQCS))
.build()))
.build();
Channel simpleCmafChannel = Channel.Builder.create(stack, "SimpleCmafChannel")
.channelGroup(group)
.input(InputConfiguration.cmaf(CmafInputProps.builder()
.outputHeaders(List.of(HeadersCMSD.MQCS))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Stack stack;
ChannelGroup group;
var hlsChannel = new Channel(stack, "HlsChannel", new ChannelProps {
ChannelGroup = group,
Input = InputConfiguration.Hls()
});
var cmafChannel = new Channel(stack, "CmafChannel", new ChannelProps {
ChannelGroup = group,
Input = InputConfiguration.Cmaf(new CmafInputProps {
InputSwitchConfiguration = new InputSwitchConfiguration {
MqcsInputSwitching = true
},
OutputHeaders = new [] { HeadersCMSD.MQCS }
})
});
var simpleCmafChannel = new Channel(stack, "SimpleCmafChannel", new ChannelProps {
ChannelGroup = group,
Input = InputConfiguration.Cmaf(new CmafInputProps {
OutputHeaders = new [] { HeadersCMSD.MQCS }
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var stack Stack
var group ChannelGroup
hlsChannel := awsmediapackagev2alpha.NewChannel(stack, jsii.String("HlsChannel"), &ChannelProps{
ChannelGroup: group,
Input: awsmediapackagev2alpha.InputConfiguration_Hls(),
})
cmafChannel := awsmediapackagev2alpha.NewChannel(stack, jsii.String("CmafChannel"), &ChannelProps{
ChannelGroup: group,
Input: awsmediapackagev2alpha.InputConfiguration_Cmaf(&CmafInputProps{
InputSwitchConfiguration: &InputSwitchConfiguration{
MqcsInputSwitching: jsii.Boolean(true),
},
OutputHeaders: []HeadersCMSD{
awsmediapackagev2alpha.HeadersCMSD_MQCS(),
},
}),
})
simpleCmafChannel := awsmediapackagev2alpha.NewChannel(stack, jsii.String("SimpleCmafChannel"), &ChannelProps{
ChannelGroup: group,
Input: awsmediapackagev2alpha.InputConfiguration_*Cmaf(&CmafInputProps{
OutputHeaders: []HeadersCMSD{
awsmediapackagev2alpha.HeadersCMSD_MQCS(),
},
}),
})
Properties
mqcsInputSwitchingoptionalbooleanmqcs_input_switchingoptionalboolmqcsInputSwitchingoptionalBooleanMqcsInputSwitchingoptionalboolMqcsInputSwitchingoptional*bool= false#When true, AWS Elemental MediaPackage performs input switching based on the MQCS.
This setting is valid only when InputType is CMAF.
preferredInputoptionalIngestEndpointpreferred_inputoptionalIngestEndpointpreferredInputoptionalIngestEndpointPreferredInputoptionalIngestEndpointPreferredInputoptionalIngestEndpoint#For CMAF inputs, indicates which input MediaPackage should prefer when both inputs have equal MQCS scores.
Default: MediaPackage uses its default switching behavior
Select 1 to prefer the first ingest endpoint, or 2 to prefer the second ingest endpoint. If you don't specify a preferred input, MediaPackage uses its default switching behavior when MQCS scores are equal.