Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.351.1"
"${LATEST}": "3.351.2"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
1 change: 1 addition & 0 deletions src/Service/MediaConvert/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- AWS api-change: This release includes support for embedding and signing C2PA content credentials in MP4 outputs.
- AWS api-change: This release adds a new SPECIFIED_OPTIMAL option for handling DDS when using DVB-Sub with high resolution video.
- AWS api-change: This release expands the range of supported audio outputs to include xHE, 192khz FLAC and the deprecation of dual mono for AC3.
- AWS api-change: This release adds support for TAMS server integration with MediaConvert inputs.

## 1.9.0

Expand Down
27 changes: 27 additions & 0 deletions src/Service/MediaConvert/src/Enum/TamsGapHandling.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace AsyncAws\MediaConvert\Enum;

/**
* Specify how MediaConvert handles gaps between media segments in your TAMS source. Gaps can occur in live streams due
* to network issues or other interruptions. Choose from the following options: * Skip gaps - Default. Skip over gaps
* and join segments together. This creates a continuous output with no blank frames, but may cause timeline
* discontinuities. * Fill with black - Insert black frames to fill gaps between segments. This maintains timeline
* continuity but adds black frames where content is missing. * Hold last frame - Repeat the last frame before a gap
* until the next segment begins. This maintains visual continuity during gaps.
*/
final class TamsGapHandling
{
public const FILL_WITH_BLACK = 'FILL_WITH_BLACK';
public const HOLD_LAST_FRAME = 'HOLD_LAST_FRAME';
public const SKIP_GAPS = 'SKIP_GAPS';

public static function exists(string $value): bool
{
return isset([
self::FILL_WITH_BLACK => true,
self::HOLD_LAST_FRAME => true,
self::SKIP_GAPS => true,
][$value]);
}
}
12 changes: 12 additions & 0 deletions src/Service/MediaConvert/src/Result/CreateJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
use AsyncAws\MediaConvert\ValueObject\Input;
use AsyncAws\MediaConvert\ValueObject\InputClipping;
use AsyncAws\MediaConvert\ValueObject\InputDecryptionSettings;
use AsyncAws\MediaConvert\ValueObject\InputTamsSettings;
use AsyncAws\MediaConvert\ValueObject\InputVideoGenerator;
use AsyncAws\MediaConvert\ValueObject\InsertableImage;
use AsyncAws\MediaConvert\ValueObject\Job;
Expand Down Expand Up @@ -1352,6 +1353,7 @@ private function populateResultInput(array $json): Input
'ProgramNumber' => isset($json['programNumber']) ? (int) $json['programNumber'] : null,
'PsiControl' => isset($json['psiControl']) ? (string) $json['psiControl'] : null,
'SupplementalImps' => !isset($json['supplementalImps']) ? null : $this->populateResult__listOf__stringPatternS3ASSETMAPXml($json['supplementalImps']),
'TamsSettings' => empty($json['tamsSettings']) ? null : $this->populateResultInputTamsSettings($json['tamsSettings']),
'TimecodeSource' => isset($json['timecodeSource']) ? (string) $json['timecodeSource'] : null,
'TimecodeStart' => isset($json['timecodeStart']) ? (string) $json['timecodeStart'] : null,
'VideoGenerator' => empty($json['videoGenerator']) ? null : $this->populateResultInputVideoGenerator($json['videoGenerator']),
Expand All @@ -1378,6 +1380,16 @@ private function populateResultInputDecryptionSettings(array $json): InputDecryp
]);
}

private function populateResultInputTamsSettings(array $json): InputTamsSettings
{
return new InputTamsSettings([
'AuthConnectionArn' => isset($json['authConnectionArn']) ? (string) $json['authConnectionArn'] : null,
'GapHandling' => isset($json['gapHandling']) ? (string) $json['gapHandling'] : null,
'SourceId' => isset($json['sourceId']) ? (string) $json['sourceId'] : null,
'Timerange' => isset($json['timerange']) ? (string) $json['timerange'] : null,
]);
}

