Commit 677c5dc6 by andrewlewis Committed by Ian Baker

Skip tests requiring out of order muxing pre API 25

PiperOrigin-RevId: 429029496
parent b59869ed
...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING; ...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
import static androidx.media3.transformer.AndroidTestUtil.runTransformer; import static androidx.media3.transformer.AndroidTestUtil.runTransformer;
import android.content.Context; import android.content.Context;
import androidx.media3.common.util.Log;
import androidx.media3.common.util.Util;
import androidx.media3.transformer.Transformer; import androidx.media3.transformer.Transformer;
import androidx.test.core.app.ApplicationProvider; import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
...@@ -28,8 +30,17 @@ import org.junit.runner.RunWith; ...@@ -28,8 +30,17 @@ import org.junit.runner.RunWith;
/** {@link Transformer} instrumentation test for removing audio. */ /** {@link Transformer} instrumentation test for removing audio. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class RemoveAudioTransformationTest { public class RemoveAudioTransformationTest {
private static final String TAG = "RemoveAudioTransformationTest";
@Test @Test
public void removeAudioTransform() throws Exception { 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(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).setRemoveAudio(true).build(); Transformer transformer = new Transformer.Builder(context).setRemoveAudio(true).build();
runTransformer( runTransformer(
......
...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.SEF_ASSET_URI_STRING; ...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.SEF_ASSET_URI_STRING;
import static androidx.media3.transformer.AndroidTestUtil.runTransformer; import static androidx.media3.transformer.AndroidTestUtil.runTransformer;
import android.content.Context; import android.content.Context;
import androidx.media3.common.util.Log;
import androidx.media3.common.util.Util;
import androidx.media3.transformer.TransformationRequest; import androidx.media3.transformer.TransformationRequest;
import androidx.media3.transformer.Transformer; import androidx.media3.transformer.Transformer;
import androidx.test.core.app.ApplicationProvider; import androidx.test.core.app.ApplicationProvider;
...@@ -29,8 +31,17 @@ import org.junit.runner.RunWith; ...@@ -29,8 +31,17 @@ import org.junit.runner.RunWith;
/** {@link Transformer} instrumentation test for SEF. */ /** {@link Transformer} instrumentation test for SEF. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class SefTransformationTest { public class SefTransformationTest {
private static final String TAG = "SefTransformationTest";
@Test @Test
public void sefTransform() throws Exception { public void sefTransform() 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(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = Transformer transformer =
new Transformer.Builder(context) new Transformer.Builder(context)
......
...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING; ...@@ -19,6 +19,8 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
import static androidx.media3.transformer.AndroidTestUtil.runTransformer; import static androidx.media3.transformer.AndroidTestUtil.runTransformer;
import android.content.Context; import android.content.Context;
import androidx.media3.common.util.Log;
import androidx.media3.common.util.Util;
import androidx.media3.transformer.Transformer; import androidx.media3.transformer.Transformer;
import androidx.test.core.app.ApplicationProvider; import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
...@@ -28,8 +30,17 @@ import org.junit.runner.RunWith; ...@@ -28,8 +30,17 @@ import org.junit.runner.RunWith;
/** {@link Transformer} instrumentation test. */ /** {@link Transformer} instrumentation test. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public class TransformationTest { public class TransformationTest {
private static final String TAG = "TransformationTest";
@Test @Test
public void transform() throws Exception { 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(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).build(); Transformer transformer = new Transformer.Builder(context).build();
runTransformer( runTransformer(
......
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