mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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.MP3_ASSET_URI_STRING;
|
||||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_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_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 androidx.media3.transformer.AndroidTestUtil.PNG_ASSET_URI_STRING;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static org.junit.Assert.assertThrows;
|
import static org.junit.Assert.assertThrows;
|
||||||
|
|
@ -281,7 +282,8 @@ public class TransformerEndToEndTest {
|
||||||
new EditedMediaItemSequence(
|
new EditedMediaItemSequence(
|
||||||
ImmutableList.of(audioEditedMediaItem, audioEditedMediaItem), /* isLooping= */ true);
|
ImmutableList.of(audioEditedMediaItem, audioEditedMediaItem), /* isLooping= */ true);
|
||||||
EditedMediaItem videoEditedMediaItem =
|
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)
|
.setRemoveAudio(true)
|
||||||
.build();
|
.build();
|
||||||
EditedMediaItemSequence videoSequence =
|
EditedMediaItemSequence videoSequence =
|
||||||
|
|
@ -300,7 +302,7 @@ public class TransformerEndToEndTest {
|
||||||
assertThat(result.exportResult.processedInputs).hasSize(6);
|
assertThat(result.exportResult.processedInputs).hasSize(6);
|
||||||
assertThat(result.exportResult.channelCount).isEqualTo(1);
|
assertThat(result.exportResult.channelCount).isEqualTo(1);
|
||||||
assertThat(result.exportResult.videoFrameCount).isEqualTo(90);
|
assertThat(result.exportResult.videoFrameCount).isEqualTo(90);
|
||||||
assertThat(result.exportResult.durationMs).isEqualTo(3015);
|
assertThat(result.exportResult.durationMs).isEqualTo(2980);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue