Skip to content

Commit 1708e8d

Browse files
author
awstools
committed
feat(client-mediapackagev2): MediaPackage v2 now supports the Media Quality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.
1 parent 34946f7 commit 1708e8d

File tree

6 files changed

+244
-12
lines changed

6 files changed

+244
-12
lines changed

Diff for: clients/client-mediapackagev2/src/commands/CreateChannelCommand.ts

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export interface CreateChannelCommandOutput extends CreateChannelResponse, __Met
4141
* ClientToken: "STRING_VALUE",
4242
* InputType: "HLS" || "CMAF",
4343
* Description: "STRING_VALUE",
44+
* InputSwitchConfiguration: { // InputSwitchConfiguration
45+
* MQCSInputSwitching: true || false,
46+
* },
47+
* OutputHeaderConfiguration: { // OutputHeaderConfiguration
48+
* PublishMQCS: true || false,
49+
* },
4450
* Tags: { // TagMap
4551
* "<keys>": "STRING_VALUE",
4652
* },
@@ -65,6 +71,12 @@ export interface CreateChannelCommandOutput extends CreateChannelResponse, __Met
6571
* // Tags: { // TagMap
6672
* // "<keys>": "STRING_VALUE",
6773
* // },
74+
* // InputSwitchConfiguration: { // InputSwitchConfiguration
75+
* // MQCSInputSwitching: true || false,
76+
* // },
77+
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
78+
* // PublishMQCS: true || false,
79+
* // },
6880
* // };
6981
*
7082
* ```

Diff for: clients/client-mediapackagev2/src/commands/GetChannelCommand.ts

+6
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ export interface GetChannelCommandOutput extends GetChannelResponse, __MetadataB
5959
* // Tags: { // TagMap
6060
* // "<keys>": "STRING_VALUE",
6161
* // },
62+
* // InputSwitchConfiguration: { // InputSwitchConfiguration
63+
* // MQCSInputSwitching: true || false,
64+
* // },
65+
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
66+
* // PublishMQCS: true || false,
67+
* // },
6268
* // };
6369
*
6470
* ```

