mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix muxer failing in test
MediaMuxer does not support out-of-order video frames API 25. Use a test file with frames in order in loopingTranscodedAudio_producesExpectedResult. This is necessary for tests that transmux video samples. PiperOrigin-RevId: 524309318
This commit is contained in:
parent
fab3abfd7c
commit
9c5fca8e65
1 changed files with 4 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ package androidx.media3.transformer;
|
|||
import static androidx.media3.transformer.AndroidTestUtil.MP3_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.PNG_ASSET_URI_STRING;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
|
|
@ -281,7 +282,8 @@ public class TransformerEndToEndTest {
|
|||
new EditedMediaItemSequence(
|
||||
ImmutableList.of(audioEditedMediaItem, audioEditedMediaItem), /* isLooping= */ true);
|
||||
EditedMediaItem videoEditedMediaItem =
|
||||
new EditedMediaItem.Builder(MediaItem.fromUri(MP4_ASSET_URI_STRING))
|
||||
new EditedMediaItem.Builder(
|
||||
MediaItem.fromUri(MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING))
|
||||
.setRemoveAudio(true)
|
||||
.build();
|
||||
EditedMediaItemSequence videoSequence =
|
||||
|
|
@ -300,7 +302,7 @@ public class TransformerEndToEndTest {
|
|||
assertThat(result.exportResult.processedInputs).hasSize(6);
|
||||
assertThat(result.exportResult.channelCount).isEqualTo(1);
|
||||
assertThat(result.exportResult.videoFrameCount).isEqualTo(90);
|
||||
assertThat(result.exportResult.durationMs).isEqualTo(3015);
|
||||
assertThat(result.exportResult.durationMs).isEqualTo(2980);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in a new issue