private function populateResultInputVideoGenerator(array $json): InputVideoGenerator
{
return new InputVideoGenerator([
Expand Down
12 changes: 12 additions & 0 deletions src/Service/MediaConvert/src/Result/GetJobResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
use AsyncAws\MediaConvert\ValueObject\Input;
use AsyncAws\MediaConvert\ValueObject\InputClipping;
use AsyncAws\MediaConvert\ValueObject\InputDecryptionSettings;
use AsyncAws\MediaConvert\ValueObject\InputTamsSettings;
use AsyncAws\MediaConvert\ValueObject\InputVideoGenerator;
use AsyncAws\MediaConvert\ValueObject\InsertableImage;
use AsyncAws\MediaConvert\ValueObject\Job;
Expand Down Expand Up @@ -1352,6 +1353,7 @@ private function populateResultInput(array $json): Input
'ProgramNumber' => isset($json['programNumber']) ? (int) $json['programNumber'] : null,
'PsiControl' => isset($json['psiControl']) ? (string) $json['psiControl'] : null,
'SupplementalImps' => !isset($json['supplementalImps']) ? null : $this->populateResult__listOf__stringPatternS3ASSETMAPXml($json['supplementalImps']),
'TamsSettings' => empty($json['tamsSettings']) ? null : $this->populateResultInputTamsSettings($json['tamsSettings']),
'TimecodeSource' => isset($json['timecodeSource']) ? (string) $json['timecodeSource'] : null,
'TimecodeStart' => isset($json['timecodeStart']) ? (string) $json['timecodeStart'] : null,
'VideoGenerator' => empty($json['videoGenerator']) ? null : $this->populateResultInputVideoGenerator($json['videoGenerator']),
Expand All @@ -1378,6 +1380,16 @@ private function populateResultInputDecryptionSettings(array $json): InputDecryp
]);
}

private function populateResultInputTamsSettings(array $json): InputTamsSettings
{
return new InputTamsSettings([
'AuthConnectionArn' => isset($json['authConnectionArn']) ? (string) $json['authConnectionArn'] : null,
'GapHandling' => isset($json['gapHandling']) ? (string) $json['gapHandling'] : null,
'SourceId' => isset($json['sourceId']) ? (string) $json['sourceId'] : null,
'Timerange' => isset($json['timerange']) ? (string) $json['timerange'] : null,
]);
}

private function populateResultInputVideoGenerator(array $json): InputVideoGenerator
{
return new InputVideoGenerator([
Expand Down
12 changes: 12 additions & 0 deletions src/Service/MediaConvert/src/Result/ListJobsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
use AsyncAws\MediaConvert\ValueObject\Input;
use AsyncAws\MediaConvert\ValueObject\InputClipping;
use AsyncAws\MediaConvert\ValueObject\InputDecryptionSettings;
use AsyncAws\MediaConvert\ValueObject\InputTamsSettings;
use AsyncAws\MediaConvert\ValueObject\InputVideoGenerator;
use AsyncAws\MediaConvert\ValueObject\InsertableImage;
use AsyncAws\MediaConvert\ValueObject\Job;
Expand Down Expand Up @@ -1419,6 +1420,7 @@ private function populateResultInput(array $json): Input
'ProgramNumber' => isset($json['programNumber']) ? (int) $json['programNumber'] : null,
'PsiControl' => isset($json['psiControl']) ? (string) $json['psiControl'] : null,
'SupplementalImps' => !isset($json['supplementalImps']) ? null : $this->populateResult__listOf__stringPatternS3ASSETMAPXml($json['supplementalImps']),
'TamsSettings' => empty($json['tamsSettings']) ? null : $this->populateResultInputTamsSettings($json['tamsSettings']),
'TimecodeSource' => isset($json['timecodeSource']) ? (string) $json['timecodeSource'] : null,
'TimecodeStart' => isset($json['timecodeStart']) ? (string) $json['timecodeStart'] : null,
'VideoGenerator' => empty($json['videoGenerator']) ? null : $this->populateResultInputVideoGenerator($json['videoGenerator']),
Expand All @@ -1445,6 +1447,16 @@ private function populateResultInputDecryptionSettings(array $json): InputDecryp
]);
}

private function populateResultInputTamsSettings(array $json): InputTamsSettings
{
return new InputTamsSettings([
'AuthConnectionArn' => isset($json['authConnectionArn']) ? (string) $json['authConnectionArn'] : null,
'GapHandling' => isset($json['gapHandling']) ? (string) $json['gapHandling'] : null,
'SourceId' => isset($json['sourceId']) ? (string) $json['sourceId'] : null,
'Timerange' => isset($json['timerange']) ? (string) $json['timerange'] : null,
]);
}

