Skip to content

Commit 5e51c6c

Browse files
Add support to the AV1 rate control mode
1 parent 445116c commit 5e51c6c

File tree

11 files changed

+201
-1
lines changed

11 files changed

+201
-1
lines changed

generator/ServiceModels/medialive/medialive-2017-10-14.api.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13402,6 +13402,10 @@
1340213402
"SrtSettings": {
1340313403
"shape": "__listOfSrtOutputDestinationSettings",
1340413404
"locationName": "srtSettings"
13405+
},
13406+
"LogicalInterfaceNames": {
13407+
"shape": "__listOf__string",
13408+
"locationName": "logicalInterfaceNames"
1340513409
}
1340613410
}
1340713411
},
@@ -21723,6 +21727,14 @@
2172321727
"TimecodeBurninSettings": {
2172421728
"shape": "TimecodeBurninSettings",
2172521729
"locationName": "timecodeBurninSettings"
21730+
},
21731+
"Bitrate": {
21732+
"shape": "__integerMin50000Max8000000",
21733+
"locationName": "bitrate"
21734+
},
21735+
"RateControlMode": {
21736+
"shape": "Av1RateControlMode",
21737+
"locationName": "rateControlMode"
2172621738
}
2172721739
},
2172821740
"required": [
@@ -24570,6 +24582,13 @@
2457024582
"member": {
2457124583
"shape": "CmafIngestCaptionLanguageMapping"
2457224584
}
24585+
},
24586+
"Av1RateControlMode": {
24587+
"type": "string",
24588+
"enum": [
24589+
"CBR",
24590+
"QVBR"
24591+
]
2457324592
}
2457424593
}
2457524594
}

generator/ServiceModels/medialive/medialive-2017-10-14.docs.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6727,7 +6727,8 @@
67276727
"__integerMin50000Max8000000": {
67286728
"base": null,
67296729
"refs": {
6730-
"Av1Settings$MaxBitrate": "The maximum bitrate to assign.\nFor recommendations, see the description for qvbrQualityLevel."
6730+
"Av1Settings$MaxBitrate": "The maximum bitrate to assign.\nFor recommendations, see the description for qvbrQualityLevel.",
6731+
"Av1Settings$Bitrate": "Average bitrate in bits/second. Required when the rate control mode is CBR. Not used for QVBR."
67316732
}
67326733
},
67336734
"__listOfDescribeChannelPlacementGroupSummary": {
@@ -7159,6 +7160,12 @@
71597160
"refs": {
71607161
"CmafIngestGroupSettings$CaptionLanguageMappings": "An array that identifies the languages in the four caption channels in the embedded captions."
71617162
}
7163+
},
7164+
"Av1RateControlMode": {
7165+
"base": "Av1 Rate Control Mode",
7166+
"refs": {
7167+
"Av1Settings$RateControlMode": "Rate control mode.\n\nQVBR: Quality will match the specified quality level except when it is constrained by the\nmaximum bitrate. Recommended if you or your viewers pay for bandwidth.\n\nCBR: Quality varies, depending on the video complexity. Recommended only if you distribute\nyour assets to devices that cannot handle variable bitrates."
7168+
}
71627169
}
71637170
},
71647171
"documentation": "API for AWS Elemental MediaLive"

generator/ServiceModels/medialive/medialive-2017-10-14.normal.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16157,6 +16157,11 @@
1615716157
"shape": "__listOfSrtOutputDestinationSettings",
1615816158
"locationName": "srtSettings",
1615916159
"documentation": "SRT settings for an SRT output; one destination for each redundant encoder."
16160+
},
16161+
"LogicalInterfaceNames": {
16162+
"shape": "__listOf__string",
16163+
"locationName": "logicalInterfaceNames",
16164+
"documentation": "Optional assignment of an output to a logical interface on the Node. Only applies to on premises channels."
1616016165
}
1616116166
},
1616216167
"documentation": "Placeholder documentation for OutputDestination"
@@ -25821,6 +25826,16 @@
2582125826
"shape": "TimecodeBurninSettings",
2582225827
"locationName": "timecodeBurninSettings",
2582325828
"documentation": "Configures the timecode burn-in feature. If you enable this feature, the timecode will become part of the video."
25829+
},
25830+
"Bitrate": {
25831+
"shape": "__integerMin50000Max8000000",
25832+
"locationName": "bitrate",
25833+
"documentation": "Average bitrate in bits/second. Required when the rate control mode is CBR. Not used for QVBR."
25834+
},
25835+
"RateControlMode": {
25836+
"shape": "Av1RateControlMode",
25837+
"locationName": "rateControlMode",
25838+
"documentation": "Rate control mode.\n\nQVBR: Quality will match the specified quality level except when it is constrained by the\nmaximum bitrate. Recommended if you or your viewers pay for bandwidth.\n\nCBR: Quality varies, depending on the video complexity. Recommended only if you distribute\nyour assets to devices that cannot handle variable bitrates."
2582425839
}
2582525840
},
2582625841
"documentation": "Av1 Settings",
@@ -29254,6 +29269,14 @@
2925429269
"shape": "CmafIngestCaptionLanguageMapping"
2925529270
},
2925629271
"documentation": "Placeholder documentation for __listOfCmafIngestCaptionLanguageMapping"
29272+
},
29273+
"Av1RateControlMode": {
29274+
"type": "string",
29275+
"documentation": "Av1 Rate Control Mode",
29276+
"enum": [
29277+
"CBR",
29278+
"QVBR"
29279+
]
2925729280
}
2925829281
},
2925929282
"documentation": "API for AWS Elemental MediaLive"

