Skip to content

Commit f0521ca

Browse files
Update generated code (#1897)
update generated code
1 parent a4e9c7b commit f0521ca

File tree

10 files changed

+121
-4
lines changed

10 files changed

+121
-4
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.343.23"
3+
"${LATEST}": "3.344.0"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/MediaConvert/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: This release includes support for embedding and signing C2PA content credentials in MP4 outputs.
8+
59
## 1.9.0
610

711
### Added

src/Service/MediaConvert/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"extra": {
3030
"branch-alias": {
31-
"dev-master": "1.9-dev"
31+
"dev-master": "1.10-dev"
3232
}
3333
}
3434
}

src/Service/MediaConvert/src/Enum/AudioSelectorType.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33
namespace AsyncAws\MediaConvert\Enum;
44

55
/**
6-
* Specifies the type of the audio selector.
6+
* Specify how MediaConvert selects audio content within your input. The default is Track. PID: Select audio by
7+
* specifying the Packet Identifier (PID) values for MPEG Transport Stream inputs. Use this when you know the exact PID
8+
* values of your audio streams. Track: Default. Select audio by track number. This is the most common option and works
9+
* with most input container formats. Language code: Select audio by language using ISO 639-2 or ISO 639-3 three-letter
10+
* language codes. Use this when your source has embedded language metadata and you want to select tracks based on their
11+
* language. HLS rendition group: Select audio from an HLS rendition group. Use this when your input is an HLS package
12+
* with multiple audio renditions and you want to select specific rendition groups. All PCM: Select all uncompressed PCM
13+
* audio tracks from your input automatically. This is useful when you want to include all PCM audio tracks without
14+
* specifying individual track numbers.
715
*/
816
final class AudioSelectorType
917
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace AsyncAws\MediaConvert\Enum;
4+
5+
/**
6+
* When enabled, a C2PA compliant manifest will be generated, signed and embeded in the output. For more information on
7+
* C2PA, see https://c2pa.org/specifications/specifications/2.1/index.html.
8+
*/
9+
final class Mp4C2paManifest
10+
{
11+
public const EXCLUDE = 'EXCLUDE';
12+
public const INCLUDE = 'INCLUDE';
13+
14+
public static function exists(string $value): bool
15+
{
16+
return isset([
17+
self::EXCLUDE => true,
18+
self::INCLUDE => true,
19+
][$value]);
20+
}
21+
}

src/Service/MediaConvert/src/Result/CreateJobResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,11 +1648,14 @@ private function populateResultMp4Settings(array $json): Mp4Settings
16481648
{
16491649
return new Mp4Settings([
16501650
'AudioDuration' => isset($json['audioDuration']) ? (string) $json['audioDuration'] : null,
1651+
'C2paManifest' => isset($json['c2paManifest']) ? (string) $json['c2paManifest'] : null,
1652+
'CertificateSecret' => isset($json['certificateSecret']) ? (string) $json['certificateSecret'] : null,
16511653
'CslgAtom' => isset($json['cslgAtom']) ? (string) $json['cslgAtom'] : null,
16521654
'CttsVersion' => isset($json['cttsVersion']) ? (int) $json['cttsVersion'] : null,
16531655
'FreeSpaceBox' => isset($json['freeSpaceBox']) ? (string) $json['freeSpaceBox'] : null,
16541656
'MoovPlacement' => isset($json['moovPlacement']) ? (string) $json['moovPlacement'] : null,
16551657
'Mp4MajorBrand' => isset($json['mp4MajorBrand']) ? (string) $json['mp4MajorBrand'] : null,
1658+
'SigningKmsKey' => isset($json['signingKmsKey']) ? (string) $json['signingKmsKey'] : null,
16561659
]);
16571660
}
16581661

src/Service/MediaConvert/src/Result/GetJobResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,11 +1648,14 @@ private function populateResultMp4Settings(array $json): Mp4Settings
16481648
{
16491649
return new Mp4Settings([
16501650
'AudioDuration' => isset($json['audioDuration']) ? (string) $json['audioDuration'] : null,
1651+
'C2paManifest' => isset($json['c2paManifest']) ? (string) $json['c2paManifest'] : null,
1652+
'CertificateSecret' => isset($json['certificateSecret']) ? (string) $json['certificateSecret'] : null,
16511653
'CslgAtom' => isset($json['cslgAtom']) ? (string) $json['cslgAtom'] : null,
16521654
'CttsVersion' => isset($json['cttsVersion']) ? (int) $json['cttsVersion'] : null,
16531655
'FreeSpaceBox' => isset($json['freeSpaceBox']) ? (string) $json['freeSpaceBox'] : null,
16541656
'MoovPlacement' => isset($json['moovPlacement']) ? (string) $json['moovPlacement'] : null,
16551657
'Mp4MajorBrand' => isset($json['mp4MajorBrand']) ? (string) $json['mp4MajorBrand'] : null,
1658+
'SigningKmsKey' => isset($json['signingKmsKey']) ? (string) $json['signingKmsKey'] : null,
16561659
]);
16571660
}
16581661

