Commit fcc11a08 by tofunmi Committed by Tofunmi Adigun-Hameed

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 8ab38dc3f97330ecb823f0beb0dc16e79da89d17)
parent 05c2ff34
......@@ -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 com.google.android.exoplayer2.transformer;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.JPG_ASSET_URI_STRING;
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
import static com.google.android.exoplayer2.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)
......
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