sdk/code-analysis/ServiceAnalysis/MediaLive/Generated/PropertyValueRules.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,11 @@
868868
<property>Amazon.MediaLive.Model.AutomaticInputFailoverSettings.ErrorClearTimeMsec</property>
869869
<min>1</min>
870870
</property-value-rule>
871+
<property-value-rule>
872+
<property>Amazon.MediaLive.Model.Av1Settings.Bitrate</property>
873+
<min>50000</min>
874+
<max>8000000</max>
875+
</property-value-rule>
871876
<property-value-rule>
872877
<property>Amazon.MediaLive.Model.Av1Settings.BufSize</property>
873878
<min>50000</min>

sdk/src/Services/MediaLive/Generated/Model/Av1Settings.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Amazon.MediaLive.Model
3535
public partial class Av1Settings
3636
{
3737
private AfdSignaling _afdSignaling;
38+
private int? _bitrate;
3839
private int? _bufSize;
3940
private Av1ColorSpaceSettings _colorSpaceSettings;
4041
private FixedAfd _fixedAfd;
@@ -49,6 +50,7 @@ public partial class Av1Settings
4950
private int? _parDenominator;
5051
private int? _parNumerator;
5152
private int? _qvbrQualityLevel;
53+
private Av1RateControlMode _rateControlMode;
5254
private Av1SceneChangeDetect _sceneChangeDetect;
5355
private TimecodeBurninSettings _timecodeBurninSettings;
5456

@@ -70,6 +72,23 @@ internal bool IsSetAfdSignaling()
7072
return this._afdSignaling != null;
7173
}
7274

75+
/// <summary>
76+
/// Gets and sets the property Bitrate. Average bitrate in bits/second. Required when
77+
/// the rate control mode is CBR. Not used for QVBR.
78+
/// </summary>
79+
[AWSProperty(Min=50000, Max=8000000)]
80+
public int Bitrate
81+
{
82+
get { return this._bitrate.GetValueOrDefault(); }
83+
set { this._bitrate = value; }
84+
}
85+
86+
// Check to see if Bitrate property is set
87+
internal bool IsSetBitrate()
88+
{
89+
return this._bitrate.HasValue;
90+
}
91+
7392
/// <summary>
7493
/// Gets and sets the property BufSize. The size of the buffer (HRD buffer model) in bits.
7594
/// </summary>
@@ -320,6 +339,25 @@ internal bool IsSetQvbrQualityLevel()
320339
return this._qvbrQualityLevel.HasValue;
321340
}
322341

342+
/// <summary>
343+
/// Gets and sets the property RateControlMode. Rate control mode.QVBR: Quality will match
344+
/// the specified quality level except when it is constrained by themaximum bitrate.
345+
/// Recommended if you or your viewers pay for bandwidth.CBR: Quality varies, depending
346+
/// on the video complexity. Recommended only if you distributeyour assets to devices
347+
/// that cannot handle variable bitrates.
348+
/// </summary>
349+
public Av1RateControlMode RateControlMode
350+
{
351+
get { return this._rateControlMode; }
352+
set { this._rateControlMode = value; }
353+
}
354+
355+
// Check to see if RateControlMode property is set
356+
internal bool IsSetRateControlMode()
357+
{
358+
return this._rateControlMode != null;
359+
}
360+
323361
/// <summary>
324362
/// Gets and sets the property SceneChangeDetect. Controls whether MediaLive inserts I-frames
325363
/// when it detects a scene change. ENABLED or DISABLED.

sdk/src/Services/MediaLive/Generated/Model/Internal/MarshallTransformations/Av1SettingsMarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public void Marshall(Av1Settings requestObject, JsonMarshallerContext context)
5454
context.Writer.Write(requestObject.AfdSignaling);
5555
}
5656

57+
if(requestObject.IsSetBitrate())
58+
{
59+
context.Writer.WritePropertyName("bitrate");
60+
context.Writer.Write(requestObject.Bitrate);
61+
}
62+
5763
if(requestObject.IsSetBufSize())
5864
{
5965
context.Writer.WritePropertyName("bufSize");
@@ -150,6 +156,12 @@ public void Marshall(Av1Settings requestObject, JsonMarshallerContext context)
150156
context.Writer.Write(requestObject.QvbrQualityLevel);
151157
}
152158

