Skip to content

Commit d2920e8

Browse files
author
awstools
committed
feat(client-mediatailor): This release introduces support for SCTE-35 segmentation descriptor messages which can be sent within time signal messages.
1 parent d733a32 commit d2920e8

File tree

3 files changed

+251
-0
lines changed

3 files changed

+251
-0
lines changed

clients/client-mediatailor/src/models/models_0.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { MediaTailorServiceException as __BaseException } from "./MediaTailorSer
55

66
export enum MessageType {
77
SPLICE_INSERT = "SPLICE_INSERT",
8+
TIME_SIGNAL = "TIME_SIGNAL",
89
}
910

1011
/**
@@ -47,6 +48,66 @@ export interface SpliceInsertMessage {
4748
UniqueProgramId?: number;
4849
}
4950

51+
/**
52+
* <p>The <code>segmentation_descriptor</code> message can contain advanced metadata fields, like content identifiers, to convey a wide range of information about the ad break. MediaTailor writes the ad metadata in the egress manifest as part of the <code>EXT-X-DATERANGE</code> or <code>EventStream</code> ad marker's SCTE-35 data.</p>
53+
* <p>
54+
* <code>segmentation_descriptor</code> messages must be sent with the <code>time_signal</code> message type.</p>
55+
* <p>See the <code>segmentation_descriptor()</code> table of the 2022 SCTE-35 specification for more information.</p>
56+
*/
57+
export interface SegmentationDescriptor {
58+
/**
59+
* <p>The Event Identifier to assign to the <code>segmentation_descriptor.segmentation_event_id</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. The default value is 1.</p>
60+
*/
61+
SegmentationEventId?: number;
62+
63+
/**
64+
* <p>The Upid Type to assign to the <code>segmentation_descriptor.segmentation_upid_type</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is 14.</p>
65+
*/
66+
SegmentationUpidType?: number;
67+
68+
/**
69+
* <p>The Upid to assign to the <code>segmentation_descriptor.segmentation_upid</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. The value must be a hexadecimal string containing only the characters 0 though 9 and A through F. The default value is "" (an empty string).</p>
70+
*/
71+
SegmentationUpid?: string;
72+
73+
/**
74+
* <p>The Type Identifier to assign to the <code>segmentation_descriptor.segmentation_type_id</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is 48.</p>
75+
*/
76+
SegmentationTypeId?: number;
77+
78+
/**
79+
* <p>The segment number to assign to the <code>segmentation_descriptor.segment_num</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. The default value is 0.</p>
80+
*/
81+
SegmentNum?: number;
82+
83+
/**
84+
* <p>The number of segments expected, which is assigned to the <code>segmentation_descriptor.segments_expectedS</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. The default value is 0.</p>
85+
*/
86+
SegmentsExpected?: number;
87+
88+
/**
89+
* <p>The sub-segment number to assign to the <code>segmentation_descriptor.sub_segment_num</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The defualt value is null.</p>
90+
*/
91+
SubSegmentNum?: number;
92+
93+
/**
94+
* <p>The number of sub-segments expected, which is assigned to the <code>segmentation_descriptor.sub_segments_expected</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is null.</p>
95+
*/
96+
SubSegmentsExpected?: number;
97+
}
98+
99+
/**
100+
* <p>The SCTE-35 <code>time_signal</code> message can be sent with one or more <code>segmentation_descriptor</code> messages. A <code>time_signal</code> message can be sent only if a single <code>segmentation_descriptor</code> message is sent.</p>
101+
* <p>The <code>time_signal</code> message contains only the <code>splice_time</code> field which is constructed using a given presentation timestamp. When sending a <code>time_signal</code> message, the <code>splice_command_type</code> field in the <code>splice_info_section</code> message is set to 6 (0x06).</p>
102+
* <p>See the <code>time_signal()</code> table of the 2022 SCTE-35 specification for more information.</p>
103+
*/
104+
export interface TimeSignalMessage {
105+
/**
106+
* <p>The configurations for the SCTE-35 <code>segmentation_descriptor</code> message(s) sent with the <code>time_signal</code> message.</p>
107+
*/
108+
SegmentationDescriptors?: SegmentationDescriptor[];
109+
}
110+
50111
/**
51112
* <p>Ad break configuration parameters.</p>
52113
*/
@@ -70,6 +131,13 @@ export interface AdBreak {
70131
* <p>This defines the SCTE-35 <code>splice_insert()</code> message inserted around the ad. For information about using <code>splice_insert()</code>, see the SCTE-35 specficiaiton, section 9.7.3.1.</p>
71132
*/
72133
SpliceInsertMessage?: SpliceInsertMessage;
134+
135+
/**
136+
* <p>Defines the SCTE-35 <code>time_signal</code> message inserted around the ad.</p>
137+
* <p>Programs on a channel's schedule can be configured with one or more ad breaks. You can attach a <code>splice_insert</code> SCTE-35 message to the ad break. This message provides basic metadata about the ad break.</p>
138+
* <p>See section 9.7.4 of the 2022 SCTE-35 specification for more information.</p>
139+
*/
140+
TimeSignalMessage?: TimeSignalMessage;
73141
}
74142

