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 classTransformationRequest.BuilderDeprecated.A builder forTransformationRequestinstances.static interfaceTransformationRequest.HdrModeDeprecated.The strategy to use to transcode or edit High Dynamic Range (HDR) input video.
-
Field Summary
Fields Modifier and Type Field Description StringaudioMimeTypeDeprecated.The requested output audio sample MIME type, ornullif inferred from the input.static intHDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDRDeprecated.Interpret HDR input as SDR, likely with a washed out look.static intHDR_MODE_KEEP_HDRDeprecated.Processes HDR input as HDR, to generate HDR output.static intHDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODECDeprecated.Tone map HDR input to SDR before processing, to generate SDR output, using theMediaCodecdecoder tone-mapper.static intHDR_MODE_TONE_MAP_HDR_TO_SDR_USING_OPEN_GLDeprecated.Tone map HDR input to SDR before processing, to generate SDR output, using an OpenGL tone-mapper.@com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode inthdrModeDeprecated.TheTransformationRequest.HdrModespecifying how to handle HDR input video.intoutputHeightDeprecated.The requested height of the output video.StringvideoMimeTypeDeprecated.The requested output video sample MIME type, ornullif inferred from the input.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransformationRequest.BuilderbuildUpon()Deprecated.Returns a newTransformationRequest.Builderinitialized with the values of this instance.booleanequals(Object o)Deprecated.inthashCode()Deprecated.StringtoString()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,
Transformerwill 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 theMediaCodecdecoder 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,
Transformerthrows 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,
Transformerthrows 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_HDRandHDR_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_UNSETin theoriginalTransformationRequestparameter ofTransformer.Listener.onFallbackApplied(Composition, TransformationRequest, TransformationRequest). - Set to
C.LENGTH_UNSETin thefallbackTransformationRequestparameter 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, ornullif inferred from the input.
-
videoMimeType
@Nullable public final String videoMimeType
Deprecated.The requested output video sample MIME type, ornullif inferred from the input.
-
hdrMode
public final @com.google.android.exoplayer2.transformer.TransformationRequest.HdrMode int hdrMode
Deprecated.TheTransformationRequest.HdrModespecifying how to handle HDR input video.
-
-
Method Detail
-
buildUpon
public TransformationRequest.Builder buildUpon()
Deprecated.Returns a newTransformationRequest.Builderinitialized with the values of this instance.
-
-