Class TransformationRequest.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.transformer.TransformationRequest.Builder
-
- Enclosing class:
- TransformationRequest
public static final class TransformationRequest.Builder extends Object
A builder forTransformationRequest
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new instance with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransformationRequest
build()
Builds aTransformationRequest
instance.TransformationRequest.Builder
experimental_setEnableHdrEditing(boolean enableHdrEditing)
Deprecated.This method is now a no-op iffalse
, and setssetHdrMode(HDR_MODE_KEEP_HDR)
iftrue
.TransformationRequest.Builder
setAudioMimeType(String audioMimeType)
Sets the audio MIME type of the output.TransformationRequest.Builder
setEnableRequestSdrToneMapping(boolean enableRequestSdrToneMapping)
Deprecated.This method is now a no-op iffalse
, and setssetHdrMode(HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC)
iftrue
.TransformationRequest.Builder
setHdrMode(@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int hdrMode)
Sets theTransformationRequest.HdrMode
for HDR video input.TransformationRequest.Builder
setVideoMimeType(String videoMimeType)
Sets the video MIME type of the output.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new instance with default values.Use
TransformationRequest.buildUpon()
to obtain a builder representing an existingTransformationRequest
.
-
-
Method Detail
-
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:MimeTypes.VIDEO_H263
MimeTypes.VIDEO_H264
MimeTypes.VIDEO_H265
from API level 24MimeTypes.VIDEO_MP4V
- Parameters:
videoMimeType
- The MIME type of the video samples in the output.- Returns:
- This builder.
- Throws:
IllegalArgumentException
- If thevideoMimeType
is non-null but not a video MIME type.
-
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:
audioMimeType
- The MIME type of the audio samples in the output.- Returns:
- This builder.
- Throws:
IllegalArgumentException
- If theaudioMimeType
is non-null but not an audio MIME type.
-
setHdrMode
@CanIgnoreReturnValue public TransformationRequest.Builder setHdrMode(@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int hdrMode)
Sets theTransformationRequest.HdrMode
for HDR video input.The default value is
TransformationRequest.HDR_MODE_KEEP_HDR
.- Parameters:
hdrMode
- TheTransformationRequest.HdrMode
used.- Returns:
- This builder.
-
setEnableRequestSdrToneMapping
@Deprecated @CanIgnoreReturnValue public TransformationRequest.Builder setEnableRequestSdrToneMapping(boolean enableRequestSdrToneMapping)
Deprecated.This method is now a no-op iffalse
, and setssetHdrMode(HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC)
iftrue
. UsesetHdrMode(@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int)
withTransformationRequest.HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
instead.
-
experimental_setEnableHdrEditing
@Deprecated @CanIgnoreReturnValue public TransformationRequest.Builder experimental_setEnableHdrEditing(boolean enableHdrEditing)
Deprecated.This method is now a no-op iffalse
, and setssetHdrMode(HDR_MODE_KEEP_HDR)
iftrue
.experimental_setEnableHdrEditing(true)
is now the default behavior. UsesetHdrMode(@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int)
with linkTransformationRequest.HDR_MODE_KEEP_HDR
instead.
-
build
public TransformationRequest build()
Builds aTransformationRequest
instance.
-
-