FormatSupportAssumptions
@UnstableApi
class FormatSupportAssumptions
Utility methods for checking and assuming format support in instrumentation tests.
These methods are used to skip tests based on device capabilities for decoding and encoding specific media formats.
Summary
Public functions |
|
|---|---|
java-static Unit |
assumeAllFormatsSupported(
|
java-static Unit |
assumeFormatsSupported(
|
java-static Unit |
assumeFormatsSupported(
|
Public functions
assumeAllFormatsSupported
java-static fun assumeAllFormatsSupported(
context: Context!,
testId: String!,
inputFormats: (Mutable)List<Format!>!,
outputFormat: Format?
): Unit
Assumes that the device supports decoding the input formats, and encoding/muxing the output format if needed.
| Parameters | |
|---|---|
context: Context! |
The |
testId: String! |
The test ID. |
inputFormats: (Mutable)List<Format!>! |
The |
outputFormat: Format? |
The |
| Throws | |
|---|---|
org.junit.AssumptionViolatedException |
If the device does not support the formats. In this case, the reason for skipping the test is logged. |
java.io.IOException |
|
org.json.JSONException |
|
androidx.media3.exoplayer.mediacodec.MediaCodecUtil.DecoderQueryException |
assumeFormatsSupported
java-static fun assumeFormatsSupported(
context: Context!,
testId: String!,
inputFormat: Format?,
outputFormat: Format?
): Unit
Assumes that the device supports decoding the input format, and encoding/muxing the output format if needed.
This is equivalent to calling assumeFormatsSupported with isPortraitEncodingEnabled set to false.
assumeFormatsSupported
java-static fun assumeFormatsSupported(
context: Context!,
testId: String!,
inputFormat: Format?,
outputFormat: Format?,
isPortraitEncodingEnabled: Boolean
): Unit
Assumes that the device supports decoding the input format, and encoding/muxing the output format if needed.
| Parameters | |
|---|---|
context: Context! |
The |
testId: String! |
The test ID. |
inputFormat: Format? |
The |
outputFormat: Format? |
The |
isPortraitEncodingEnabled: Boolean |
Whether portrait encoding is enabled. |
| Throws | |
|---|---|
org.junit.AssumptionViolatedException |
If the device does not support the formats. In this case, the reason for skipping the test is logged. |
java.io.IOException |
|
org.json.JSONException |
|
androidx.media3.exoplayer.mediacodec.MediaCodecUtil.DecoderQueryException |