Back to Exoplayer

TransformationException (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/transformer/TransformationException.html

latest21.6 KB
Original Source

Package com.google.android.exoplayer2.transformer

Class TransformationException


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTransformationExceptionextends[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")

Deprecated. Use ExportException instead.

See Also:Serialized Form

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | TransformationException.ErrorCode | Deprecated.

Error codes that identify causes of Transformer errors. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | ERROR_CODE_AUDIO_PROCESSING_FAILED | Deprecated.

Caused by an audio processing failure. | | static int | ERROR_CODE_DECODER_INIT_FAILED | Deprecated.

Caused by a decoder initialization failure. | | static int | ERROR_CODE_DECODING_FAILED | Deprecated.

Caused by a failure while trying to decode media samples. | | static int | ERROR_CODE_DECODING_FORMAT_UNSUPPORTED | Deprecated.

Caused by trying to decode content whose format is not supported. | | static int | ERROR_CODE_ENCODER_INIT_FAILED | Deprecated.

Caused by an encoder initialization failure. | | static int | ERROR_CODE_ENCODING_FAILED | Deprecated.

Caused by a failure while trying to encode media samples. | | static int | ERROR_CODE_ENCODING_FORMAT_UNSUPPORTED | Deprecated.

Caused by trying to encode content whose format is not supported. | | static int | ERROR_CODE_FAILED_RUNTIME_CHECK | Deprecated.

Caused by a failed runtime check. | | static int | ERROR_CODE_IO_BAD_HTTP_STATUS | Deprecated.

Caused by an HTTP server returning an unexpected HTTP response status code. | | static int | ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED | Deprecated.

Caused by the AssetLoader trying to access cleartext HTTP traffic (meaning http:// rather than https://) when the app's Network Security Configuration does not permit it. | | static int | ERROR_CODE_IO_FILE_NOT_FOUND | Deprecated.

Caused by a non-existent file. | | static int | ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE | Deprecated.

Caused by a server returning a resource with an invalid "Content-Type" HTTP header value. | | static int | ERROR_CODE_IO_NETWORK_CONNECTION_FAILED | Deprecated.

Caused by a network connection failure. | | static int | ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT | Deprecated.

Caused by a network timeout, meaning the server is taking too long to fulfill a request. | | static int | ERROR_CODE_IO_NO_PERMISSION | Deprecated.

Caused by lack of permission to perform an IO operation. | | static int | ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE | Deprecated.

Caused by reading data out of the data bound. | | static int | ERROR_CODE_IO_UNSPECIFIED | Deprecated.

Caused by an Input/Output error which could not be identified. | | static int | ERROR_CODE_MUXING_FAILED | Deprecated.

Caused by a failure while muxing media samples. | | static int | ERROR_CODE_UNSPECIFIED | Deprecated.

Caused by an error whose cause could not be identified. | | static int | ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED | Deprecated.

Caused by a video frame processing failure. | | @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int | errorCode | Deprecated.

An error code which identifies the cause of the transformation failure. | | long | timestampMs | Deprecated.

The value of SystemClock.elapsedRealtime() when this exception was created. |

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static TransformationException | createForAssetLoader​(Throwable cause, int errorCode) | Deprecated.

Creates an instance for an AssetLoader related exception. | | static TransformationException | createForAudioProcessing​(Throwable cause, AudioProcessor.AudioFormat audioFormat) | Deprecated.

Creates an instance for an audio processing related exception. | | static TransformationException | createForCodec​(Throwable cause, @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode, boolean isVideo, boolean isDecoder, Format format) | Deprecated.

Creates an instance for a Codec related exception. | | static TransformationException | createForCodec​(Throwable cause, @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode, boolean isVideo, boolean isDecoder, String details) | Deprecated.

Creates an instance for a Codec related exception. | | static TransformationException | createForUnexpected​(Exception cause) | Deprecated.

Creates an instance for an unexpected exception. | | boolean | errorInfoEquals​(TransformationException other) | Deprecated.

Returns whether the error data associated to this exception equals the error data associated to other. | | String | getErrorCodeName() | Deprecated.

Equivalent to TransformationException.getErrorCodeName(this.errorCode). | | static String | getErrorCodeName​(@com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode) | Deprecated.

Returns the name of a given errorCode. |

- 

Methods inherited from class java.lang.Throwable

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

- 

ERROR_CODE_UNSPECIFIED

public static final int ERROR_CODE_UNSPECIFIED

Deprecated.

Caused by an error whose cause could not be identified. See Also:Constant Field Values

- 

ERROR_CODE_FAILED_RUNTIME_CHECK

public static final int ERROR_CODE_FAILED_RUNTIME_CHECK

Deprecated.

Caused by a failed runtime check.

This can happen when transformer reaches an invalid state.

See Also:Constant Field Values

- 

ERROR_CODE_IO_UNSPECIFIED

public static final int ERROR_CODE_IO_UNSPECIFIED

Deprecated.

Caused by an Input/Output error which could not be identified. See Also:Constant Field Values

- 

ERROR_CODE_IO_NETWORK_CONNECTION_FAILED

public static final int ERROR_CODE_IO_NETWORK_CONNECTION_FAILED

Deprecated.

Caused by a network connection failure.

The following is a non-exhaustive list of possible reasons:

  - There is no network connectivity. 
  - The URL's domain is misspelled or does not exist. 
  - The target host is unreachable. 
  - The server unexpectedly closes the connection. 

See Also:Constant Field Values

- 

ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT

public static final int ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT

Deprecated.

Caused by a network timeout, meaning the server is taking too long to fulfill a request. See Also:Constant Field Values

- 

ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE

public static final int ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE

Deprecated.

Caused by a server returning a resource with an invalid "Content-Type" HTTP header value.

For example, this can happen when the AssetLoader is expecting a piece of media, but the server returns a paywall HTML page, with content type "text/html".

See Also:Constant Field Values

- 

ERROR_CODE_IO_BAD_HTTP_STATUS

public static final int ERROR_CODE_IO_BAD_HTTP_STATUS

Deprecated.

Caused by an HTTP server returning an unexpected HTTP response status code. See Also:Constant Field Values

- 

ERROR_CODE_IO_FILE_NOT_FOUND

public static final int ERROR_CODE_IO_FILE_NOT_FOUND

Deprecated.

Caused by a non-existent file. See Also:Constant Field Values

- 

ERROR_CODE_IO_NO_PERMISSION

public static final int ERROR_CODE_IO_NO_PERMISSION

Deprecated.

Caused by lack of permission to perform an IO operation. For example, lack of permission to access internet or external storage. See Also:Constant Field Values

- 

ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED

public static final int ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED

Deprecated.

Caused by the AssetLoader trying to access cleartext HTTP traffic (meaning http:// rather than https://) when the app's Network Security Configuration does not permit it. See Also:Constant Field Values

- 

ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE

public static final int ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE

Deprecated.

Caused by reading data out of the data bound. See Also:Constant Field Values

- 

ERROR_CODE_DECODER_INIT_FAILED

public static final int ERROR_CODE_DECODER_INIT_FAILED

Deprecated.

Caused by a decoder initialization failure. See Also:Constant Field Values

- 

ERROR_CODE_DECODING_FAILED

public static final int ERROR_CODE_DECODING_FAILED

Deprecated.

Caused by a failure while trying to decode media samples. See Also:Constant Field Values

- 

ERROR_CODE_DECODING_FORMAT_UNSUPPORTED

public static final int ERROR_CODE_DECODING_FORMAT_UNSUPPORTED

Deprecated.

Caused by trying to decode content whose format is not supported. See Also:Constant Field Values

- 

ERROR_CODE_ENCODER_INIT_FAILED

public static final int ERROR_CODE_ENCODER_INIT_FAILED

Deprecated.

Caused by an encoder initialization failure. See Also:Constant Field Values

- 

ERROR_CODE_ENCODING_FAILED

public static final int ERROR_CODE_ENCODING_FAILED

Deprecated.

Caused by a failure while trying to encode media samples. See Also:Constant Field Values

- 

ERROR_CODE_ENCODING_FORMAT_UNSUPPORTED

public static final int ERROR_CODE_ENCODING_FORMAT_UNSUPPORTED

Deprecated.

Caused by trying to encode content whose format is not supported. *

Supported output formats are limited by the encoders available.

See Also:Constant Field Values

- 

ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED

public static final int ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED

Deprecated.

Caused by a video frame processing failure. See Also:Constant Field Values

- 

ERROR_CODE_AUDIO_PROCESSING_FAILED

public static final int ERROR_CODE_AUDIO_PROCESSING_FAILED

Deprecated.

Caused by an audio processing failure. See Also:Constant Field Values

- 

ERROR_CODE_MUXING_FAILED

public static final int ERROR_CODE_MUXING_FAILED

Deprecated.

Caused by a failure while muxing media samples. See Also:Constant Field Values

- 

errorCode

public final @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode

Deprecated.

An error code which identifies the cause of the transformation failure.

- 

timestampMs

public final long timestampMs

Deprecated.

The value of SystemClock.elapsedRealtime() when this exception was created.

Method Detail

- 

getErrorCodeName

public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getErrorCodeName​(@com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode)

Deprecated.

Returns the name of a given errorCode.

- 

getErrorCodeName

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getErrorCodeName()

Deprecated.

Equivalent to TransformationException.getErrorCodeName(this.errorCode).

- 

createForAssetLoader

public static[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")createForAssetLoader​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,
                                                           int errorCode)

Deprecated.

Creates an instance for an AssetLoader related exception. Parameters:cause - The cause of the failure.errorCode - See errorCode.Returns:The created instance.

- 

createForCodec

public static[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")createForCodec​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,
                                                     @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode,
                                                     boolean isVideo,
                                                     boolean isDecoder,[Format](../Format.html "class in com.google.android.exoplayer2")format)

Deprecated.

Creates an instance for a Codec related exception.

This method should be used when the cause occurs before the Codec is initialized.

Parameters:cause - The cause of the failure.errorCode - See errorCode.isVideo - Whether the Codec is configured for video.isDecoder - Whether the exception is created for a decoder.format - The Format used for configuring the Codec.Returns:The created instance.

- 

createForCodec

public static[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")createForCodec​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,
                                                     @com.google.android.exoplayer2.transformer.TransformationException.ErrorCode int errorCode,
                                                     boolean isVideo,
                                                     boolean isDecoder,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")details)

Deprecated.

Creates an instance for a Codec related exception. Parameters:cause - The cause of the failure.errorCode - See errorCode.isVideo - Whether the Codec is configured for video.isDecoder - Whether the exception is created for a decoder.details - The details associated with this exception.Returns:The created instance.

- 

createForAudioProcessing

public static[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")createForAudioProcessing​([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,[AudioProcessor.AudioFormat](../audio/AudioProcessor.AudioFormat.html "class in com.google.android.exoplayer2.audio")audioFormat)

Deprecated.

Creates an instance for an audio processing related exception. Parameters:cause - The cause of the failure.audioFormat - The AudioProcessor.AudioFormat used.Returns:The created instance.

- 

createForUnexpected

public static[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")createForUnexpected​([Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")cause)

Deprecated.

Creates an instance for an unexpected exception.

If the exception is a runtime exception, error code ERROR_CODE_FAILED_RUNTIME_CHECK is used. Otherwise, the created instance has error code ERROR_CODE_UNSPECIFIED.

Parameters:cause - The cause of the failure.Returns:The created instance.

- 

errorInfoEquals

public boolean errorInfoEquals​(@Nullable[TransformationException](TransformationException.html "class in com.google.android.exoplayer2.transformer")other)

Deprecated.

Returns whether the error data associated to this exception equals the error data associated to other.

Note that this method does not compare the exceptions' stack traces.