mirror of
https://github.com/samsonjs/media.git
synced 2026-04-16 13:05:46 +00:00
Add a new sample file to assets, which has increasing timestamps.
Re-enable tests that have no muxer support for timestamps going backwards. Tests running on the B-frame sample will be added in a future commit. #mse-bug-week PiperOrigin-RevId: 429599177
This commit is contained in:
parent
9961d918a9
commit
666998f0fb
4 changed files with 6 additions and 20 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -15,15 +15,13 @@
|
|||
*/
|
||||
package com.google.android.exoplayer2.transformer.mh;
|
||||
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING;
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.runTransformer;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
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.runner.RunWith;
|
||||
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,15 +15,13 @@
|
|||
*/
|
||||
package com.google.android.exoplayer2.transformer.mh;
|
||||
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING;
|
||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.runTransformer;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
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.runner.RunWith;
|
||||
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
testdata/src/test/assets/media/mp4/sample_with_increasing_timestamps.mp4
vendored
Normal file
BIN
testdata/src/test/assets/media/mp4/sample_with_increasing_timestamps.mp4
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue