TransformationRequest.Builder


class TransformationRequest.Builder


A builder for TransformationRequest instances.

Summary

Public constructors

Creates a new instance with default values.

Public functions

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

Builder()

Creates a new instance with default values.

Use buildUpon to obtain a builder representing an existing TransformationRequest.

Public functions

build

fun build(): TransformationRequest!

Builds a TransformationRequest instance.

setAudioMimeType

@CanIgnoreReturnValue
fun setAudioMimeType(audioMimeType: String?): TransformationRequest.Builder!

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
audioMimeType: String?

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
fun setHdrMode(@Composition.HdrMode hdrMode: Int): TransformationRequest.Builder!

Sets the Composition.HdrMode for HDR video input.

The default value is HDR_MODE_KEEP_HDR.

Parameters
@Composition.HdrMode hdrMode: Int

The Composition.HdrMode used.

Returns
TransformationRequest.Builder!

This builder.

setVideoMimeType

@CanIgnoreReturnValue
fun setVideoMimeType(videoMimeType: String?): TransformationRequest.Builder!

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
videoMimeType: String?

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.