75143
/**
@@ -2738,6 +2806,20 @@ export const SpliceInsertMessageFilterSensitiveLog = (obj: SpliceInsertMessage):
27382806
...obj,
27392807
});
27402808

2809+
/**
2810+
* @internal
2811+
*/
2812+
export const SegmentationDescriptorFilterSensitiveLog = (obj: SegmentationDescriptor): any => ({
2813+
...obj,
2814+
});
2815+
2816+
/**
2817+
* @internal
2818+
*/
2819+
export const TimeSignalMessageFilterSensitiveLog = (obj: TimeSignalMessage): any => ({
2820+
...obj,
2821+
});
2822+
27412823
/**
27422824
* @internal
27432825
*/

clients/client-mediatailor/src/protocols/Aws_restJson1.ts

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ import {
145145
ScheduleConfiguration,
146146
ScheduleEntry,
147147
SecretsManagerAccessTokenConfiguration,
148+
SegmentationDescriptor,
148149
SegmentDeliveryConfiguration,
149150
SlateSource,
150151
SourceLocation,
151152
SpliceInsertMessage,
153+
TimeSignalMessage,
152154
Transition,
153155
VodSource,
154156
} from "../models/models_0";
@@ -3505,6 +3507,9 @@ const serializeAws_restJson1AdBreak = (input: AdBreak, context: __SerdeContext):
35053507
...(input.SpliceInsertMessage != null && {
35063508
SpliceInsertMessage: serializeAws_restJson1SpliceInsertMessage(input.SpliceInsertMessage, context),
35073509
}),
3510+
...(input.TimeSignalMessage != null && {
3511+
TimeSignalMessage: serializeAws_restJson1TimeSignalMessage(input.TimeSignalMessage, context),
3512+
}),
35083513
};
35093514
};
35103515

@@ -3700,6 +3705,30 @@ const serializeAws_restJson1SecretsManagerAccessTokenConfiguration = (
37003705
};
37013706
};
37023707

