TransformationRequest.Builder


public final class TransformationRequest.Builder


A builder for TransformationRequest instances.

Summary

Public constructors

Creates a new instance with default values.

Public methods

TransformationRequest

Builds a TransformationRequest instance.

TransformationRequest.Builder

Sets the audio MIME type of the output.

TransformationRequest.Builder

Sets the Composition.HdrMode for HDR video input.

TransformationRequest.Builder

Sets the video MIME type of the output.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Use buildUpon to obtain a builder representing an existing TransformationRequest.

Public methods

build

public TransformationRequest build()

Builds a TransformationRequest instance.

setAudioMimeType

@CanIgnoreReturnValue
public TransformationRequest.Builder setAudioMimeType(@Nullable String audioMimeType)

Sets the audio MIME type of the output.

The default value is null which corresponds to using the same MIME type as the input. Supported MIME types are:

Parameters
@Nullable String audioMimeType

The MIME type of the audio samples in the output.

Returns
TransformationRequest.Builder

This builder.

Throws
java.lang.IllegalArgumentException

If the audioMimeType is non-null but not an audio MIME type.

setHdrMode

@CanIgnoreReturnValue
public TransformationRequest.Builder setHdrMode(@Composition.HdrMode int hdrMode)

Sets the Composition.HdrMode for HDR video input.

The default value is HDR_MODE_KEEP_HDR.

Parameters
@Composition.HdrMode int hdrMode

The Composition.HdrMode used.

Returns
TransformationRequest.Builder

This builder.

setVideoMimeType

@CanIgnoreReturnValue
public TransformationRequest.Builder setVideoMimeType(@Nullable String videoMimeType)

Sets the video MIME type of the output.

The default value is null which corresponds to using the same MIME type as the input. Supported MIME types are:

Parameters
@Nullable String videoMimeType

The MIME type of the video samples in the output.

Returns
TransformationRequest.Builder

This builder.

Throws
java.lang.IllegalArgumentException

If the videoMimeType is non-null but not a video MIME type.