src/Service/MediaConvert/src/Result/ListJobsResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,11 +1715,14 @@ private function populateResultMp4Settings(array $json): Mp4Settings
17151715
{
17161716
return new Mp4Settings([
17171717
'AudioDuration' => isset($json['audioDuration']) ? (string) $json['audioDuration'] : null,
1718+
'C2paManifest' => isset($json['c2paManifest']) ? (string) $json['c2paManifest'] : null,
1719+
'CertificateSecret' => isset($json['certificateSecret']) ? (string) $json['certificateSecret'] : null,
17181720
'CslgAtom' => isset($json['cslgAtom']) ? (string) $json['cslgAtom'] : null,
17191721
'CttsVersion' => isset($json['cttsVersion']) ? (int) $json['cttsVersion'] : null,
17201722
'FreeSpaceBox' => isset($json['freeSpaceBox']) ? (string) $json['freeSpaceBox'] : null,
17211723
'MoovPlacement' => isset($json['moovPlacement']) ? (string) $json['moovPlacement'] : null,
17221724
'Mp4MajorBrand' => isset($json['mp4MajorBrand']) ? (string) $json['mp4MajorBrand'] : null,
1725+
'SigningKmsKey' => isset($json['signingKmsKey']) ? (string) $json['signingKmsKey'] : null,
17231726
]);
17241727
}
17251728

src/Service/MediaConvert/src/ValueObject/AudioSelector.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,15 @@ final class AudioSelector
110110
private $remixSettings;
111111

112112
/**
113-
* Specifies the type of the audio selector.
113+
* Specify how MediaConvert selects audio content within your input. The default is Track. PID: Select audio by
114+
* specifying the Packet Identifier (PID) values for MPEG Transport Stream inputs. Use this when you know the exact PID
115+
* values of your audio streams. Track: Default. Select audio by track number. This is the most common option and works
116+
* with most input container formats. Language code: Select audio by language using ISO 639-2 or ISO 639-3 three-letter
117+
* language codes. Use this when your source has embedded language metadata and you want to select tracks based on their
118+
* language. HLS rendition group: Select audio from an HLS rendition group. Use this when your input is an HLS package
119+
* with multiple audio renditions and you want to select specific rendition groups. All PCM: Select all uncompressed PCM
120+
* audio tracks from your input automatically. This is useful when you want to include all PCM audio tracks without
121+
* specifying individual track numbers.
114122
*
115123
* @var AudioSelectorType::*|null
116124
*/

src/Service/MediaConvert/src/ValueObject/Mp4Settings.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use AsyncAws\Core\Exception\InvalidArgument;
66
use AsyncAws\MediaConvert\Enum\CmfcAudioDuration;
7+
use AsyncAws\MediaConvert\Enum\Mp4C2paManifest;
78
use AsyncAws\MediaConvert\Enum\Mp4CslgAtom;
89
use AsyncAws\MediaConvert\Enum\Mp4FreeSpaceBox;
910
use AsyncAws\MediaConvert\Enum\Mp4MoovPlacement;
@@ -30,6 +31,25 @@ final class Mp4Settings
3031
*/
3132
private $audioDuration;
3233

34+
/**
35+
* When enabled, a C2PA compliant manifest will be generated, signed and embeded in the output. For more information on
36+
* C2PA, see https://c2pa.org/specifications/specifications/2.1/index.html.
37+
*
38+
* @var Mp4C2paManifest::*|null
39+
*/
40+
private $c2paManifest;
41+
42+
/**
43+
* Specify the name or ARN of the AWS Secrets Manager secret that contains your C2PA public certificate chain in PEM
44+
* format. Provide a valid secret name or ARN. Note that your MediaConvert service role must allow access to this
45+
* secret. The public certificate chain is added to the COSE header (x5chain) for signature validation. Include the
46+
* signer's certificate and all intermediate certificates. Do not include the root certificate. For details on COSE,
47+
* see: https://opensource.contentauthenticity.org/docs/manifest/signing-manifests.
48+
*
49+
* @var string|null
50+
*/
51+
private $certificateSecret;
52+
3353
/**
3454
* When enabled, file composition times will start at zero, composition times in the 'ctts' (composition time to sample)
3555
* box for B-frames will be negative, and a 'cslg' (composition shift least greatest) box will be included per 14496-1
@@ -71,34 +91,51 @@ final class Mp4Settings
7191
*/
7292
private $mp4MajorBrand;
7393

