
software.amazon.awssdk.services.mediaconvert.model.VideoDescription Maven / Gradle / Ivy
/*
* 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.Consumer;
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;
/**
* Settings related to video encoding of your output. The specific video settings depend on the video codec that you
* choose.
*/
@Generated("software.amazon.awssdk:codegen")
public final class VideoDescription implements SdkPojo, Serializable,
ToCopyableBuilder {
private static final SdkField AFD_SIGNALING_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AfdSignaling").getter(getter(VideoDescription::afdSignalingAsString))
.setter(setter(Builder::afdSignaling))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("afdSignaling").build()).build();
private static final SdkField ANTI_ALIAS_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("AntiAlias").getter(getter(VideoDescription::antiAliasAsString)).setter(setter(Builder::antiAlias))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("antiAlias").build()).build();
private static final SdkField CODEC_SETTINGS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("CodecSettings")
.getter(getter(VideoDescription::codecSettings)).setter(setter(Builder::codecSettings))
.constructor(VideoCodecSettings::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("codecSettings").build()).build();
private static final SdkField COLOR_METADATA_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ColorMetadata").getter(getter(VideoDescription::colorMetadataAsString))
.setter(setter(Builder::colorMetadata))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("colorMetadata").build()).build();
private static final SdkField CROP_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Crop").getter(getter(VideoDescription::crop)).setter(setter(Builder::crop))
.constructor(Rectangle::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("crop").build()).build();
private static final SdkField DROP_FRAME_TIMECODE_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("DropFrameTimecode").getter(getter(VideoDescription::dropFrameTimecodeAsString))
.setter(setter(Builder::dropFrameTimecode))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dropFrameTimecode").build()).build();
private static final SdkField FIXED_AFD_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("FixedAfd").getter(getter(VideoDescription::fixedAfd)).setter(setter(Builder::fixedAfd))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fixedAfd").build()).build();
private static final SdkField HEIGHT_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Height").getter(getter(VideoDescription::height)).setter(setter(Builder::height))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("height").build()).build();
private static final SdkField POSITION_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("Position").getter(getter(VideoDescription::position)).setter(setter(Builder::position))
.constructor(Rectangle::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("position").build()).build();
private static final SdkField RESPOND_TO_AFD_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("RespondToAfd").getter(getter(VideoDescription::respondToAfdAsString))
.setter(setter(Builder::respondToAfd))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("respondToAfd").build()).build();
private static final SdkField SCALING_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("ScalingBehavior").getter(getter(VideoDescription::scalingBehaviorAsString))
.setter(setter(Builder::scalingBehavior))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("scalingBehavior").build()).build();
private static final SdkField SHARPNESS_FIELD = SdkField. builder(MarshallingType.INTEGER)
.memberName("Sharpness").getter(getter(VideoDescription::sharpness)).setter(setter(Builder::sharpness))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("sharpness").build()).build();
private static final SdkField TIMECODE_INSERTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("TimecodeInsertion").getter(getter(VideoDescription::timecodeInsertionAsString))
.setter(setter(Builder::timecodeInsertion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("timecodeInsertion").build()).build();
private static final SdkField VIDEO_PREPROCESSORS_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("VideoPreprocessors")
.getter(getter(VideoDescription::videoPreprocessors)).setter(setter(Builder::videoPreprocessors))
.constructor(VideoPreprocessor::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("videoPreprocessors").build())
.build();
private static final SdkField WIDTH_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Width")
.getter(getter(VideoDescription::width)).setter(setter(Builder::width))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("width").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AFD_SIGNALING_FIELD,
ANTI_ALIAS_FIELD, CODEC_SETTINGS_FIELD, COLOR_METADATA_FIELD, CROP_FIELD, DROP_FRAME_TIMECODE_FIELD, FIXED_AFD_FIELD,
HEIGHT_FIELD, POSITION_FIELD, RESPOND_TO_AFD_FIELD, SCALING_BEHAVIOR_FIELD, SHARPNESS_FIELD,
TIMECODE_INSERTION_FIELD, VIDEO_PREPROCESSORS_FIELD, WIDTH_FIELD));
private static final long serialVersionUID = 1L;
private final String afdSignaling;
private final String antiAlias;
private final VideoCodecSettings codecSettings;
private final String colorMetadata;
private final Rectangle crop;
private final String dropFrameTimecode;
private final Integer fixedAfd;
private final Integer height;
private final Rectangle position;
private final String respondToAfd;
private final String scalingBehavior;
private final Integer sharpness;
private final String timecodeInsertion;
private final VideoPreprocessor videoPreprocessors;
private final Integer width;
private VideoDescription(BuilderImpl builder) {
this.afdSignaling = builder.afdSignaling;
this.antiAlias = builder.antiAlias;
this.codecSettings = builder.codecSettings;
this.colorMetadata = builder.colorMetadata;
this.crop = builder.crop;
this.dropFrameTimecode = builder.dropFrameTimecode;
this.fixedAfd = builder.fixedAfd;
this.height = builder.height;
this.position = builder.position;
this.respondToAfd = builder.respondToAfd;
this.scalingBehavior = builder.scalingBehavior;
this.sharpness = builder.sharpness;
this.timecodeInsertion = builder.timecodeInsertion;
this.videoPreprocessors = builder.videoPreprocessors;
this.width = builder.width;
}
/**
* This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling to specify whether the
* service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD
* values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the
* job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #afdSignaling} will
* return {@link AfdSignaling#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #afdSignalingAsString}.
*
*
* @return This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling to specify whether
* the service includes AFD values in the output video data and what those values are. * Choose None to
* remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the
* value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler
* data.
* @see AfdSignaling
*/
public final AfdSignaling afdSignaling() {
return AfdSignaling.fromValue(afdSignaling);
}
/**
* This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling to specify whether the
* service includes AFD values in the output video data and what those values are. * Choose None to remove all AFD
* values from this output. * Choose Fixed to ignore input AFD values and instead encode the value specified in the
* job. * Choose Auto to calculate output AFD values based on the input AFD scaler data.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #afdSignaling} will
* return {@link AfdSignaling#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #afdSignalingAsString}.
*
*
* @return This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert AFD signaling to specify whether
* the service includes AFD values in the output video data and what those values are. * Choose None to
* remove all AFD values from this output. * Choose Fixed to ignore input AFD values and instead encode the
* value specified in the job. * Choose Auto to calculate output AFD values based on the input AFD scaler
* data.
* @see AfdSignaling
*/
public final String afdSignalingAsString() {
return afdSignaling;
}
/**
* The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED
* for AntiAlias. If you specify that in your job, the service will ignore the setting.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #antiAlias} will
* return {@link AntiAlias#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #antiAliasAsString}.
*
*
* @return The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value
* DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
* @see AntiAlias
*/
public final AntiAlias antiAlias() {
return AntiAlias.fromValue(antiAlias);
}
/**
* The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value DISABLED
* for AntiAlias. If you specify that in your job, the service will ignore the setting.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #antiAlias} will
* return {@link AntiAlias#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #antiAliasAsString}.
*
*
* @return The anti-alias filter is automatically applied to all outputs. The service no longer accepts the value
* DISABLED for AntiAlias. If you specify that in your job, the service will ignore the setting.
* @see AntiAlias
*/
public final String antiAliasAsString() {
return antiAlias;
}
/**
* Video codec settings contains the group of settings related to video encoding. The settings in this group vary
* depending on the value that you choose for Video codec. For each codec enum that you choose, define the
* corresponding settings object. The following lists the codec enum, settings object pairs. * AV1, Av1Settings *
* AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings * H_265, H265Settings *
* MPEG2, Mpeg2Settings * PRORES, ProresSettings * UNCOMPRESSED, UncompressedSettings * VC3, Vc3Settings * VP8,
* Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
*
* @return Video codec settings contains the group of settings related to video encoding. The settings in this group
* vary depending on the value that you choose for Video codec. For each codec enum that you choose, define
* the corresponding settings object. The following lists the codec enum, settings object pairs. * AV1,
* Av1Settings * AVC_INTRA, AvcIntraSettings * FRAME_CAPTURE, FrameCaptureSettings * H_264, H264Settings *
* H_265, H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * UNCOMPRESSED, UncompressedSettings
* * VC3, Vc3Settings * VP8, Vp8Settings * VP9, Vp9Settings * XAVC, XavcSettings
*/
public final VideoCodecSettings codecSettings() {
return codecSettings;
}
/**
* Choose Insert for this setting to include color metadata in this output. Choose Ignore to exclude color metadata
* from this output. If you don't specify a value, the service sets this to Insert by default.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #colorMetadata}
* will return {@link ColorMetadata#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #colorMetadataAsString}.
*
*
* @return Choose Insert for this setting to include color metadata in this output. Choose Ignore to exclude color
* metadata from this output. If you don't specify a value, the service sets this to Insert by default.
* @see ColorMetadata
*/
public final ColorMetadata colorMetadata() {
return ColorMetadata.fromValue(colorMetadata);
}
/**
* Choose Insert for this setting to include color metadata in this output. Choose Ignore to exclude color metadata
* from this output. If you don't specify a value, the service sets this to Insert by default.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #colorMetadata}
* will return {@link ColorMetadata#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #colorMetadataAsString}.
*
*
* @return Choose Insert for this setting to include color metadata in this output. Choose Ignore to exclude color
* metadata from this output. If you don't specify a value, the service sets this to Insert by default.
* @see ColorMetadata
*/
public final String colorMetadataAsString() {
return colorMetadata;
}
/**
* Use Cropping selection to specify the video area that the service will include in the output video frame.
*
* @return Use Cropping selection to specify the video area that the service will include in the output video frame.
*/
public final Rectangle crop() {
return crop;
}
/**
* Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on
* outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This
* setting is enabled by default when Timecode insertion is enabled.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dropFrameTimecode}
* will return {@link DropFrameTimecode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #dropFrameTimecodeAsString}.
*
*
* @return Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode
* on outputs. If it is not possible to use drop-frame timecode, the system will fall back to
* non-drop-frame. This setting is enabled by default when Timecode insertion is enabled.
* @see DropFrameTimecode
*/
public final DropFrameTimecode dropFrameTimecode() {
return DropFrameTimecode.fromValue(dropFrameTimecode);
}
/**
* Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode on
* outputs. If it is not possible to use drop-frame timecode, the system will fall back to non-drop-frame. This
* setting is enabled by default when Timecode insertion is enabled.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #dropFrameTimecode}
* will return {@link DropFrameTimecode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #dropFrameTimecodeAsString}.
*
*
* @return Applies only to 29.97 fps outputs. When this feature is enabled, the service will use drop-frame timecode
* on outputs. If it is not possible to use drop-frame timecode, the system will fall back to
* non-drop-frame. This setting is enabled by default when Timecode insertion is enabled.
* @see DropFrameTimecode
*/
public final String dropFrameTimecodeAsString() {
return dropFrameTimecode;
}
/**
* Applies only if you set AFD Signaling to Fixed. Use Fixed to specify a four-bit AFD value which the service will
* write on all frames of this video output.
*
* @return Applies only if you set AFD Signaling to Fixed. Use Fixed to specify a four-bit AFD value which the
* service will write on all frames of this video output.
*/
public final Integer fixedAfd() {
return fixedAfd;
}
/**
* Use Height to define the video resolution height, in pixels, for this output. To use the same resolution as your
* input: Leave both Width and Height blank. To evenly scale from your input resolution: Leave Height blank and
* enter a value for Width. For example, if your input is 1920x1080 and you set Width to 1280, your output will be
* 1280x720.
*
* @return Use Height to define the video resolution height, in pixels, for this output. To use the same resolution
* as your input: Leave both Width and Height blank. To evenly scale from your input resolution: Leave
* Height blank and enter a value for Width. For example, if your input is 1920x1080 and you set Width to
* 1280, your output will be 1280x720.
*/
public final Integer height() {
return height;
}
/**
* Use Selection placement to define the video area in your output frame. The area outside of the rectangle that you
* specify here is black.
*
* @return Use Selection placement to define the video area in your output frame. The area outside of the rectangle
* that you specify here is black.
*/
public final Rectangle position() {
return position;
}
/**
* Use Respond to AFD to specify how the service changes the video itself in response to AFD values in the input. *
* Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output
* display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling
* is set to NONE. A preferred implementation of this workflow is to set RespondToAfd to and set AfdSignaling to
* AUTO. * Choose None to remove all input AFD values from this output.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #respondToAfd} will
* return {@link RespondToAfd#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #respondToAfdAsString}.
*
*
* @return Use Respond to AFD to specify how the service changes the video itself in response to AFD values in the
* input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect
* ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not
* choose this when AfdSignaling is set to NONE. A preferred implementation of this workflow is to set
* RespondToAfd to and set AfdSignaling to AUTO. * Choose None to remove all input AFD values from this
* output.
* @see RespondToAfd
*/
public final RespondToAfd respondToAfd() {
return RespondToAfd.fromValue(respondToAfd);
}
/**
* Use Respond to AFD to specify how the service changes the video itself in response to AFD values in the input. *
* Choose Respond to clip the input video frame according to the AFD value, input display aspect ratio, and output
* display aspect ratio. * Choose Passthrough to include the input AFD values. Do not choose this when AfdSignaling
* is set to NONE. A preferred implementation of this workflow is to set RespondToAfd to and set AfdSignaling to
* AUTO. * Choose None to remove all input AFD values from this output.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #respondToAfd} will
* return {@link RespondToAfd#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #respondToAfdAsString}.
*
*
* @return Use Respond to AFD to specify how the service changes the video itself in response to AFD values in the
* input. * Choose Respond to clip the input video frame according to the AFD value, input display aspect
* ratio, and output display aspect ratio. * Choose Passthrough to include the input AFD values. Do not
* choose this when AfdSignaling is set to NONE. A preferred implementation of this workflow is to set
* RespondToAfd to and set AfdSignaling to AUTO. * Choose None to remove all input AFD values from this
* output.
* @see RespondToAfd
*/
public final String respondToAfdAsString() {
return respondToAfd;
}
/**
* Specify the video Scaling behavior when your output has a different resolution than your input. For more
* information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-scaling.html
*
* If the service returns an enum value that is not available in the current SDK version, {@link #scalingBehavior}
* will return {@link ScalingBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #scalingBehaviorAsString}.
*
*
* @return Specify the video Scaling behavior when your output has a different resolution than your input. For more
* information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-scaling.html
* @see ScalingBehavior
*/
public final ScalingBehavior scalingBehavior() {
return ScalingBehavior.fromValue(scalingBehavior);
}
/**
* Specify the video Scaling behavior when your output has a different resolution than your input. For more
* information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-scaling.html
*
* If the service returns an enum value that is not available in the current SDK version, {@link #scalingBehavior}
* will return {@link ScalingBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available
* from {@link #scalingBehaviorAsString}.
*
*
* @return Specify the video Scaling behavior when your output has a different resolution than your input. For more
* information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/video-scaling.html
* @see ScalingBehavior
*/
public final String scalingBehaviorAsString() {
return scalingBehavior;
}
/**
* Use Sharpness setting to specify the strength of anti-aliasing. This setting changes the width of the anti-alias
* filter kernel used for scaling. Sharpness only applies if your output resolution is different from your input
* resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most content.
*
* @return Use Sharpness setting to specify the strength of anti-aliasing. This setting changes the width of the
* anti-alias filter kernel used for scaling. Sharpness only applies if your output resolution is different
* from your input resolution. 0 is the softest setting, 100 the sharpest, and 50 recommended for most
* content.
*/
public final Integer sharpness() {
return sharpness;
}
/**
* Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate
* is identical to the output frame rate. To include timecodes in this output, set Timecode insertion to
* PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in
* an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set
* the timecode for the first output frame to zero. To change this default behavior, adjust the settings under
* Timecode configuration. In the console, these settings are located under Job > Job settings > Timecode
* configuration. Note - Timecode source under input settings does not affect the timecodes that are inserted in the
* output. Source under Job settings > Timecode configuration does.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #timecodeInsertion}
* will return {@link VideoTimecodeInsertion#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #timecodeInsertionAsString}.
*
*
* @return Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input
* frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode
* insertion to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service
* inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are
* present, the service will set the timecode for the first output frame to zero. To change this default
* behavior, adjust the settings under Timecode configuration. In the console, these settings are located
* under Job > Job settings > Timecode configuration. Note - Timecode source under input settings does not
* affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration
* does.
* @see VideoTimecodeInsertion
*/
public final VideoTimecodeInsertion timecodeInsertion() {
return VideoTimecodeInsertion.fromValue(timecodeInsertion);
}
/**
* Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input frame rate
* is identical to the output frame rate. To include timecodes in this output, set Timecode insertion to
* PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service inserts timecodes in
* an output, by default, it uses any embedded timecodes from the input. If none are present, the service will set
* the timecode for the first output frame to zero. To change this default behavior, adjust the settings under
* Timecode configuration. In the console, these settings are located under Job > Job settings > Timecode
* configuration. Note - Timecode source under input settings does not affect the timecodes that are inserted in the
* output. Source under Job settings > Timecode configuration does.
*
* If the service returns an enum value that is not available in the current SDK version, {@link #timecodeInsertion}
* will return {@link VideoTimecodeInsertion#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is
* available from {@link #timecodeInsertionAsString}.
*
*
* @return Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode insertion when the input
* frame rate is identical to the output frame rate. To include timecodes in this output, set Timecode
* insertion to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. When the service
* inserts timecodes in an output, by default, it uses any embedded timecodes from the input. If none are
* present, the service will set the timecode for the first output frame to zero. To change this default
* behavior, adjust the settings under Timecode configuration. In the console, these settings are located
* under Job > Job settings > Timecode configuration. Note - Timecode source under input settings does not
* affect the timecodes that are inserted in the output. Source under Job settings > Timecode configuration
* does.
* @see VideoTimecodeInsertion
*/
public final String timecodeInsertionAsString() {
return timecodeInsertion;
}
/**
* Find additional transcoding features under Preprocessors. Enable the features at each output individually. These
* features are disabled by default.
*
* @return Find additional transcoding features under Preprocessors. Enable the features at each output
* individually. These features are disabled by default.
*/
public final VideoPreprocessor videoPreprocessors() {
return videoPreprocessors;
}
/**
* Use Width to define the video resolution width, in pixels, for this output. To use the same resolution as your
* input: Leave both Width and Height blank. To evenly scale from your input resolution: Leave Width blank and enter
* a value for Height. For example, if your input is 1920x1080 and you set Height to 720, your output will be
* 1280x720.
*
* @return Use Width to define the video resolution width, in pixels, for this output. To use the same resolution as
* your input: Leave both Width and Height blank. To evenly scale from your input resolution: Leave Width
* blank and enter a value for Height. For example, if your input is 1920x1080 and you set Height to 720,
* your output will be 1280x720.
*/
public final Integer width() {
return width;
}
@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(afdSignalingAsString());
hashCode = 31 * hashCode + Objects.hashCode(antiAliasAsString());
hashCode = 31 * hashCode + Objects.hashCode(codecSettings());
hashCode = 31 * hashCode + Objects.hashCode(colorMetadataAsString());
hashCode = 31 * hashCode + Objects.hashCode(crop());
hashCode = 31 * hashCode + Objects.hashCode(dropFrameTimecodeAsString());
hashCode = 31 * hashCode + Objects.hashCode(fixedAfd());
hashCode = 31 * hashCode + Objects.hashCode(height());
hashCode = 31 * hashCode + Objects.hashCode(position());
hashCode = 31 * hashCode + Objects.hashCode(respondToAfdAsString());
hashCode = 31 * hashCode + Objects.hashCode(scalingBehaviorAsString());
hashCode = 31 * hashCode + Objects.hashCode(sharpness());
hashCode = 31 * hashCode + Objects.hashCode(timecodeInsertionAsString());
hashCode = 31 * hashCode + Objects.hashCode(videoPreprocessors());
hashCode = 31 * hashCode + Objects.hashCode(width());
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 VideoDescription)) {
return false;
}
VideoDescription other = (VideoDescription) obj;
return Objects.equals(afdSignalingAsString(), other.afdSignalingAsString())
&& Objects.equals(antiAliasAsString(), other.antiAliasAsString())
&& Objects.equals(codecSettings(), other.codecSettings())
&& Objects.equals(colorMetadataAsString(), other.colorMetadataAsString()) && Objects.equals(crop(), other.crop())
&& Objects.equals(dropFrameTimecodeAsString(), other.dropFrameTimecodeAsString())
&& Objects.equals(fixedAfd(), other.fixedAfd()) && Objects.equals(height(), other.height())
&& Objects.equals(position(), other.position())
&& Objects.equals(respondToAfdAsString(), other.respondToAfdAsString())
&& Objects.equals(scalingBehaviorAsString(), other.scalingBehaviorAsString())
&& Objects.equals(sharpness(), other.sharpness())
&& Objects.equals(timecodeInsertionAsString(), other.timecodeInsertionAsString())
&& Objects.equals(videoPreprocessors(), other.videoPreprocessors()) && Objects.equals(width(), other.width());
}
/**
* 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("VideoDescription").add("AfdSignaling", afdSignalingAsString())
.add("AntiAlias", antiAliasAsString()).add("CodecSettings", codecSettings())
.add("ColorMetadata", colorMetadataAsString()).add("Crop", crop())
.add("DropFrameTimecode", dropFrameTimecodeAsString()).add("FixedAfd", fixedAfd()).add("Height", height())
.add("Position", position()).add("RespondToAfd", respondToAfdAsString())
.add("ScalingBehavior", scalingBehaviorAsString()).add("Sharpness", sharpness())
.add("TimecodeInsertion", timecodeInsertionAsString()).add("VideoPreprocessors", videoPreprocessors())
.add("Width", width()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "AfdSignaling":
return Optional.ofNullable(clazz.cast(afdSignalingAsString()));
case "AntiAlias":
return Optional.ofNullable(clazz.cast(antiAliasAsString()));
case "CodecSettings":
return Optional.ofNullable(clazz.cast(codecSettings()));
case "ColorMetadata":
return Optional.ofNullable(clazz.cast(colorMetadataAsString()));
case "Crop":
return Optional.ofNullable(clazz.cast(crop()));
case "DropFrameTimecode":
return Optional.ofNullable(clazz.cast(dropFrameTimecodeAsString()));
case "FixedAfd":
return Optional.ofNullable(clazz.cast(fixedAfd()));
case "Height":
return Optional.ofNullable(clazz.cast(height()));
case "Position":
return Optional.ofNullable(clazz.cast(position()));
case "RespondToAfd":
return Optional.ofNullable(clazz.cast(respondToAfdAsString()));
case "ScalingBehavior":
return Optional.ofNullable(clazz.cast(scalingBehaviorAsString()));
case "Sharpness":
return Optional.ofNullable(clazz.cast(sharpness()));
case "TimecodeInsertion":
return Optional.ofNullable(clazz.cast(timecodeInsertionAsString()));
case "VideoPreprocessors":
return Optional.ofNullable(clazz.cast(videoPreprocessors()));
case "Width":
return Optional.ofNullable(clazz.cast(width()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function