diff --git a/libraries/test_data/src/test/assets/media/mp4/sample_with_increasing_timestamps.mp4 b/libraries/test_data/src/test/assets/media/mp4/sample_with_increasing_timestamps.mp4 new file mode 100644 index 0000000000..84e40d7dd0 Binary files /dev/null and b/libraries/test_data/src/test/assets/media/mp4/sample_with_increasing_timestamps.mp4 differ diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/AndroidTestUtil.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/AndroidTestUtil.java index 9a75a1360d..407d6c80dd 100644 --- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/AndroidTestUtil.java +++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/AndroidTestUtil.java @@ -40,6 +40,8 @@ import org.json.JSONObject; /** Utilities for instrumentation tests. */ public final class AndroidTestUtil { public static final String MP4_ASSET_URI_STRING = "asset:///media/mp4/sample.mp4"; + public static final String MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING = + "asset:///media/mp4/sample_with_increasing_timestamps.mp4"; public static final String SEF_ASSET_URI_STRING = "asset:///media/mp4/sample_sef_slow_motion.mp4"; public static final String REMOTE_MP4_10_SECONDS_URI_STRING = "https://storage.googleapis.com/exoplayer-test-media-1/mp4/android-screens-10s.mp4"; diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/RemoveAudioTransformationTest.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/RemoveAudioTransformationTest.java index 2e6dbab20a..5020594ccd 100644 --- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/RemoveAudioTransformationTest.java +++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/RemoveAudioTransformationTest.java @@ -15,12 +15,10 @@ */ package androidx.media3.transformer.mh; -import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING; +import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING; import static androidx.media3.transformer.AndroidTestUtil.runTransformer; import android.content.Context; -import androidx.media3.common.util.Log; -import androidx.media3.common.util.Util; import androidx.media3.transformer.Transformer; import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; @@ -35,19 +33,13 @@ public class RemoveAudioTransformationTest { @Test public void removeAudioTransform() throws Exception { - if (Util.SDK_INT < 25) { - // TODO(b/210593256): Remove test skipping after removing the MediaMuxer dependency. - Log.i(TAG, "Skipping on this API version due to lack of muxing support"); - return; - } - Context context = ApplicationProvider.getApplicationContext(); Transformer transformer = new Transformer.Builder(context).setRemoveAudio(true).build(); runTransformer( context, /* testId= */ "removeAudioTransform", transformer, - MP4_ASSET_URI_STRING, + MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING, /* timeoutSeconds= */ 120); } } diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java index adeb10aec7..99936ed54a 100644 --- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java +++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/TransformationTest.java @@ -15,12 +15,10 @@ */ package androidx.media3.transformer.mh; -import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING; +import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING; import static androidx.media3.transformer.AndroidTestUtil.runTransformer; import android.content.Context; -import androidx.media3.common.util.Log; -import androidx.media3.common.util.Util; import androidx.media3.transformer.Transformer; import androidx.test.core.app.ApplicationProvider; import androidx.test.ext.junit.runners.AndroidJUnit4; @@ -35,19 +33,13 @@ public class TransformationTest { @Test public void transform() throws Exception { - if (Util.SDK_INT < 25) { - // TODO(b/210593256): Remove test skipping after removing the MediaMuxer dependency. - Log.i(TAG, "Skipping on this API version due to lack of muxing support"); - return; - } - Context context = ApplicationProvider.getApplicationContext(); Transformer transformer = new Transformer.Builder(context).build(); runTransformer( context, /* testId= */ "transform", transformer, - MP4_ASSET_URI_STRING, + MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING, /* timeoutSeconds= */ 120); } }