Skip to content

Commit

Permalink
feat(client-medialive): Link devices now support buffer size (latency…
Browse files Browse the repository at this point in the history
…) configuration. A higher latency value means a longer delay in transmitting from the device to MediaLive, but improved resiliency. A lower latency value means a shorter delay, but less resiliency.
  • Loading branch information
awstools committed Dec 9, 2022
1 parent fee4186 commit e581155
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 25 deletions.
9 changes: 0 additions & 9 deletions clients/client-medialive/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@ export const ruleSet: RuleSetObject = {
},
],
},
{
fn: "parseURL",
argv: [
{
ref: "Endpoint",
},
],
assign: "url",
},
],
type: "tree",
rules: [
Expand Down
11 changes: 11 additions & 0 deletions clients/client-medialive/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,11 @@ export interface InputDeviceHdSettings {
* The width of the video source, in pixels.
*/
Width?: number;

/**
* The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.
*/
LatencyMs?: number;
}

export enum InputDeviceIpScheme {
Expand Down Expand Up @@ -2704,6 +2709,7 @@ export interface InputDeviceNetworkSettings {

export enum InputDeviceType {
HD = "HD",
UHD = "UHD",
}

/**
Expand Down Expand Up @@ -2749,6 +2755,11 @@ export interface InputDeviceUhdSettings {
* The width of the video source, in pixels.
*/
Width?: number;

/**
* The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.
*/
LatencyMs?: number;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions clients/client-medialive/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5226,6 +5226,11 @@ export interface InputDeviceConfigurableSettings {
* The maximum bitrate in bits per second. Set a value here to throttle the bitrate of the source video.
*/
MaxBitrate?: number;

/**
* The Link device's buffer size (latency) in milliseconds (ms).
*/
LatencyMs?: number;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-medialive/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7882,6 +7882,7 @@ const serializeAws_restJson1InputDeviceConfigurableSettings = (
): any => {
return {
...(input.ConfiguredInput != null && { configuredInput: input.ConfiguredInput }),
...(input.LatencyMs != null && { latencyMs: input.LatencyMs }),
...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }),
};
};
Expand Down Expand Up @@ -11178,6 +11179,7 @@ const deserializeAws_restJson1InputDeviceHdSettings = (output: any, context: __S
DeviceState: __expectString(output.deviceState),
Framerate: __limitedParseDouble(output.framerate),
Height: __expectInt32(output.height),
LatencyMs: __expectInt32(output.latencyMs),
MaxBitrate: __expectInt32(output.maxBitrate),
ScanType: __expectString(output.scanType),
Width: __expectInt32(output.width),
Expand Down Expand Up @@ -11240,6 +11242,7 @@ const deserializeAws_restJson1InputDeviceUhdSettings = (
DeviceState: __expectString(output.deviceState),
Framerate: __limitedParseDouble(output.framerate),
Height: __expectInt32(output.height),
LatencyMs: __expectInt32(output.latencyMs),
MaxBitrate: __expectInt32(output.maxBitrate),
ScanType: __expectString(output.scanType),
Width: __expectInt32(output.width),
Expand Down
101 changes: 85 additions & 16 deletions codegen/sdk-codegen/aws-models/medialive.json
Original file line number Diff line number Diff line change
Expand Up @@ -12215,6 +12215,14 @@
"smithy.api#documentation": "The maximum bitrate in bits per second. Set a value here to throttle the bitrate of the source video.",
"smithy.api#jsonName": "maxBitrate"
}
},
"LatencyMs": {
"target": "com.amazonaws.medialive#__integer",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms).",
"smithy.api#jsonName": "latencyMs"
}
}
},
"traits": {
Expand Down Expand Up @@ -12329,6 +12337,14 @@
"smithy.api#documentation": "The width of the video source, in pixels.",
"smithy.api#jsonName": "width"
}
},
"LatencyMs": {
"target": "com.amazonaws.medialive#__integer",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.",
"smithy.api#jsonName": "latencyMs"
}
}
},
"traits": {
Expand Down Expand Up @@ -12595,6 +12611,12 @@
"traits": {
"smithy.api#enumValue": "HD"
}
},
"UHD": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "UHD"
}
}
},
"traits": {
Expand Down Expand Up @@ -12663,6 +12685,14 @@
"smithy.api#documentation": "The width of the video source, in pixels.",
"smithy.api#jsonName": "width"
}
},
"LatencyMs": {
"target": "com.amazonaws.medialive#__integer",
"traits": {
"smithy.api#default": 0,
"smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.",
"smithy.api#jsonName": "latencyMs"
}
}
},
"traits": {
Expand Down Expand Up @@ -15959,15 +15989,6 @@
"ref": "Endpoint"
}
]
},
{
"fn": "parseURL",
"argv": [
{
"ref": "Endpoint"
}
],
"assign": "url"
}
],
"type": "tree",
Expand Down Expand Up @@ -16228,8 +16249,8 @@
"error": "FIPS and DualStack are enabled, but this partition does not support one or both"
},
"params": {
"UseDualStack": true,
"UseFIPS": true,
"UseDualStack": true,
"Region": "us-iso-east-1"
}
},
Expand All @@ -16241,8 +16262,8 @@
}
},
"params": {
"UseDualStack": false,
"UseFIPS": true,
"UseDualStack": false,
"Region": "us-iso-east-1"
}
},
Expand All @@ -16252,8 +16273,8 @@
"error": "DualStack is enabled but this partition does not support DualStack"
},
"params": {
"UseDualStack": true,
"UseFIPS": false,
"UseDualStack": true,
"Region": "us-iso-east-1"
}
},
Expand All @@ -16265,11 +16286,59 @@
}
},
"params": {
"UseDualStack": false,
"UseFIPS": false,
"UseDualStack": false,
"Region": "us-iso-east-1"
}
},
{
"documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
"expect": {
"error": "FIPS and DualStack are enabled, but this partition does not support one or both"
},
"params": {
"UseFIPS": true,
"UseDualStack": true,
"Region": "us-isob-east-1"
}
},
{
"documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
"expect": {
"endpoint": {
"url": "https://medialive-fips.us-isob-east-1.sc2s.sgov.gov"
}
},
"params": {
"UseFIPS": true,
"UseDualStack": false,
"Region": "us-isob-east-1"
}
},
{
"documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
"expect": {
"error": "DualStack is enabled but this partition does not support DualStack"
},
"params": {
"UseFIPS": false,
"UseDualStack": true,
"Region": "us-isob-east-1"
}
},
{
"documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
"expect": {
"endpoint": {
"url": "https://medialive.us-isob-east-1.sc2s.sgov.gov"
}
},
"params": {
"UseFIPS": false,
"UseDualStack": false,
"Region": "us-isob-east-1"
}
},
{
"documentation": "For custom endpoint with fips disabled and dualstack disabled",
"expect": {
Expand All @@ -16278,8 +16347,8 @@
}
},
"params": {
"UseDualStack": false,
"UseFIPS": false,
"UseDualStack": false,
"Region": "us-east-1",
"Endpoint": "https://example.com"
}
Expand All @@ -16290,8 +16359,8 @@
"error": "Invalid Configuration: FIPS and custom endpoint are not supported"
},
"params": {
"UseDualStack": false,
"UseFIPS": true,
"UseDualStack": false,
"Region": "us-east-1",
"Endpoint": "https://example.com"
}
Expand All @@ -16302,8 +16371,8 @@
"error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
},
"params": {
"UseDualStack": true,
"UseFIPS": false,
"UseDualStack": true,
"Region": "us-east-1",
"Endpoint": "https://example.com"
}
Expand Down

0 comments on commit e581155

Please sign in to comment.