159+
if(requestObject.IsSetRateControlMode())
160+
{
161+
context.Writer.WritePropertyName("rateControlMode");
162+
context.Writer.Write(requestObject.RateControlMode);
163+
}
164+
153165
if(requestObject.IsSetSceneChangeDetect())
154166
{
155167
context.Writer.WritePropertyName("sceneChangeDetect");

sdk/src/Services/MediaLive/Generated/Model/Internal/MarshallTransformations/Av1SettingsUnmarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ public Av1Settings Unmarshall(JsonUnmarshallerContext context)
7272
unmarshalledObject.AfdSignaling = unmarshaller.Unmarshall(context);
7373
continue;
7474
}
75+
if (context.TestExpression("bitrate", targetDepth))
76+
{
77+
var unmarshaller = IntUnmarshaller.Instance;
78+
unmarshalledObject.Bitrate = unmarshaller.Unmarshall(context);
79+
continue;
80+
}
7581
if (context.TestExpression("bufSize", targetDepth))
7682
{
7783
var unmarshaller = IntUnmarshaller.Instance;
@@ -156,6 +162,12 @@ public Av1Settings Unmarshall(JsonUnmarshallerContext context)
156162
unmarshalledObject.QvbrQualityLevel = unmarshaller.Unmarshall(context);
157163
continue;
158164
}
165+
if (context.TestExpression("rateControlMode", targetDepth))
166+
{
167+
var unmarshaller = StringUnmarshaller.Instance;
168+
unmarshalledObject.RateControlMode = unmarshaller.Unmarshall(context);
169+
continue;
170+
}
159171
if (context.TestExpression("sceneChangeDetect", targetDepth))
160172
{
161173
var unmarshaller = StringUnmarshaller.Instance;

sdk/src/Services/MediaLive/Generated/Model/Internal/MarshallTransformations/OutputDestinationMarshaller.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ public void Marshall(OutputDestination requestObject, JsonMarshallerContext cont
5454
context.Writer.Write(requestObject.Id);
5555
}
5656

57+
if(requestObject.IsSetLogicalInterfaceNames())
58+
{
59+
context.Writer.WritePropertyName("logicalInterfaceNames");
60+
context.Writer.WriteArrayStart();
61+
foreach(var requestObjectLogicalInterfaceNamesListValue in requestObject.LogicalInterfaceNames)
62+
{
63+
context.Writer.Write(requestObjectLogicalInterfaceNamesListValue);
64+
}
65+
context.Writer.WriteArrayEnd();
66+
}
67+
5768
if(requestObject.IsSetMediaPackageSettings())
5869
{
5970
context.Writer.WritePropertyName("mediaPackageSettings");

sdk/src/Services/MediaLive/Generated/Model/Internal/MarshallTransformations/OutputDestinationUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ public OutputDestination Unmarshall(JsonUnmarshallerContext context)
7272
unmarshalledObject.Id = unmarshaller.Unmarshall(context);
7373
continue;
7474
}
75+
if (context.TestExpression("logicalInterfaceNames", targetDepth))
76+
{
77+
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
78+
unmarshalledObject.LogicalInterfaceNames = unmarshaller.Unmarshall(context);
79+
continue;
80+
}
7581
if (context.TestExpression("mediaPackageSettings", targetDepth))
7682
{
7783
var unmarshaller = new ListUnmarshaller<MediaPackageOutputDestinationSettings, MediaPackageOutputDestinationSettingsUnmarshaller>(MediaPackageOutputDestinationSettingsUnmarshaller.Instance);

sdk/src/Services/MediaLive/Generated/Model/OutputDestination.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Amazon.MediaLive.Model
3535
public partial class OutputDestination
3636
{
3737
private string _id;
38+
private List<string> _logicalInterfaceNames = AWSConfigs.InitializeCollections ? new List<string>() : null;
3839
private List<MediaPackageOutputDestinationSettings> _mediaPackageSettings = AWSConfigs.InitializeCollections ? new List<MediaPackageOutputDestinationSettings>() : null;
3940
private MultiplexProgramChannelDestinationSettings _multiplexSettings;
4041
private List<OutputDestinationSettings> _settings = AWSConfigs.InitializeCollections ? new List<OutputDestinationSettings>() : null;
@@ -56,6 +57,22 @@ internal bool IsSetId()
5657
return this._id != null;
5758
}
5859

60+
/// <summary>
61+
/// Gets and sets the property LogicalInterfaceNames. Optional assignment of an output
62+
/// to a logical interface on the Node. Only applies to on premises channels.
63+
/// </summary>
64+
public List<string> LogicalInterfaceNames
65+
{
66+
get { return this._logicalInterfaceNames; }
67+
set { this._logicalInterfaceNames = value; }
68+
}
69+
70+
// Check to see if LogicalInterfaceNames property is set
71+
internal bool IsSetLogicalInterfaceNames()
72+
{
73+
return this._logicalInterfaceNames != null && (this._logicalInterfaceNames.Count > 0 || !AWSConfigs.InitializeCollections);
74+
}
75+
5976
/// <summary>
6077
/// Gets and sets the property MediaPackageSettings. Destination settings for a MediaPackage
6178
/// output; one destination for both encoders.

0 commit comments

Comments
 (0)