3708+
const serializeAws_restJson1SegmentationDescriptor = (input: SegmentationDescriptor, context: __SerdeContext): any => {
3709+
return {
3710+
...(input.SegmentNum != null && { SegmentNum: input.SegmentNum }),
3711+
...(input.SegmentationEventId != null && { SegmentationEventId: input.SegmentationEventId }),
3712+
...(input.SegmentationTypeId != null && { SegmentationTypeId: input.SegmentationTypeId }),
3713+
...(input.SegmentationUpid != null && { SegmentationUpid: input.SegmentationUpid }),
3714+
...(input.SegmentationUpidType != null && { SegmentationUpidType: input.SegmentationUpidType }),
3715+
...(input.SegmentsExpected != null && { SegmentsExpected: input.SegmentsExpected }),
3716+
...(input.SubSegmentNum != null && { SubSegmentNum: input.SubSegmentNum }),
3717+
...(input.SubSegmentsExpected != null && { SubSegmentsExpected: input.SubSegmentsExpected }),
3718+
};
3719+
};
3720+
3721+
const serializeAws_restJson1SegmentationDescriptorList = (
3722+
input: SegmentationDescriptor[],
3723+
context: __SerdeContext
3724+
): any => {
3725+
return input
3726+
.filter((e: any) => e != null)
3727+
.map((entry) => {
3728+
return serializeAws_restJson1SegmentationDescriptor(entry, context);
3729+
});
3730+
};
3731+
37033732
const serializeAws_restJson1SegmentDeliveryConfiguration = (
37043733
input: SegmentDeliveryConfiguration,
37053734
context: __SerdeContext
@@ -3726,6 +3755,14 @@ const serializeAws_restJson1SpliceInsertMessage = (input: SpliceInsertMessage, c
37263755
};
37273756
};
37283757

3758+
const serializeAws_restJson1TimeSignalMessage = (input: TimeSignalMessage, context: __SerdeContext): any => {
3759+
return {
3760+
...(input.SegmentationDescriptors != null && {
3761+
SegmentationDescriptors: serializeAws_restJson1SegmentationDescriptorList(input.SegmentationDescriptors, context),
3762+
}),
3763+
};
3764+
};
3765+
37293766
const serializeAws_restJson1Transition = (input: Transition, context: __SerdeContext): any => {
37303767
return {
37313768
...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }),
@@ -3935,6 +3972,10 @@ const deserializeAws_restJson1AdBreak = (output: any, context: __SerdeContext):
39353972
output.SpliceInsertMessage != null
39363973
? deserializeAws_restJson1SpliceInsertMessage(output.SpliceInsertMessage, context)
39373974
: undefined,
3975+
TimeSignalMessage:
3976+
output.TimeSignalMessage != null
3977+
? deserializeAws_restJson1TimeSignalMessage(output.TimeSignalMessage, context)
3978+
: undefined,
39383979
} as any;
39393980
};
39403981

@@ -4303,6 +4344,37 @@ const deserializeAws_restJson1SecretsManagerAccessTokenConfiguration = (
43034344
} as any;
43044345
};
43054346

4347+
const deserializeAws_restJson1SegmentationDescriptor = (
4348+
output: any,
4349+
context: __SerdeContext
4350+
): SegmentationDescriptor => {
4351+
return {
4352+
SegmentNum: __expectInt32(output.SegmentNum),
4353+
SegmentationEventId: __expectInt32(output.SegmentationEventId),
4354+
SegmentationTypeId: __expectInt32(output.SegmentationTypeId),
4355+
SegmentationUpid: __expectString(output.SegmentationUpid),
4356+
SegmentationUpidType: __expectInt32(output.SegmentationUpidType),
4357+
SegmentsExpected: __expectInt32(output.SegmentsExpected),
4358+
SubSegmentNum: __expectInt32(output.SubSegmentNum),
4359+
SubSegmentsExpected: __expectInt32(output.SubSegmentsExpected),
4360+
} as any;
4361+
};
4362+
4363+
const deserializeAws_restJson1SegmentationDescriptorList = (
4364+
output: any,
4365+
context: __SerdeContext
4366+
): SegmentationDescriptor[] => {
4367+
const retVal = (output || [])
4368+
.filter((e: any) => e != null)
4369+
.map((entry: any) => {
4370+
if (entry === null) {
4371+
return null as any;
4372+
}
4373+
return deserializeAws_restJson1SegmentationDescriptor(entry, context);
4374+
});
4375+
return retVal;
4376+
};
4377+
43064378
const deserializeAws_restJson1SegmentDeliveryConfiguration = (
43074379
output: any,
43084380
context: __SerdeContext
@@ -4364,6 +4436,15 @@ const deserializeAws_restJson1SpliceInsertMessage = (output: any, context: __Ser
43644436
} as any;
43654437
};
43664438