Diff for: clients/client-mediapackagev2/src/commands/UpdateChannelCommand.ts

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export interface UpdateChannelCommandOutput extends UpdateChannelResponse, __Met
4141
* ChannelName: "STRING_VALUE", // required
4242
* ETag: "STRING_VALUE",
4343
* Description: "STRING_VALUE",
44+
* InputSwitchConfiguration: { // InputSwitchConfiguration
45+
* MQCSInputSwitching: true || false,
46+
* },
47+
* OutputHeaderConfiguration: { // OutputHeaderConfiguration
48+
* PublishMQCS: true || false,
49+
* },
4450
* };
4551
* const command = new UpdateChannelCommand(input);
4652
* const response = await client.send(command);
@@ -62,6 +68,12 @@ export interface UpdateChannelCommandOutput extends UpdateChannelResponse, __Met
6268
* // Tags: { // TagMap
6369
* // "<keys>": "STRING_VALUE",
6470
* // },
71+
* // InputSwitchConfiguration: { // InputSwitchConfiguration
72+
* // MQCSInputSwitching: true || false,
73+
* // },
74+
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
75+
* // PublishMQCS: true || false,
76+
* // },
6577
* // };
6678
*
6779
* ```

Diff for: clients/client-mediapackagev2/src/models/models_0.ts

+90-8
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ export const ValidationExceptionType = {
268268
NUM_MANIFESTS_LOW: "NUM_MANIFESTS_LOW",
269269
ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION:
270270
"ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION",
271+
ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING: "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING",
272+
ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION: "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION",
271273
PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES: "PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES",
272274
ROLE_ARN_INVALID_FORMAT: "ROLE_ARN_INVALID_FORMAT",
273275
ROLE_ARN_LENGTH_OUT_OF_RANGE: "ROLE_ARN_LENGTH_OUT_OF_RANGE",
@@ -448,6 +450,18 @@ export interface PutChannelPolicyRequest {
448450
*/
449451
export interface PutChannelPolicyResponse {}
450452

453+
/**
454+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive.</p>
455+
* @public
456+
*/
457+
export interface InputSwitchConfiguration {
458+
/**
459+
* <p>When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
460+
* @public
461+
*/
462+
MQCSInputSwitching?: boolean | undefined;
463+
}
464+
451465
/**
452466
* @public
453467
* @enum
@@ -462,6 +476,18 @@ export const InputType = {
462476
*/
463477
export type InputType = (typeof InputType)[keyof typeof InputType];
464478

479+
/**
480+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN.</p>
481+
* @public
482+
*/
483+
export interface OutputHeaderConfiguration {
484+
/**
485+
* <p>When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
486+
* @public
487+
*/
488+
PublishMQCS?: boolean | undefined;
489+
}
490+
465491
/**
466492
* @public
467493
*/
@@ -507,6 +533,18 @@ export interface CreateChannelRequest {
507533
*/
508534
Description?: string | undefined;
509535

536+
/**
537+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
538+
* @public
539+
*/
540+
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;
541+
542+
/**
543+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
544+
* @public
545+
*/
546+
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
547+
510548
/**
511549
* <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
512550
* <p>
@@ -612,6 +650,18 @@ export interface CreateChannelResponse {
612650
* @public
613651
*/
614652
Tags?: Record<string, string> | undefined;
653+
654+
/**
655+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
656+
* @public
657+
*/
658+
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;
659+
660+
/**
661+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
662+
* @public
663+
*/
664+
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
615665
}
616666

617667
/**
@@ -749,6 +799,18 @@ export interface GetChannelResponse {
749799
* @public
750800
*/
751801
Tags?: Record<string, string> | undefined;
802+
803+
/**
804+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
805+
* @public
806+
*/
807+
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;
808+
809+
/**
810+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
811+
* @public
812+
*/
813+
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
752814
}
753815

754816
/**
@@ -1201,8 +1263,7 @@ export interface CreateHlsManifestConfiguration {
12011263
/**
12021264
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
12031265
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
1204-
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
1205-
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
1266+
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
12061267
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
12071268
* @public
12081269
*/
@@ -1253,8 +1314,7 @@ export interface CreateLowLatencyHlsManifestConfiguration {
12531314
/**
12541315
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
12551316
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
1256-
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
1257-
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
1317+
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
12581318
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
12591319
* @public
12601320
*/
@@ -1825,8 +1885,7 @@ export interface GetHlsManifestConfiguration {
18251885
/**
18261886
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
18271887
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
1828-
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
1829-
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
1888+
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
18301889
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
18311890
* @public
18321891
*/
@@ -1883,8 +1942,7 @@ export interface GetLowLatencyHlsManifestConfiguration {
18831942
/**
18841943
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
18851944
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
1886-
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
1887-
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
1945+
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
18881946
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
18891947
* @public
18901948
*/
@@ -2671,6 +2729,18 @@ export interface UpdateChannelRequest {
26712729
* @public
26722730
*/
26732731
Description?: string | undefined;
2732+
2733+
/**
2734+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
2735+
* @public
2736+
*/
2737+
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;
2738+
2739+
/**
2740+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
2741+
* @public
2742+
*/
2743+
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
26742744
}
26752745

26762746
/**
@@ -2747,6 +2817,18 @@ export interface UpdateChannelResponse {
27472817
* @public
27482818
*/
27492819
Tags?: Record<string, string> | undefined;
2820+
2821+
/**
2822+
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
2823+
* @public
2824+
*/
2825+
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;
2826+
2827+
/**
2828+
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
2829+
* @public
2830+
*/
2831+
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
27502832
}
27512833

27522834
/**

Diff for: clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts

+20
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,10 @@ import {
112112
HarvestedManifests,
113113
HarvesterScheduleConfiguration,
114114
HarvestJob,
115+
InputSwitchConfiguration,
115116
InternalServerException,
116117
OriginEndpointListConfiguration,
118+
OutputHeaderConfiguration,
117119
ResourceNotFoundException,
118120
S3DestinationConfig,
119121
Scte,
@@ -170,7 +172,9 @@ export const se_CreateChannelCommand = async (
170172
take(input, {
171173
ChannelName: [],
172174
Description: [],
175+
InputSwitchConfiguration: (_) => _json(_),
173176
InputType: [],
177+
OutputHeaderConfiguration: (_) => _json(_),
174178
tags: [, (_) => _json(_), `Tags`],
175179
})
176180
);
@@ -670,6 +674,8 @@ export const se_UpdateChannelCommand = async (
670674
body = JSON.stringify(
671675
take(input, {
672676
Description: [],
677+
InputSwitchConfiguration: (_) => _json(_),
678+
OutputHeaderConfiguration: (_) => _json(_),
673679
})
674680
);
675681
b.m("PUT").h(headers).b(body);
@@ -772,8 +778,10 @@ export const de_CreateChannelCommand = async (
772778
Description: __expectString,
773779
ETag: __expectString,
774780
IngestEndpoints: _json,
781+
InputSwitchConfiguration: _json,
775782
InputType: __expectString,
776783
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
784+
OutputHeaderConfiguration: _json,
777785
Tags: _json,
778786
});
779787
Object.assign(contents, doc);
@@ -986,8 +994,10 @@ export const de_GetChannelCommand = async (
986994
Description: __expectString,
987995
ETag: __expectString,
988996
IngestEndpoints: _json,
997+
InputSwitchConfiguration: _json,
989998
InputType: __expectString,
990999
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1000+
OutputHeaderConfiguration: _json,
9911001
Tags: _json,
9921002
});
9931003
Object.assign(contents, doc);
@@ -1339,8 +1349,10 @@ export const de_UpdateChannelCommand = async (
13391349
Description: __expectString,
13401350
ETag: __expectString,
13411351
IngestEndpoints: _json,
1352+
InputSwitchConfiguration: _json,
13421353
InputType: __expectString,
13431354
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1355+
OutputHeaderConfiguration: _json,
13441356
Tags: [, _json, `tags`],
13451357
});
13461358
Object.assign(contents, doc);
@@ -1730,6 +1742,10 @@ const se_HarvesterScheduleConfiguration = (input: HarvesterScheduleConfiguration
17301742
});
17311743
};
17321744

1745+
// se_InputSwitchConfiguration omitted.
1746+
1747+
// se_OutputHeaderConfiguration omitted.
1748+
17331749
// se_S3DestinationConfig omitted.
17341750

17351751
// se_Scte omitted.
@@ -1995,6 +2011,8 @@ const de_HarvestJobsList = (output: any, context: __SerdeContext): HarvestJob[]
19952011

19962012
// de_IngestEndpointList omitted.
19972013

2014+
// de_InputSwitchConfiguration omitted.
2015+
19982016
// de_ListDashManifestConfiguration omitted.
19992017

20002018
// de_ListDashManifests omitted.
@@ -2039,6 +2057,8 @@ const de_OriginEndpointsList = (output: any, context: __SerdeContext): OriginEnd
20392057
return retVal;
20402058
};
20412059

2060+
// de_OutputHeaderConfiguration omitted.
2061+
20422062
// de_S3DestinationConfig omitted.
20432063

20442064
// de_Scte omitted.

0 commit comments

Comments
 (0)