private function populateResultInputVideoGenerator(array $json): InputVideoGenerator
{
return new InputVideoGenerator([
Expand Down
36 changes: 32 additions & 4 deletions src/Service/MediaConvert/src/ValueObject/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,14 @@ final class Input

/**
* Specify the source file for your transcoding job. You can use multiple inputs in a single job. The service
* concatenates these inputs, in the order that you specify them in the job, to create the outputs. If your input format
* is IMF, specify your input by providing the path to your CPL. For example, "s3://bucket/vf/cpl.xml". If the CPL is in
* an incomplete IMP, make sure to use *Supplemental IMPs* to specify any supplemental IMPs that contain assets
* referenced by the CPL.
* concatenates these inputs, in the order that you specify them in the job, to create the outputs. For standard inputs,
* provide the path to your S3, HTTP, or HTTPS source file. For example, s3://amzn-s3-demo-bucket/input.mp4 for an
* Amazon S3 input or https://example.com/input.mp4 for an HTTPS input. For TAMS inputs, specify the HTTPS endpoint of
* your TAMS server. For example, https://tams-server.example.com . When you do, also specify Source ID, Timerange, GAP
* handling, and the Authorization connection ARN under TAMS settings. (Don't include these parameters in the Input file
* URL.) For IMF inputs, specify your input by providing the path to your CPL. For example,
* s3://amzn-s3-demo-bucket/vf/cpl.xml . If the CPL is in an incomplete IMP, make sure to use Supplemental IMPsto
* specify any supplemental IMPs that contain assets referenced by the CPL.
*
* @var string|null
*/
Expand Down Expand Up @@ -220,6 +224,19 @@ final class Input
*/
private $supplementalImps;

/**
* Specify a Time Addressable Media Store (TAMS) server as an input source. TAMS is an open-source API specification
* that provides access to time-segmented media content. Use TAMS to retrieve specific time ranges from live or archived
* media streams. When you specify TAMS settings, MediaConvert connects to your TAMS server, retrieves the media
* segments for your specified time range, and processes them as a single input. This enables workflows like extracting
* clips from live streams or processing specific portions of archived content. To use TAMS, you must: 1. Have access to
* a TAMS-compliant server 2. Specify the server URL in the Input file URL field 3. Provide the required SourceId and
* Timerange parameters 4. Configure authentication, if your TAMS server requires it.
*
* @var InputTamsSettings|null
*/
private $tamsSettings;

/**
* Use this Timecode source setting, located under the input settings, to specify how the service counts input video
* frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as
Expand Down Expand Up @@ -290,6 +307,7 @@ final class Input
* ProgramNumber?: null|int,
* PsiControl?: null|InputPsiControl::*,
* SupplementalImps?: null|string[],
* TamsSettings?: null|InputTamsSettings|array,
* TimecodeSource?: null|InputTimecodeSource::*,
* TimecodeStart?: null|string,
* VideoGenerator?: null|InputVideoGenerator|array,
Expand Down Expand Up @@ -320,6 +338,7 @@ public function __construct(array $input)
$this->programNumber = $input['ProgramNumber'] ?? null;
$this->psiControl = $input['PsiControl'] ?? null;
$this->supplementalImps = $input['SupplementalImps'] ?? null;
$this->tamsSettings = isset($input['TamsSettings']) ? InputTamsSettings::create($input['TamsSettings']) : null;
$this->timecodeSource = $input['TimecodeSource'] ?? null;
$this->timecodeStart = $input['TimecodeStart'] ?? null;
$this->videoGenerator = isset($input['VideoGenerator']) ? InputVideoGenerator::create($input['VideoGenerator']) : null;
Expand Down Expand Up @@ -350,6 +369,7 @@ public function __construct(array $input)
* ProgramNumber?: null|int,
* PsiControl?: null|InputPsiControl::*,
* SupplementalImps?: null|string[],
* TamsSettings?: null|InputTamsSettings|array,
* TimecodeSource?: null|InputTimecodeSource::*,
* TimecodeStart?: null|string,
* VideoGenerator?: null|InputVideoGenerator|array,
Expand Down Expand Up @@ -503,6 +523,11 @@ public function getSupplementalImps(): array
return $this->supplementalImps ?? [];
}

public function getTamsSettings(): ?InputTamsSettings
{
return $this->tamsSettings;
}

/**
* @return InputTimecodeSource::*|null
*/
Expand Down Expand Up @@ -659,6 +684,9 @@ public function requestBody(): array
$payload['supplementalImps'][$index] = $listValue;
}
}
if (null !== $v = $this->tamsSettings) {
$payload['tamsSettings'] = $v->requestBody();
}
if (null !== $v = $this->timecodeSource) {
if (!InputTimecodeSource::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "timecodeSource" for "%s". The value "%s" is not a valid "InputTimecodeSource".', __CLASS__, $v));
Expand Down
139 changes: 139 additions & 0 deletions src/Service/MediaConvert/src/ValueObject/InputTamsSettings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?php

namespace AsyncAws\MediaConvert\ValueObject;

use AsyncAws\Core\Exception\InvalidArgument;
use AsyncAws\MediaConvert\Enum\TamsGapHandling;

/**
* Specify a Time Addressable Media Store (TAMS) server as an input source. TAMS is an open-source API specification
* that provides access to time-segmented media content. Use TAMS to retrieve specific time ranges from live or archived
* media streams. When you specify TAMS settings, MediaConvert connects to your TAMS server, retrieves the media
* segments for your specified time range, and processes them as a single input. This enables workflows like extracting
* clips from live streams or processing specific portions of archived content. To use TAMS, you must: 1. Have access to
* a TAMS-compliant server 2. Specify the server URL in the Input file URL field 3. Provide the required SourceId and
* Timerange parameters 4. Configure authentication, if your TAMS server requires it.
*/
final class InputTamsSettings
{
/**
* Specify the ARN (Amazon Resource Name) of an EventBridge Connection to authenticate with your TAMS server. The
* EventBridge Connection stores your authentication credentials securely. MediaConvert assumes your job's IAM role to
* access this connection, so ensure the role has the events:RetrieveConnectionCredentials,
* secretsmanager:DescribeSecret, and secretsmanager:GetSecretValue permissions. Format:
* arn:aws:events:region:account-id:connection/connection-name/unique-id.
*
* @var string|null
*/
private $authConnectionArn;

/**
* Specify how MediaConvert handles gaps between media segments in your TAMS source. Gaps can occur in live streams due
* to network issues or other interruptions. Choose from the following options: * Skip gaps - Default. Skip over gaps
* and join segments together. This creates a continuous output with no blank frames, but may cause timeline
* discontinuities. * Fill with black - Insert black frames to fill gaps between segments. This maintains timeline
* continuity but adds black frames where content is missing. * Hold last frame - Repeat the last frame before a gap
* until the next segment begins. This maintains visual continuity during gaps.
*
* @var TamsGapHandling::*|null
*/
private $gapHandling;

/**
* Specify the unique identifier for the media source in your TAMS server. MediaConvert uses this source ID to locate
* the appropriate flows containing the media segments you want to process. The source ID corresponds to a specific
* media source registered in your TAMS server. This source must be of type urn:x-nmos:format:multi, and can can
* reference multiple flows for audio, video, or combined audio/video content. MediaConvert automatically selects the
* highest quality flows available for your job. This setting is required when include TAMS settings in your job.
*
* @var string|null
*/
private $sourceId;

/**
* Specify the time range of media segments to retrieve from your TAMS server. MediaConvert fetches only the segments
* that fall within this range. Use the format specified by your TAMS server implementation. This must be two timestamp
* values with the format {sign?}{seconds}:{nanoseconds}, separated by an underscore, surrounded by either parentheses
* or square brackets. Example: [15:0_35:0) This setting is required when include TAMS settings in your job.
*
* @var string|null
*/
private $timerange;

/**
* @param array{
* AuthConnectionArn?: null|string,
* GapHandling?: null|TamsGapHandling::*,
* SourceId?: null|string,
* Timerange?: null|string,
* } $input
*/
public function __construct(array $input)
{
$this->authConnectionArn = $input['AuthConnectionArn'] ?? null;
$this->gapHandling = $input['GapHandling'] ?? null;
$this->sourceId = $input['SourceId'] ?? null;
$this->timerange = $input['Timerange'] ?? null;
}

/**
* @param array{
* AuthConnectionArn?: null|string,
* GapHandling?: null|TamsGapHandling::*,
* SourceId?: null|string,
* Timerange?: null|string,
* }|InputTamsSettings $input
*/
public static function create($input): self
{
return $input instanceof self ? $input : new self($input);
}

public function getAuthConnectionArn(): ?string
{
return $this->authConnectionArn;
}

/**
* @return TamsGapHandling::*|null
*/
public function getGapHandling(): ?string
{
return $this->gapHandling;
}

public function getSourceId(): ?string
{
return $this->sourceId;
}

public function getTimerange(): ?string
{
return $this->timerange;
}

/**
* @internal
*/
public function requestBody(): array
{
$payload = [];
if (null !== $v = $this->authConnectionArn) {
$payload['authConnectionArn'] = $v;
}
if (null !== $v = $this->gapHandling) {
if (!TamsGapHandling::exists($v)) {
throw new InvalidArgument(\sprintf('Invalid parameter "gapHandling" for "%s". The value "%s" is not a valid "TamsGapHandling".', __CLASS__, $v));
}
$payload['gapHandling'] = $v;
}
if (null !== $v = $this->sourceId) {
$payload['sourceId'] = $v;
}
if (null !== $v = $this->timerange) {
$payload['timerange'] = $v;
}

return $payload;
}
}
Loading