4439+
const deserializeAws_restJson1TimeSignalMessage = (output: any, context: __SerdeContext): TimeSignalMessage => {
4440+
return {
4441+
SegmentationDescriptors:
4442+
output.SegmentationDescriptors != null
4443+
? deserializeAws_restJson1SegmentationDescriptorList(output.SegmentationDescriptors, context)
4444+
: undefined,
4445+
} as any;
4446+
};
4447+
43674448
const deserializeAws_restJson1VodSource = (output: any, context: __SerdeContext): VodSource => {
43684449
return {
43694450
Arn: __expectString(output.Arn),

codegen/sdk-codegen/aws-models/mediatailor.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
"traits": {
6666
"smithy.api#documentation": "<p>This defines the SCTE-35 <code>splice_insert()</code> message inserted around the ad. For information about using <code>splice_insert()</code>, see the SCTE-35 specficiaiton, section 9.7.3.1.</p>"
6767
}
68+
},
69+
"TimeSignalMessage": {
70+
"target": "com.amazonaws.mediatailor#TimeSignalMessage",
71+
"traits": {
72+
"smithy.api#documentation": "<p>Defines the SCTE-35 <code>time_signal</code> message inserted around the ad.</p>\n <p>Programs on a channel's schedule can be configured with one or more ad breaks. You can attach a <code>splice_insert</code> SCTE-35 message to the ad break. This message provides basic metadata about the ad break.</p>\n <p>See section 9.7.4 of the 2022 SCTE-35 specification for more information.</p>"
73+
}
6874
}
6975
},
7076
"traits": {
@@ -4105,6 +4111,12 @@
41054111
"traits": {
41064112
"smithy.api#enumValue": "SPLICE_INSERT"
41074113
}
4114+
},
4115+
"TIME_SIGNAL": {
4116+
"target": "smithy.api#Unit",
4117+
"traits": {
4118+
"smithy.api#enumValue": "TIME_SIGNAL"
4119+
}
41084120
}
41094121
}
41104122
},
@@ -5051,6 +5063,68 @@
50515063
"smithy.api#documentation": "<p>The segment delivery configuration settings.</p>"
50525064
}
50535065
},
5066+
"com.amazonaws.mediatailor#SegmentationDescriptor": {
5067+
"type": "structure",
5068+
"members": {
5069+
"SegmentationEventId": {
5070+
"target": "smithy.api#Integer",
5071+
"traits": {
5072+
"smithy.api#documentation": "<p>The Event Identifier to assign to the <code>segmentation_descriptor.segmentation_event_id</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. The default value is 1.</p>"
5073+
}
5074+
},
5075+
"SegmentationUpidType": {
5076+
"target": "smithy.api#Integer",
5077+
"traits": {
5078+
"smithy.api#documentation": "<p>The Upid Type to assign to the <code>segmentation_descriptor.segmentation_upid_type</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is 14.</p>"
5079+
}
5080+
},
5081+
"SegmentationUpid": {
5082+
"target": "smithy.api#String",
5083+
"traits": {
5084+
"smithy.api#documentation": "<p>The Upid to assign to the <code>segmentation_descriptor.segmentation_upid</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. The value must be a hexadecimal string containing only the characters 0 though 9 and A through F. The default value is \"\" (an empty string).</p>"
5085+
}
5086+
},
5087+
"SegmentationTypeId": {
5088+
"target": "smithy.api#Integer",
5089+
"traits": {
5090+
"smithy.api#documentation": "<p>The Type Identifier to assign to the <code>segmentation_descriptor.segmentation_type_id</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is 48.</p>"
5091+
}
5092+
},
5093+
"SegmentNum": {
5094+
"target": "smithy.api#Integer",
5095+
"traits": {
5096+
"smithy.api#documentation": "<p>The segment number to assign to the <code>segmentation_descriptor.segment_num</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. The default value is 0.</p>"
5097+
}
5098+
},
5099+
"SegmentsExpected": {
5100+
"target": "smithy.api#Integer",
5101+
"traits": {
5102+
"smithy.api#documentation": "<p>The number of segments expected, which is assigned to the <code>segmentation_descriptor.segments_expectedS</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification Values must be between 0 and 256, inclusive. The default value is 0.</p>"
5103+
}
5104+
},
5105+
"SubSegmentNum": {
5106+
"target": "smithy.api#Integer",
5107+
"traits": {
5108+
"smithy.api#documentation": "<p>The sub-segment number to assign to the <code>segmentation_descriptor.sub_segment_num</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The defualt value is null.</p>"
5109+
}
5110+
},
5111+
"SubSegmentsExpected": {
5112+
"target": "smithy.api#Integer",
5113+
"traits": {
5114+
"smithy.api#documentation": "<p>The number of sub-segments expected, which is assigned to the <code>segmentation_descriptor.sub_segments_expected</code> message, as defined in section 10.3.3.1 of the 2022 SCTE-35 specification. Values must be between 0 and 256, inclusive. The default value is null.</p>"
5115+
}
5116+
}
5117+
},
5118+
"traits": {
5119+
"smithy.api#documentation": "<p>The <code>segmentation_descriptor</code> message can contain advanced metadata fields, like content identifiers, to convey a wide range of information about the ad break. MediaTailor writes the ad metadata in the egress manifest as part of the <code>EXT-X-DATERANGE</code> or <code>EventStream</code> ad marker's SCTE-35 data.</p>\n <p>\n <code>segmentation_descriptor</code> messages must be sent with the <code>time_signal</code> message type.</p>\n <p>See the <code>segmentation_descriptor()</code> table of the 2022 SCTE-35 specification for more information.</p>"
5120+
}
5121+
},
5122+
"com.amazonaws.mediatailor#SegmentationDescriptorList": {
5123+
"type": "list",
5124+
"member": {
5125+
"target": "com.amazonaws.mediatailor#SegmentationDescriptor"
5126+
}
5127+
},
50545128
"com.amazonaws.mediatailor#SlateSource": {
50555129
"type": "structure",
50565130
"members": {
@@ -5337,6 +5411,20 @@
53375411
}
53385412
}
53395413
},
5414+
"com.amazonaws.mediatailor#TimeSignalMessage": {
5415+
"type": "structure",
5416+
"members": {
5417+
"SegmentationDescriptors": {
5418+
"target": "com.amazonaws.mediatailor#SegmentationDescriptorList",
5419+
"traits": {
5420+
"smithy.api#documentation": "<p>The configurations for the SCTE-35 <code>segmentation_descriptor</code> message(s) sent with the <code>time_signal</code> message.</p>"
5421+
}
5422+
}
5423+
},
5424+
"traits": {
5425+
"smithy.api#documentation": "<p>The SCTE-35 <code>time_signal</code> message can be sent with one or more <code>segmentation_descriptor</code> messages. A <code>time_signal</code> message can be sent only if a single <code>segmentation_descriptor</code> message is sent.</p>\n <p>The <code>time_signal</code> message contains only the <code>splice_time</code> field which is constructed using a given presentation timestamp. When sending a <code>time_signal</code> message, the <code>splice_command_type</code> field in the <code>splice_info_section</code> message is set to 6 (0x06).</p>\n <p>See the <code>time_signal()</code> table of the 2022 SCTE-35 specification for more information.</p>"
5426+
}
5427+
},
53405428
"com.amazonaws.mediatailor#Transition": {
53415429
"type": "structure",
53425430
"members": {

0 commit comments

Comments
 (0)