mirror of
https://github.com/androidx/media.git
synced 2025-05-15 11:39:56 +08:00
Skip tests requiring out of order muxing pre API 25
PiperOrigin-RevId: 429029496
This commit is contained in:
parent
ecbd361492
commit
e32dabc976
@ -22,14 +22,25 @@ import android.content.Context;
|
|||||||
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;
|
||||||
import com.google.android.exoplayer2.transformer.Transformer;
|
import com.google.android.exoplayer2.transformer.Transformer;
|
||||||
|
import com.google.android.exoplayer2.util.Log;
|
||||||
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
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(
|
||||||
|
@ -23,14 +23,25 @@ import androidx.test.core.app.ApplicationProvider;
|
|||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.transformer.TransformationRequest;
|
import com.google.android.exoplayer2.transformer.TransformationRequest;
|
||||||
import com.google.android.exoplayer2.transformer.Transformer;
|
import com.google.android.exoplayer2.transformer.Transformer;
|
||||||
|
import com.google.android.exoplayer2.util.Log;
|
||||||
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
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)
|
||||||
|
@ -22,14 +22,25 @@ import android.content.Context;
|
|||||||
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;
|
||||||
import com.google.android.exoplayer2.transformer.Transformer;
|
import com.google.android.exoplayer2.transformer.Transformer;
|
||||||
|
import com.google.android.exoplayer2.util.Log;
|
||||||
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user