Class TransformationRequest
- java.lang.Object
-
- com.google.android.exoplayer2.transformer.TransformationRequest
-
@Deprecated public final class TransformationRequest extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.A media transformation request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TransformationRequest.Builder
Deprecated.A builder forTransformationRequest
instances.static interface
TransformationRequest.HdrMode
Deprecated.The strategy to use to transcode or edit High Dynamic Range (HDR) input video.
-
Field Summary
Fields Modifier and Type Field Description String
audioMimeType
Deprecated.The requested output audio sample MIME type, ornull
if inferred from the input.static int
HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR
Deprecated.Interpret HDR input as SDR, likely with a washed out look.static int
HDR_MODE_KEEP_HDR
Deprecated.Processes HDR input as HDR, to generate HDR output.static int
HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
Deprecated.Tone map HDR input to SDR before processing, to generate SDR output, using theMediaCodec
decoder tone-mapper.static int
HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GL
Deprecated.Tone map HDR input to SDR before processing, to generate SDR output, using an OpenGL tone-mapper.@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int
hdrMode
Deprecated.TheTransformationRequest.HdrMode
specifying how to handle HDR input video.int
outputHeight
Deprecated.The requested height of the output video.String
videoMimeType
Deprecated.The requested output video sample MIME type, ornull
if inferred from the input.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransformationRequest.Builder
buildUpon()
Deprecated.Returns a newTransformationRequest.Builder
initialized with the values of this instance.boolean
equals(Object o)
Deprecated.int
hashCode()
Deprecated.String
toString()
Deprecated.
-
-
-
Field Detail
-
HDR_MODE_KEEP_HDR
public static final int HDR_MODE_KEEP_HDR
Deprecated.Processes HDR input as HDR, to generate HDR output.The HDR output format (ex. color transfer) will be the same as the HDR input format.
Supported on API 31+, by some device and HDR format combinations.
If not supported,
Transformer
will attempt to useHDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
.- See Also:
- Constant Field Values
-
HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
public static final int HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
Deprecated.Tone map HDR input to SDR before processing, to generate SDR output, using theMediaCodec
decoder tone-mapper.Supported on API 31+, by some device and HDR format combinations. Tone-mapping is only guaranteed to be supported on API 33+, on devices with HDR capture support.
If not supported,
Transformer
throws anExportException
.- See Also:
- Constant Field Values
-
HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GL
public static final int HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GL
Deprecated.Tone map HDR input to SDR before processing, to generate SDR output, using an OpenGL tone-mapper.Supported on API 29+.
This may exhibit mild differences from
HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
, depending on the device's tone-mapping implementation, but should have much wider support and have more consistent results across devices.If not supported,
Transformer
throws anExportException
.- See Also:
- Constant Field Values
-
HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR
public static final int HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR
Deprecated.Interpret HDR input as SDR, likely with a washed out look.This is much more widely supported than
HDR_MODE_KEEP_HDR
andHDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC
. However, as HDR transfer functions and metadata will be ignored, contents will be displayed incorrectly, likely with a washed out look.Using this API may lead to codec errors before API 29.
Use of this flag may result in
ERROR_CODE_DECODING_FORMAT_UNSUPPORTED
.This field is experimental, and will be renamed or removed in a future release.
- See Also:
- Constant Field Values
-
outputHeight
public final int outputHeight
Deprecated.The requested height of the output video.This field is
- Always set to
C.LENGTH_UNSET
in theoriginalTransformationRequest
parameter ofTransformer.Listener.onFallbackApplied(Composition, TransformationRequest, TransformationRequest)
. - Set to
C.LENGTH_UNSET
in thefallbackTransformationRequest
parameter ofTransformer.Listener.onFallbackApplied(Composition, TransformationRequest, TransformationRequest)
to indicate that it is inferred from the input.
- Always set to
-
audioMimeType
@Nullable public final String audioMimeType
Deprecated.The requested output audio sample MIME type, ornull
if inferred from the input.
-
videoMimeType
@Nullable public final String videoMimeType
Deprecated.The requested output video sample MIME type, ornull
if inferred from the input.
-
hdrMode
public final @com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int hdrMode
Deprecated.TheTransformationRequest.HdrMode
specifying how to handle HDR input video.
-
-
Method Detail
-
buildUpon
public TransformationRequest.Builder buildUpon()
Deprecated.Returns a newTransformationRequest.Builder
initialized with the values of this instance.
-
-