94+
/**
95+
* Specify the ID or ARN of the AWS KMS key used to sign the C2PA manifest in your MP4 output. Provide a valid KMS key
96+
* ARN. Note that your MediaConvert service role must allow access to this key.
97+
*
98+
* @var string|null
99+
*/
100+
private $signingKmsKey;
101+
74102
/**
75103
* @param array{
76104
* AudioDuration?: null|CmfcAudioDuration::*,
105+
* C2paManifest?: null|Mp4C2paManifest::*,
106+
* CertificateSecret?: null|string,
77107
* CslgAtom?: null|Mp4CslgAtom::*,
78108
* CttsVersion?: null|int,
79109
* FreeSpaceBox?: null|Mp4FreeSpaceBox::*,
80110
* MoovPlacement?: null|Mp4MoovPlacement::*,
81111
* Mp4MajorBrand?: null|string,
112+
* SigningKmsKey?: null|string,
82113
* } $input
83114
*/
84115
public function __construct(array $input)
85116
{
86117
$this->audioDuration = $input['AudioDuration'] ?? null;
118+
$this->c2paManifest = $input['C2paManifest'] ?? null;
119+
$this->certificateSecret = $input['CertificateSecret'] ?? null;
87120
$this->cslgAtom = $input['CslgAtom'] ?? null;
88121
$this->cttsVersion = $input['CttsVersion'] ?? null;
89122
$this->freeSpaceBox = $input['FreeSpaceBox'] ?? null;
90123
$this->moovPlacement = $input['MoovPlacement'] ?? null;
91124
$this->mp4MajorBrand = $input['Mp4MajorBrand'] ?? null;
125+
$this->signingKmsKey = $input['SigningKmsKey'] ?? null;
92126
}
93127

94128
/**
95129
* @param array{
96130
* AudioDuration?: null|CmfcAudioDuration::*,
131+
* C2paManifest?: null|Mp4C2paManifest::*,
132+
* CertificateSecret?: null|string,
97133
* CslgAtom?: null|Mp4CslgAtom::*,
98134
* CttsVersion?: null|int,
99135
* FreeSpaceBox?: null|Mp4FreeSpaceBox::*,
100136
* MoovPlacement?: null|Mp4MoovPlacement::*,
101137
* Mp4MajorBrand?: null|string,
138+
* SigningKmsKey?: null|string,
102139
* }|Mp4Settings $input
103140
*/
104141
public static function create($input): self
@@ -114,6 +151,19 @@ public function getAudioDuration(): ?string
114151
return $this->audioDuration;
115152
}
116153

154+
/**
155+
* @return Mp4C2paManifest::*|null
156+
*/
157+
public function getC2paManifest(): ?string
158+
{
159+
return $this->c2paManifest;
160+
}
161+
162+
public function getCertificateSecret(): ?string
163+
{
164+
return $this->certificateSecret;
165+
}
166+
117167
/**
118168
* @return Mp4CslgAtom::*|null
119169
*/
@@ -148,6 +198,11 @@ public function getMp4MajorBrand(): ?string
148198
return $this->mp4MajorBrand;
149199
}
150200

201+
public function getSigningKmsKey(): ?string
202+
{
203+
return $this->signingKmsKey;
204+
}
205+
151206
/**
152207
* @internal
153208
*/
@@ -160,6 +215,15 @@ public function requestBody(): array
160215
}
161216
$payload['audioDuration'] = $v;
162217
}
218+
if (null !== $v = $this->c2paManifest) {
219+
if (!Mp4C2paManifest::exists($v)) {
220+
throw new InvalidArgument(\sprintf('Invalid parameter "c2paManifest" for "%s". The value "%s" is not a valid "Mp4C2paManifest".', __CLASS__, $v));
221+
}
222+
$payload['c2paManifest'] = $v;
223+
}
224+
if (null !== $v = $this->certificateSecret) {
225+
$payload['certificateSecret'] = $v;
226+
}
163227
if (null !== $v = $this->cslgAtom) {
164228
if (!Mp4CslgAtom::exists($v)) {
165229
throw new InvalidArgument(\sprintf('Invalid parameter "cslgAtom" for "%s". The value "%s" is not a valid "Mp4CslgAtom".', __CLASS__, $v));
@@ -184,6 +248,9 @@ public function requestBody(): array
184248
if (null !== $v = $this->mp4MajorBrand) {
185249
$payload['mp4MajorBrand'] = $v;
186250
}
251+
if (null !== $v = $this->signingKmsKey) {
252+
$payload['signingKmsKey'] = $v;
253+
}
187254

188255
return $payload;
189256
}

0 commit comments

Comments
 (0)