software.amazon.awssdk.services.mediaconvert.model.Vp8Settings Maven / Gradle / Ivy
Show all versions of mediaconvert Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.mediaconvert.model;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* Required when you set Codec to the value VP8.
*/
@Generated("software.amazon.awssdk:codegen")
public final class Vp8Settings implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField BITRATE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Bitrate").getter(getter(Vp8Settings::bitrate)).setter(setter(Builder::bitrate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("bitrate").build()).build();
private static final SdkField FRAMERATE_CONTROL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("FramerateControl").getter(getter(Vp8Settings::framerateControlAsString))
.setter(setter(Builder::framerateControl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateControl").build()).build();
private static final SdkField FRAMERATE_CONVERSION_ALGORITHM_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("FramerateConversionAlgorithm")
.getter(getter(Vp8Settings::framerateConversionAlgorithmAsString))
.setter(setter(Builder::framerateConversionAlgorithm))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateConversionAlgorithm")
.build()).build();
private static final SdkField FRAMERATE_DENOMINATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("FramerateDenominator").getter(getter(Vp8Settings::framerateDenominator))
.setter(setter(Builder::framerateDenominator))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateDenominator").build())
.build();
private static final SdkField FRAMERATE_NUMERATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("FramerateNumerator").getter(getter(Vp8Settings::framerateNumerator))
.setter(setter(Builder::framerateNumerator))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("framerateNumerator").build())
.build();
private static final SdkField GOP_SIZE_FIELD = SdkField. builder(MarshallingType.DOUBLE)
.memberName("GopSize").getter(getter(Vp8Settings::gopSize)).setter(setter(Builder::gopSize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("gopSize").build()).build();
private static final SdkField HRD_BUFFER_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("HrdBufferSize").getter(getter(Vp8Settings::hrdBufferSize)).setter(setter(Builder::hrdBufferSize))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hrdBufferSize").build()).build();
private static final SdkField MAX_BITRATE_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("MaxBitrate").getter(getter(Vp8Settings::maxBitrate)).setter(setter(Builder::maxBitrate))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("maxBitrate").build()).build();
private static final SdkField PAR_CONTROL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ParControl").getter(getter(Vp8Settings::parControlAsString)).setter(setter(Builder::parControl))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parControl").build()).build();
private static final SdkField PAR_DENOMINATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("ParDenominator").getter(getter(Vp8Settings::parDenominator)).setter(setter(Builder::parDenominator))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parDenominator").build()).build();
private static final SdkField PAR_NUMERATOR_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("ParNumerator").getter(getter(Vp8Settings::parNumerator)).setter(setter(Builder::parNumerator))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("parNumerator").build()).build();
private static final SdkField QUALITY_TUNING_LEVEL_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("QualityTuningLevel").getter(getter(Vp8Settings::qualityTuningLevelAsString))
.setter(setter(Builder::qualityTuningLevel))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("qualityTuningLevel").build())
.build();
private static final SdkField RATE_CONTROL_MODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RateControlMode").getter(getter(Vp8Settings::rateControlModeAsString))
.setter(setter(Builder::rateControlMode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("rateControlMode").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BITRATE_FIELD,
FRAMERATE_CONTROL_FIELD, FRAMERATE_CONVERSION_ALGORITHM_FIELD, FRAMERATE_DENOMINATOR_FIELD,
FRAMERATE_NUMERATOR_FIELD, GOP_SIZE_FIELD, HRD_BUFFER_SIZE_FIELD, MAX_BITRATE_FIELD, PAR_CONTROL_FIELD,
PAR_DENOMINATOR_FIELD, PAR_NUMERATOR_FIELD, QUALITY_TUNING_LEVEL_FIELD, RATE_CONTROL_MODE_FIELD));
private static final long serialVersionUID = 1L;
private final Integer bitrate;
private final String framerateControl;
private final String framerateConversionAlgorithm;
private final Integer framerateDenominator;
private final Integer framerateNumerator;
private final Double gopSize;
private final Integer hrdBufferSize;
private final Integer maxBitrate;
private final String parControl;
private final Integer parDenominator;
private final Integer parNumerator;
private final String qualityTuningLevel;
private final String rateControlMode;
private Vp8Settings(BuilderImpl builder) {
this.bitrate = builder.bitrate;
this.framerateControl = builder.framerateControl;
this.framerateConversionAlgorithm = builder.framerateConversionAlgorithm;
this.framerateDenominator = builder.framerateDenominator;
this.framerateNumerator = builder.framerateNumerator;
this.gopSize = builder.gopSize;
this.hrdBufferSize = builder.hrdBufferSize;
this.maxBitrate = builder.maxBitrate;
this.parControl = builder.parControl;
this.parDenominator = builder.parDenominator;
this.parNumerator = builder.parNumerator;
this.qualityTuningLevel = builder.qualityTuningLevel;
this.rateControlMode = builder.rateControlMode;
}
/**
* Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
*
* @return Target bitrate in bits/second. For example, enter five megabits per second as 5000000.
*/
public final Integer bitrate() {
return bitrate;
}
/**
* If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to
* keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion,
* choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are
* decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #framerateControl}
* will return {@link Vp8FramerateControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #framerateControlAsString}.
*
*
* @return If you are using the console, use the Framerate setting to specify the frame rate for this output. If you
* want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate
* conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the
* dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a
* fraction.
* @see Vp8FramerateControl
*/
public final Vp8FramerateControl framerateControl() {
return Vp8FramerateControl.fromValue(framerateControl);
}
/**
* If you are using the console, use the Framerate setting to specify the frame rate for this output. If you want to
* keep the same frame rate as the input video, choose Follow source. If you want to do frame rate conversion,
* choose a frame rate from the dropdown list or choose Custom. The framerates shown in the dropdown list are
* decimal approximations of fractions. If you choose Custom, specify your frame rate as a fraction.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #framerateControl}
* will return {@link Vp8FramerateControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #framerateControlAsString}.
*
*
* @return If you are using the console, use the Framerate setting to specify the frame rate for this output. If you
* want to keep the same frame rate as the input video, choose Follow source. If you want to do frame rate
* conversion, choose a frame rate from the dropdown list or choose Custom. The framerates shown in the
* dropdown list are decimal approximations of fractions. If you choose Custom, specify your frame rate as a
* fraction.
* @see Vp8FramerateControl
*/
public final String framerateControlAsString() {
return framerateControl;
}
/**
* Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically
* simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For
* numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but
* might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video
* has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation.
* FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding
* time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at
* least 128x96.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #framerateConversionAlgorithm} will return {@link Vp8FramerateConversionAlgorithm#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #framerateConversionAlgorithmAsString}.
*
*
* @return Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For
* numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value,
* Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results
* in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions,
* especially if your source video has already been converted from its original cadence: Choose FrameFormer
* to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note
* that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you
* choose FrameFormer, your input video resolution must be at least 128x96.
* @see Vp8FramerateConversionAlgorithm
*/
public final Vp8FramerateConversionAlgorithm framerateConversionAlgorithm() {
return Vp8FramerateConversionAlgorithm.fromValue(framerateConversionAlgorithm);
}
/**
* Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For numerically
* simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value, Drop duplicate. For
* numerically complex conversions, to avoid stutter: Choose Interpolate. This results in a smooth picture, but
* might introduce undesirable video artifacts. For complex frame rate conversions, especially if your source video
* has already been converted from its original cadence: Choose FrameFormer to do motion-compensated interpolation.
* FrameFormer uses the best conversion method frame by frame. Note that using FrameFormer increases the transcoding
* time and incurs a significant add-on cost. When you choose FrameFormer, your input video resolution must be at
* least 128x96.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #framerateConversionAlgorithm} will return {@link Vp8FramerateConversionAlgorithm#UNKNOWN_TO_SDK_VERSION}.
* The raw value returned by the service is available from {@link #framerateConversionAlgorithmAsString}.
*
*
* @return Choose the method that you want MediaConvert to use when increasing or decreasing the frame rate. For
* numerically simple conversions, such as 60 fps to 30 fps: We recommend that you keep the default value,
* Drop duplicate. For numerically complex conversions, to avoid stutter: Choose Interpolate. This results
* in a smooth picture, but might introduce undesirable video artifacts. For complex frame rate conversions,
* especially if your source video has already been converted from its original cadence: Choose FrameFormer
* to do motion-compensated interpolation. FrameFormer uses the best conversion method frame by frame. Note
* that using FrameFormer increases the transcoding time and incurs a significant add-on cost. When you
* choose FrameFormer, your input video resolution must be at least 128x96.
* @see Vp8FramerateConversionAlgorithm
*/
public final String framerateConversionAlgorithmAsString() {
return framerateConversionAlgorithm;
}
/**
* When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For
* example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of this fraction. In this
* example, use 1001 for the value of FramerateDenominator. When you use the console for transcode jobs that use
* frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
*
* @return When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a
* fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateDenominator to specify the denominator of
* this fraction. In this example, use 1001 for the value of FramerateDenominator. When you use the console
* for transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate.
* In this example, specify 23.976.
*/
public final Integer framerateDenominator() {
return framerateDenominator;
}
/**
* When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a fraction. For
* example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this fraction. In this
* example, use 24000 for the value of FramerateNumerator. When you use the console for transcode jobs that use
* frame rate conversion, provide the value as a decimal number for Framerate. In this example, specify 23.976.
*
* @return When you use the API for transcode jobs that use frame rate conversion, specify the frame rate as a
* fraction. For example, 24000 / 1001 = 23.976 fps. Use FramerateNumerator to specify the numerator of this
* fraction. In this example, use 24000 for the value of FramerateNumerator. When you use the console for
* transcode jobs that use frame rate conversion, provide the value as a decimal number for Framerate. In
* this example, specify 23.976.
*/
public final Integer framerateNumerator() {
return framerateNumerator;
}
/**
* GOP Length (keyframe interval) in frames. Must be greater than zero.
*
* @return GOP Length (keyframe interval) in frames. Must be greater than zero.
*/
public final Double gopSize() {
return gopSize;
}
/**
* Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
*
* @return Optional. Size of buffer (HRD buffer model) in bits. For example, enter five megabits as 5000000.
*/
public final Integer hrdBufferSize() {
return hrdBufferSize;
}
/**
* Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum bitrate in
* bits/second. For example, enter five megabits per second as 5000000. The default behavior uses twice the target
* bitrate as the maximum bitrate.
*
* @return Ignore this setting unless you set qualityTuningLevel to MULTI_PASS. Optional. Specify the maximum
* bitrate in bits/second. For example, enter five megabits per second as 5000000. The default behavior uses
* twice the target bitrate as the maximum bitrate.
*/
public final Integer maxBitrate() {
return maxBitrate;
}
/**
* Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior,
* Follow source, uses the PAR from your input video for your output. To specify a different PAR in the console,
* choose any value other than Follow source. When you choose SPECIFIED for this setting, you must also specify
* values for the parNumerator and parDenominator settings.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #parControl} will
* return {@link Vp8ParControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #parControlAsString}.
*
*
* @return Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default
* behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR
* in the console, choose any value other than Follow source. When you choose SPECIFIED for this setting,
* you must also specify values for the parNumerator and parDenominator settings.
* @see Vp8ParControl
*/
public final Vp8ParControl parControl() {
return Vp8ParControl.fromValue(parControl);
}
/**
* Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default behavior,
* Follow source, uses the PAR from your input video for your output. To specify a different PAR in the console,
* choose any value other than Follow source. When you choose SPECIFIED for this setting, you must also specify
* values for the parNumerator and parDenominator settings.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #parControl} will
* return {@link Vp8ParControl#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #parControlAsString}.
*
*
* @return Optional. Specify how the service determines the pixel aspect ratio (PAR) for this output. The default
* behavior, Follow source, uses the PAR from your input video for your output. To specify a different PAR
* in the console, choose any value other than Follow source. When you choose SPECIFIED for this setting,
* you must also specify values for the parNumerator and parDenominator settings.
* @see Vp8ParControl
*/
public final String parControlAsString() {
return parControl;
}
/**
* Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other than
* Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR,
* provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In
* this example, the value for parDenominator is 33.
*
* @return Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value
* other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your
* input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would
* specify the ratio 40:33. In this example, the value for parDenominator is 33.
*/
public final Integer parDenominator() {
return parDenominator;
}
/**
* Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value other than
* Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your input video PAR,
* provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would specify the ratio 40:33. In
* this example, the value for parNumerator is 40.
*
* @return Required when you set Pixel aspect ratio to SPECIFIED. On the console, this corresponds to any value
* other than Follow source. When you specify an output pixel aspect ratio (PAR) that is different from your
* input video PAR, provide your output PAR as a ratio. For example, for D1/DV NTSC widescreen, you would
* specify the ratio 40:33. In this example, the value for parNumerator is 40.
*/
public final Integer parNumerator() {
return parNumerator;
}
/**
* Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality.
* The default behavior is faster, lower quality, multi-pass encoding.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #qualityTuningLevel} will return {@link Vp8QualityTuningLevel#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #qualityTuningLevelAsString}.
*
*
* @return Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video
* quality. The default behavior is faster, lower quality, multi-pass encoding.
* @see Vp8QualityTuningLevel
*/
public final Vp8QualityTuningLevel qualityTuningLevel() {
return Vp8QualityTuningLevel.fromValue(qualityTuningLevel);
}
/**
* Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video quality.
* The default behavior is faster, lower quality, multi-pass encoding.
*
* If the service returns an enum value that is not available in the current SDK version,
* {@link #qualityTuningLevel} will return {@link Vp8QualityTuningLevel#UNKNOWN_TO_SDK_VERSION}. The raw value
* returned by the service is available from {@link #qualityTuningLevelAsString}.
*
*
* @return Optional. Use Quality tuning level to choose how you want to trade off encoding speed for output video
* quality. The default behavior is faster, lower quality, multi-pass encoding.
* @see Vp8QualityTuningLevel
*/
public final String qualityTuningLevelAsString() {
return qualityTuningLevel;
}
/**
* With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #rateControlMode}
* will return {@link Vp8RateControlMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #rateControlModeAsString}.
*
*
* @return With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
* @see Vp8RateControlMode
*/
public final Vp8RateControlMode rateControlMode() {
return Vp8RateControlMode.fromValue(rateControlMode);
}
/**
* With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #rateControlMode}
* will return {@link Vp8RateControlMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #rateControlModeAsString}.
*
*
* @return With the VP8 codec, you can use only the variable bitrate (VBR) rate control mode.
* @see Vp8RateControlMode
*/
public final String rateControlModeAsString() {
return rateControlMode;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(bitrate());
hashCode = 31 * hashCode + Objects.hashCode(framerateControlAsString());
hashCode = 31 * hashCode + Objects.hashCode(framerateConversionAlgorithmAsString());
hashCode = 31 * hashCode + Objects.hashCode(framerateDenominator());
hashCode = 31 * hashCode + Objects.hashCode(framerateNumerator());
hashCode = 31 * hashCode + Objects.hashCode(gopSize());
hashCode = 31 * hashCode + Objects.hashCode(hrdBufferSize());
hashCode = 31 * hashCode + Objects.hashCode(maxBitrate());
hashCode = 31 * hashCode + Objects.hashCode(parControlAsString());
hashCode = 31 * hashCode + Objects.hashCode(parDenominator());
hashCode = 31 * hashCode + Objects.hashCode(parNumerator());
hashCode = 31 * hashCode + Objects.hashCode(qualityTuningLevelAsString());
hashCode = 31 * hashCode + Objects.hashCode(rateControlModeAsString());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Vp8Settings)) {
return false;
}
Vp8Settings other = (Vp8Settings) obj;
return Objects.equals(bitrate(), other.bitrate())
&& Objects.equals(framerateControlAsString(), other.framerateControlAsString())
&& Objects.equals(framerateConversionAlgorithmAsString(), other.framerateConversionAlgorithmAsString())
&& Objects.equals(framerateDenominator(), other.framerateDenominator())
&& Objects.equals(framerateNumerator(), other.framerateNumerator()) && Objects.equals(gopSize(), other.gopSize())
&& Objects.equals(hrdBufferSize(), other.hrdBufferSize()) && Objects.equals(maxBitrate(), other.maxBitrate())
&& Objects.equals(parControlAsString(), other.parControlAsString())
&& Objects.equals(parDenominator(), other.parDenominator())
&& Objects.equals(parNumerator(), other.parNumerator())
&& Objects.equals(qualityTuningLevelAsString(), other.qualityTuningLevelAsString())
&& Objects.equals(rateControlModeAsString(), other.rateControlModeAsString());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("Vp8Settings").add("Bitrate", bitrate()).add("FramerateControl", framerateControlAsString())
.add("FramerateConversionAlgorithm", framerateConversionAlgorithmAsString())
.add("FramerateDenominator", framerateDenominator()).add("FramerateNumerator", framerateNumerator())
.add("GopSize", gopSize()).add("HrdBufferSize", hrdBufferSize()).add("MaxBitrate", maxBitrate())
.add("ParControl", parControlAsString()).add("ParDenominator", parDenominator())
.add("ParNumerator", parNumerator()).add("QualityTuningLevel", qualityTuningLevelAsString())
.add("RateControlMode", rateControlModeAsString()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "Bitrate":
return Optional.ofNullable(clazz.cast(bitrate()));
case "FramerateControl":
return Optional.ofNullable(clazz.cast(framerateControlAsString()));
case "FramerateConversionAlgorithm":
return Optional.ofNullable(clazz.cast(framerateConversionAlgorithmAsString()));
case "FramerateDenominator":
return Optional.ofNullable(clazz.cast(framerateDenominator()));
case "FramerateNumerator":
return Optional.ofNullable(clazz.cast(framerateNumerator()));
case "GopSize":
return Optional.ofNullable(clazz.cast(gopSize()));
case "HrdBufferSize":
return Optional.ofNullable(clazz.cast(hrdBufferSize()));
case "MaxBitrate":
return Optional.ofNullable(clazz.cast(maxBitrate()));
case "ParControl":
return Optional.ofNullable(clazz.cast(parControlAsString()));
case "ParDenominator":
return Optional.ofNullable(clazz.cast(parDenominator()));
case "ParNumerator":
return Optional.ofNullable(clazz.cast(parNumerator()));
case "QualityTuningLevel":
return Optional.ofNullable(clazz.cast(qualityTuningLevelAsString()));
case "RateControlMode":
return Optional.ofNullable(clazz.cast(rateControlModeAsString()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function