public final class

TransformationRequest.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.transformer.TransformationRequest.Builder

Overview

A builder for TransformationRequest instances.

Summary

Constructors
publicBuilder()

Creates a new instance with default values.

Methods
public TransformationRequestbuild()

Builds a TransformationRequest instance.

public TransformationRequest.BuildersetAudioMimeType(java.lang.String audioMimeType)

Sets the audio MIME type of the output.

public TransformationRequest.BuildersetHdrMode(int hdrMode)

Sets the Composition.HdrMode for HDR video input.

public TransformationRequest.BuildersetVideoMimeType(java.lang.String videoMimeType)

Sets the video MIME type of the output.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a new instance with default values.

Use TransformationRequest.buildUpon() to obtain a builder representing an existing TransformationRequest.

Methods

public TransformationRequest.Builder setVideoMimeType(java.lang.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:

videoMimeType: The MIME type of the video samples in the output.

Returns:

This builder.

public TransformationRequest.Builder setAudioMimeType(java.lang.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:

audioMimeType: The MIME type of the audio samples in the output.

Returns:

This builder.

public TransformationRequest.Builder setHdrMode(int hdrMode)

Sets the Composition.HdrMode for HDR video input.

The default value is Composition.HDR_MODE_KEEP_HDR.

Parameters:

hdrMode: The Composition.HdrMode used.

Returns:

This builder.

public TransformationRequest build()

Builds a TransformationRequest instance.