mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
Replace deprecated ShadowMediaCodecConfig factory methods
This is part of the efforts for adding encoder support for ShadowMediaCodecConfig to use it for ExoPlayer and Transcoding tests. * Replaced `ShadowMediaCodecConfig#forAllSupportedMimeTypes()` calls with `ShadowMediaCodecConfig#withAllDefaultSupportedCodecs()` * Replaced `ShadowMediaCodecConfig#withNoDefaultSupportedMimeTypes() calls with `ShadowMediaCodexConfig#withNoDefaultSupportedCodecs()` PiperOrigin-RevId: 747413859
This commit is contained in:
parent
07be60ed93
commit
a2265f1dae
@ -263,7 +263,7 @@ public final class ExoPlayerTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
// The explicit boolean parameter is only used to give clear test names.
|
||||
@Parameter(0)
|
||||
|
@ -83,7 +83,7 @@ public class ExoPlayerWithPrewarmingRenderersTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
|
@ -88,7 +88,7 @@ public class AudioCapabilitiesEndToEndTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig shadowMediaCodecConfig =
|
||||
ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withNoDefaultSupportedCodecs();
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
|
@ -61,7 +61,7 @@ public class AudioOffloadEndToEndTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
|
@ -48,7 +48,7 @@ public class AnalyticsListenerPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void loadEventsReportedAsExpected() throws Exception {
|
||||
|
@ -69,7 +69,7 @@ public final class ClippingPlaylistPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void playbackWithClippingMediaSources() throws Exception {
|
||||
|
@ -57,7 +57,7 @@ public class EndToEndOffloadFailureRecoveryTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
public FakeClock fakeClock;
|
||||
public DefaultTrackSelector trackSelector;
|
||||
|
@ -57,7 +57,7 @@ public class FlacPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -47,7 +47,7 @@ public final class FlvPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -86,7 +86,7 @@ public final class MergingPlaylistPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void transitionBetweenDifferentMergeConfigurations() throws Exception {
|
||||
|
@ -50,7 +50,7 @@ public final class MkaPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -64,7 +64,7 @@ public final class MkvPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -51,7 +51,7 @@ public class MotionPhotoPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -54,7 +54,7 @@ public final class Mp3PlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -76,7 +76,7 @@ public class Mp4PlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -52,7 +52,7 @@ public final class OggOpusPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
public FakeClock fakeClock;
|
||||
public OffloadRenderersFactory offloadRenderersFactory;
|
||||
|
@ -50,7 +50,7 @@ public final class OggPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -58,7 +58,7 @@ public class ParseAv1SampleDependenciesPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void playback_withClippedMediaItem_skipNonReferenceInputSamples() throws Exception {
|
||||
|
@ -52,7 +52,7 @@ public final class PlaylistPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test_bypassOnThenOff() throws Exception {
|
||||
|
@ -56,7 +56,7 @@ public class PrewarmingRendererPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void playback_withTwoMediaItemsAndSecondaryVideoRenderer_dumpsCorrectOutput()
|
||||
|
@ -37,7 +37,7 @@ public final class SilencePlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test_500ms() throws Exception {
|
||||
|
@ -60,7 +60,7 @@ public class SubtitlePlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
// https://github.com/androidx/media/issues/1721
|
||||
@Test
|
||||
|
@ -74,7 +74,7 @@ public class TsPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -51,7 +51,7 @@ public final class Vp9PlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -44,7 +44,7 @@ public final class WavPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -68,7 +68,7 @@ public class WebvttPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
|
@ -104,7 +104,7 @@ public final class ServerSideAdInsertionMediaSourceTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
private static final String TEST_ASSET = "asset:///media/mp4/sample.mp4";
|
||||
|
||||
|
@ -75,7 +75,7 @@ public final class DashPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void webvttStandaloneFile() throws Exception {
|
||||
|
@ -70,7 +70,7 @@ public final class HlsPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Test
|
||||
public void webvttStandaloneSubtitlesFile() throws Exception {
|
||||
|
@ -80,7 +80,7 @@ public final class RtspPlaybackTest {
|
||||
|
||||
@Rule
|
||||
public ShadowMediaCodecConfig mediaCodecConfig =
|
||||
ShadowMediaCodecConfig.forAllSupportedMimeTypes();
|
||||
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs();
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user