mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Add test skipping for API < 23 for EncoderPerformanceTest.
PiperOrigin-RevId: 439802597
This commit is contained in:
parent
09f9a44d0f
commit
1ea4fbb720
1 changed files with 11 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.google.android.exoplayer2.transformer.mh.analysis;
|
||||
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.recordTestSkipped;
|
||||
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
||||
|
||||
import android.content.Context;
|
||||
|
|
@ -95,13 +96,22 @@ public class EncoderPerformanceAnalysisTest {
|
|||
String testId =
|
||||
Util.formatInvariant(
|
||||
"analyzePerformance_%s_OpRate_%d_Priority_%d", filename, operatingRate, priority);
|
||||
Context context = ApplicationProvider.getApplicationContext();
|
||||
|
||||
if (Util.SDK_INT < 23) {
|
||||
recordTestSkipped(
|
||||
context,
|
||||
testId,
|
||||
/* reason= */ "Skipping on this API version due to lack of support for setting operating"
|
||||
+ " rate and priority.");
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> inputValues = new HashMap<>();
|
||||
inputValues.put("inputFilename", filename);
|
||||
inputValues.put("operatingRate", operatingRate);
|
||||
inputValues.put("priority", priority);
|
||||
|
||||
Context context = ApplicationProvider.getApplicationContext();
|
||||
Transformer transformer =
|
||||
new Transformer.Builder(context)
|
||||
.setRemoveAudio(true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue