mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove usage of mutable static BundledChunkExtractor.FACTORY
PiperOrigin-RevId: 715328246
This commit is contained in:
parent
1892435fb3
commit
6300a55eb2
@ -194,8 +194,11 @@ public final class BundledChunkExtractor implements ExtractorOutput, ChunkExtrac
|
||||
}
|
||||
}
|
||||
|
||||
/** {@link Factory} for {@link BundledChunkExtractor}. */
|
||||
public static final Factory FACTORY = new Factory();
|
||||
/**
|
||||
* @deprecated {@link Factory} is mutable, so a static instance is not safe. Instantiate a new
|
||||
* {@link Factory} instead.
|
||||
*/
|
||||
@Deprecated public static final Factory FACTORY = new Factory();
|
||||
|
||||
private static final PositionHolder POSITION_HOLDER = new PositionHolder();
|
||||
|
||||
|
@ -91,10 +91,10 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
||||
|
||||
/**
|
||||
* Equivalent to {@link #Factory(ChunkExtractor.Factory, DataSource.Factory, int) new
|
||||
* Factory(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad)}.
|
||||
* Factory(new BundledChunkExtractor.Factory(), dataSourceFactory, maxSegmentsPerLoad)}.
|
||||
*/
|
||||
public Factory(DataSource.Factory dataSourceFactory, int maxSegmentsPerLoad) {
|
||||
this(BundledChunkExtractor.FACTORY, dataSourceFactory, maxSegmentsPerLoad);
|
||||
this(new BundledChunkExtractor.Factory(), dataSourceFactory, maxSegmentsPerLoad);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -87,7 +87,7 @@ public class DefaultDashChunkSourceTest {
|
||||
SAMPLE_MPD_LIVE_WITH_OFFSET_INSIDE_WINDOW));
|
||||
DefaultDashChunkSource chunkSource =
|
||||
new DefaultDashChunkSource(
|
||||
BundledChunkExtractor.FACTORY,
|
||||
new BundledChunkExtractor.Factory(),
|
||||
new LoaderErrorThrower.Placeholder(),
|
||||
manifest,
|
||||
new BaseUrlExclusionList(),
|
||||
@ -139,7 +139,7 @@ public class DefaultDashChunkSourceTest {
|
||||
ApplicationProvider.getApplicationContext(), SAMPLE_MPD_VOD));
|
||||
DefaultDashChunkSource chunkSource =
|
||||
new DefaultDashChunkSource(
|
||||
BundledChunkExtractor.FACTORY,
|
||||
new BundledChunkExtractor.Factory(),
|
||||
new LoaderErrorThrower.Placeholder(),
|
||||
manifest,
|
||||
new BaseUrlExclusionList(),
|
||||
@ -551,7 +551,7 @@ public class DefaultDashChunkSourceTest {
|
||||
"media/mpd/sample_mpd_live_known_duration_not_ended"));
|
||||
DefaultDashChunkSource chunkSource =
|
||||
new DefaultDashChunkSource(
|
||||
BundledChunkExtractor.FACTORY,
|
||||
new BundledChunkExtractor.Factory(),
|
||||
new LoaderErrorThrower.Placeholder(),
|
||||
manifest,
|
||||
new BaseUrlExclusionList(),
|
||||
@ -600,7 +600,7 @@ public class DefaultDashChunkSourceTest {
|
||||
"media/mpd/sample_mpd_live_known_duration_ended"));
|
||||
DefaultDashChunkSource chunkSource =
|
||||
new DefaultDashChunkSource(
|
||||
BundledChunkExtractor.FACTORY,
|
||||
new BundledChunkExtractor.Factory(),
|
||||
new LoaderErrorThrower.Placeholder(),
|
||||
manifest,
|
||||
new BaseUrlExclusionList(),
|
||||
@ -665,7 +665,7 @@ public class DefaultDashChunkSourceTest {
|
||||
selectedTracks,
|
||||
new DefaultBandwidthMeter.Builder(ApplicationProvider.getApplicationContext()).build());
|
||||
return new DefaultDashChunkSource(
|
||||
BundledChunkExtractor.FACTORY,
|
||||
new BundledChunkExtractor.Factory(),
|
||||
new LoaderErrorThrower.Placeholder(),
|
||||
manifest,
|
||||
new BaseUrlExclusionList(new Random(/* seed= */ 1234)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user