mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Update mixed input test to include images of different aspect ratios
Makes this test a little more thorough.
PiperOrigin-RevId: 532386515
(cherry picked from commit 88642587ac)
This commit is contained in:
parent
04a00c7ac4
commit
43f8d080df
2 changed files with 8 additions and 8 deletions
|
|
@ -64,6 +64,7 @@ public final class AndroidTestUtil {
|
|||
|
||||
public static final String PNG_ASSET_URI_STRING =
|
||||
"asset:///media/bitmap/input_images/media3test.png";
|
||||
public static final String JPG_ASSET_URI_STRING = "asset:///media/bitmap/input_images/london.jpg";
|
||||
|
||||
public static final String MP4_ASSET_URI_STRING = "asset:///media/mp4/sample.mp4";
|
||||
public static final Format MP4_ASSET_FORMAT =
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package androidx.media3.transformer;
|
||||
|
||||
import static androidx.media3.transformer.AndroidTestUtil.JPG_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static androidx.media3.transformer.AndroidTestUtil.PNG_ASSET_URI_STRING;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
|
@ -89,8 +90,6 @@ public class TransformerMixedInputEndToEndTest {
|
|||
int imageFrameCount = 32;
|
||||
EditedMediaItem imageEditedMediaItem =
|
||||
createImageEditedMediaItem(PNG_ASSET_URI_STRING, /* frameCount= */ imageFrameCount);
|
||||
// Result of the following command:
|
||||
// ffprobe -count_frames -select_streams v:0 -show_entries stream=nb_read_frames sample.mp4
|
||||
EditedMediaItem videoEditedMediaItem =
|
||||
createVideoEditedMediaItem(MP4_ASSET_URI_STRING, /* height= */ 480);
|
||||
ExportTestResult result =
|
||||
|
|
@ -117,10 +116,10 @@ public class TransformerMixedInputEndToEndTest {
|
|||
.build();
|
||||
|
||||
int imageFrameCount = 33;
|
||||
EditedMediaItem imageEditedMediaItem =
|
||||
EditedMediaItem imageEditedMediaItem1 =
|
||||
createImageEditedMediaItem(PNG_ASSET_URI_STRING, /* frameCount= */ imageFrameCount);
|
||||
// Result of the following command:
|
||||
// ffprobe -count_frames -select_streams v:0 -show_entries stream=nb_read_frames sample.mp4
|
||||
EditedMediaItem imageEditedMediaItem2 =
|
||||
createImageEditedMediaItem(JPG_ASSET_URI_STRING, /* frameCount= */ imageFrameCount);
|
||||
EditedMediaItem videoEditedMediaItem =
|
||||
createVideoEditedMediaItem(MP4_ASSET_URI_STRING, /* height= */ 360);
|
||||
ExportTestResult result =
|
||||
|
|
@ -132,10 +131,10 @@ public class TransformerMixedInputEndToEndTest {
|
|||
ImmutableList.of(
|
||||
videoEditedMediaItem,
|
||||
videoEditedMediaItem,
|
||||
imageEditedMediaItem,
|
||||
imageEditedMediaItem,
|
||||
imageEditedMediaItem1,
|
||||
imageEditedMediaItem2,
|
||||
videoEditedMediaItem,
|
||||
imageEditedMediaItem,
|
||||
imageEditedMediaItem1,
|
||||
videoEditedMediaItem)));
|
||||
|
||||
assertThat(result.exportResult.videoFrameCount)
|
||||
|
|
|
|||
Loading…
Reference in a new issue