Commit 92303810 by claincly Committed by Ian Baker

Removing using the test asset that has Mp3 audio track.

The stream with the mp3 track is added because

- We only encode to AAC
- We only encode when the source track is not AAC

Now that we have a way to force encoding, we no longer need the mp3 track.

The test asset is kept for later parameterized testing.

PiperOrigin-RevId: 440876080
parent e4b0c207
...@@ -26,7 +26,6 @@ import com.google.android.exoplayer2.transformer.TransformationRequest; ...@@ -26,7 +26,6 @@ import com.google.android.exoplayer2.transformer.TransformationRequest;
import com.google.android.exoplayer2.transformer.TransformationTestResult; import com.google.android.exoplayer2.transformer.TransformationTestResult;
import com.google.android.exoplayer2.transformer.Transformer; import com.google.android.exoplayer2.transformer.Transformer;
import com.google.android.exoplayer2.transformer.TransformerAndroidTestRunner; import com.google.android.exoplayer2.transformer.TransformerAndroidTestRunner;
import com.google.android.exoplayer2.util.MimeTypes;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import org.junit.Test; import org.junit.Test;
...@@ -46,11 +45,8 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -46,11 +45,8 @@ public final class RepeatedTranscodeTransformationTest {
context, context,
new Transformer.Builder(context) new Transformer.Builder(context)
.setTransformationRequest( .setTransformationRequest(
new TransformationRequest.Builder() new TransformationRequest.Builder().setRotationDegrees(45).build())
.setRotationDegrees(45) .setEncoderFactory(AndroidTestUtil.FORCE_ENCODE_ENCODER_FACTORY)
// Video MIME type is H264.
.setAudioMimeType(MimeTypes.AUDIO_AAC)
.build())
.build()) .build())
.build(); .build();
...@@ -60,7 +56,7 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -60,7 +56,7 @@ public final class RepeatedTranscodeTransformationTest {
TransformationTestResult testResult = TransformationTestResult testResult =
transformerRunner.run( transformerRunner.run(
/* testId= */ "repeatedTranscode_givesConsistentLengthOutput_" + i, /* testId= */ "repeatedTranscode_givesConsistentLengthOutput_" + i,
AndroidTestUtil.MP4_REMOTE_H264_MP3_URI_STRING); AndroidTestUtil.MP4_REMOTE_10_SECONDS_URI_STRING);
differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes)); differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes));
} }
...@@ -79,10 +75,8 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -79,10 +75,8 @@ public final class RepeatedTranscodeTransformationTest {
new Transformer.Builder(context) new Transformer.Builder(context)
.setRemoveAudio(true) .setRemoveAudio(true)
.setTransformationRequest( .setTransformationRequest(
new TransformationRequest.Builder() new TransformationRequest.Builder().setRotationDegrees(45).build())
// Video MIME type is H264. .setEncoderFactory(AndroidTestUtil.FORCE_ENCODE_ENCODER_FACTORY)
.setRotationDegrees(45)
.build())
.build()) .build())
.build(); .build();
...@@ -92,7 +86,7 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -92,7 +86,7 @@ public final class RepeatedTranscodeTransformationTest {
TransformationTestResult testResult = TransformationTestResult testResult =
transformerRunner.run( transformerRunner.run(
/* testId= */ "repeatedTranscodeNoAudio_givesConsistentLengthOutput_" + i, /* testId= */ "repeatedTranscodeNoAudio_givesConsistentLengthOutput_" + i,
AndroidTestUtil.MP4_REMOTE_H264_MP3_URI_STRING); AndroidTestUtil.MP4_REMOTE_10_SECONDS_URI_STRING);
differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes)); differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes));
} }
...@@ -110,10 +104,8 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -110,10 +104,8 @@ public final class RepeatedTranscodeTransformationTest {
context, context,
new Transformer.Builder(context) new Transformer.Builder(context)
.setRemoveVideo(true) .setRemoveVideo(true)
.setTransformationRequest( .setTransformationRequest(new TransformationRequest.Builder().build())
new TransformationRequest.Builder() .setEncoderFactory(AndroidTestUtil.FORCE_ENCODE_ENCODER_FACTORY)
.setAudioMimeType(MimeTypes.AUDIO_AAC)
.build())
.build()) .build())
.build(); .build();
...@@ -123,7 +115,7 @@ public final class RepeatedTranscodeTransformationTest { ...@@ -123,7 +115,7 @@ public final class RepeatedTranscodeTransformationTest {
TransformationTestResult testResult = TransformationTestResult testResult =
transformerRunner.run( transformerRunner.run(
/* testId= */ "repeatedTranscodeNoVideo_givesConsistentLengthOutput_" + i, /* testId= */ "repeatedTranscodeNoVideo_givesConsistentLengthOutput_" + i,
AndroidTestUtil.MP4_REMOTE_H264_MP3_URI_STRING); AndroidTestUtil.MP4_REMOTE_10_SECONDS_URI_STRING);
differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes)); differentOutputSizesBytes.add(checkNotNull(testResult.transformationResult.fileSizeBytes));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment